To implement a fixed effect in a Div block Web page by positioning:
This section describes how to position a div on a page by positioning it, regardless of whether you drag the scroll bar or not.
The code example is as follows:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">Body{margin:0px Auto;Height:1000px;}#fixedLayer{position:fixed; Left:40px;Top:10px;width:100px;Line-height:30px;background:#FC6;Border:1px solid #F90; } </style> </Head> <Body> <DivID= "Fixedlayer">Ant Tribe</Div> </Body> </HTML>
The above code to achieve our requirements, here is used to set the element position:fixed, but IE6 does not support, but I feel IE6 still need to consider it.
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=13917
For more information, refer to: http://www.softwhy.com/divcss/
Fixed Effects in div block Web pages implemented by positioning