Welcome to WeetHet!


Managed Web Hosting by Liquid Web

Your IP address:
44.221.43.208
     
 
Print this page
- use Landscape
Search the
WeetHet Pages
WeetHet is being updated! - Current articles will slowly move to www.tweaking4all.com
For excellent webhosting that is reliable and affordable, we highly recommend: LiquidWeb

On this page ...

Fixed Background - Non-scrolling Background

This little trick locks the background pattern, so if you scroll, you will notice the content moving, but NOT the background.

This is a trick you don't often but it's a rather cool thing (if the background of your website is suitable for this feature - mine isn't).

The downside is that it only works for Internet Explorer 4 and newer.

This trick is based by on a stylesheet feature.

HTML

The Trick

Put this in the <HEAD>-part of you document:

<STYLE TYPE="text/css">
<!--
BODY { background: url(/../images/mybackground.gif) fixed }
-->
</STYLE>

Make sure the background is not dominating your content, or the background is not somehow stringly related to the content.

You can get the same effect by adding

bgproperties="fixed"

in the <body> tag as such:

<body background="/../images/mybackground.gif" bgproperties="fixed">

This does not work in Netscape.


 

 


Klik hier om te wisselen naar nederlandstalige pagina's You are currently on the English pages.