Negative Margin Bug fix in ie6
Developers used to move a blog from its actual position to some other position using negative margin. This will render properly in all the browser except ie6. Basically when you give negative margin, the position of the block will come over the existing block.
For Example:
.bc {
width:100px;
float:left;
}
.abc {
margin-top:-100px;
}
In the above example, .abc block will be over the .bc block. But in ie6 .bc block will be over than the .abc block and .abc block will get hidden. Here is a simple hack to display the block on top.
How to use:
.abc {
margin-top:-100px;
position:relative;
}
Just add position relative to negative margin when using it. This simple hack will work in all the browsers.
For Example:
.bc {
width:100px;
float:left;
}
.abc {
margin-top:-100px;
}
In the above example, .abc block will be over the .bc block. But in ie6 .bc block will be over than the .abc block and .abc block will get hidden. Here is a simple hack to display the block on top.
How to use:
.abc {
margin-top:-100px;
position:relative;
}
Just add position relative to negative margin when using it. This simple hack will work in all the browsers.
Labels: ie6, Negative Margin Bug, web browser hacks
15 Comments:
Thanks :)
Perfect - thanks
excellent. saved my day
thank you very much
That was poetry. Thanks!
Thank you very much
You just saved me some time too! Props to you :)
Sick! Thanks, this works a charm.
"That was poetry". Awesome!
Thanks a lot! I've killed about an hour with this bug!
==
wd
Brilliant - thanks
Thank you a lot :)
excellent post! this is the kind of information that should be shared across the internet. keep it going! Kudos :)
www.n8fan.net
Thank you so much!
?I was very happy to find this net-site.I wanted to thanks in your time for this glorious read!! I definitely having fun with every little bit of it and I have you bookmarked to take a look at new stuff you weblog post. mgm online casino
Post a Comment
Subscribe to Post Comments [Atom]
<< Home