Boolean Island !

Fixing position:fixed for IE

Posted by: ranacse05 on: December 14, 2008

Today i was trying to code a fixed footer . It took very small time to code. And that works ok in FireFox but when i open that page in Internet Explorer it looks different . Here is the first code .

body {
margin:0px;
padding:0 0 0 0 ;
}
#footer{
height:50px;
width:100%;
position:fixed;
top:95%;
background:#efefef;
border:1px solid #ccc;
}

#main {
height:1200px;
background:#A8C5FF;
}

<div id=”main”></div>

<div id=”c” align=”center”>

<div id=”footer”>Its Fixed !</div>

</div>

Then i try to fix this problem . The code below works in IE and the FF fine .


body{
margin:0;
padding:0 0 50px 0;
}
div#footer{
position:absolute;
bottom:0;
left:0;
width:100%;
height:30px;
}
#chat{
background:#efefef;
border-top:1px solid #ccc;
border-left:1px solid #ccc;
border-right:1px solid #ccc;
width:800px;
height:100%;
padding:0px;
margin:0px;
}
@media screen{
body>div#footer{
position:fixed;
}
}
* html body{
overflow:hidden;
}
* html div#content{
height:100%;
overflow:auto;
}


<div id="footer" align="center">

<div id="chat">

Content can be placed here......

</div>

</div>

<div id="content">

<span style="height:1300px"></span>

</div>

Nice hun ? :)

1 Response to "Fixing position:fixed for IE"

Rana it will be fine if u discuss more specific like put two images before fixing and after fixing, where is the problem and what’s the solution.

For div based design, while css coding check both in ie and ff same time.

Thanks

Leave a Reply

My blog worth


My site is worth $3431.
How much is yours worth?

My Twittes

FireFox

Firefox 3

My Facebook

this is Raquibul's profile

View Raquibul Islam's profile on LinkedIn

My fav

 

December 2008
S M T W T F S
« Oct   Feb »
 123456
78910111213
14151617181920
21222324252627
28293031  

Flickr Photos

Moon !

Moon !

Leevio

Leevio

Leevio

Tea !

History

me

More Photos

My Bookmarks

Dynamic Malloc

Blog Stats

  • 45,997 hits