Fixed or Static Division

InfoInfo
Search:    

Fixed or Static Division

Tutorial by Gordon

Description

As you know IE 5 & 6 can't read fixed positioning like the other browsers it's been repaired in ie7, I think I have a solution for web studio figured out though.

Forum [WWW]Q & Aon this topic.

Step by Step

<div
id="gordbox"
style="
padding: 6px;
background-color: tomato;
border:2px solid black">
<center> 

<Font face=Verdana>
<STRONG>
<FONT color=maroon>
<A href="[WWW]http://webstudioforum.com/">
Web Studio Forum
</A>
</FONT>
<FONT color=navajowhite>
- This is the Stuff I want to stay on top
</FONT>
</STRONG>
</FONT>
</center>
</div> 

Note: Copy all the code from the top and bottom pink and white middle. The WIKI wouldn't allow the colored background plus the bold. So in short you want to copy the code from div to /div

<style type="text/css"> 
#gordbox{
position: fixed;
}
* html #gordbox{ /*IE6 only rule, applied on top of the default above*/
position: absolute;
top: expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+1+"px" : body.scrollTop+1+"px");
}
</style>

Here is the link if you want to read more about the [WWW]Introduction to Dynamic Properties (aka dynamic expressions) at [WWW]http://www.javascriptkit.com

This is a Wiki Spot wiki. Wiki Spot is a 501(c)3 non-profit organization that helps communities collaborate via wikis.