|
![]() |
Overclock.net - Overclocking.net > Overclock.net Forum > FAQs | |
How to: Get around Internet explorer's rendering bugs
|
||
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) | |||||||||||||
|
Programmer
![]() |
Theres a handy little trick I use to get around irritating IE issues.
__________________Use: Code:
html>body *tag you want to use, e.g. div.leftbar* {}
Code:
html>body div.leftbar { padding: 0;
margin: 0 auto;
text-align: left;
}
IE likes to add a 3px margin to images sometimes. To get around this problem, we can use this trick. Heres how: Code:
/* Give the image a class. For this example, we'll use img.ocnlogo. */
img.ocnlogo { margin: -3px: /* <--- This is the code to get rid of the 3px margin around the image in IE. IE will execute this accordingly. */
}
html>body img.ocnlogo{
margin: 0;
}
Understand!? Please comment if you need further explanation. The reason why this works is that IE is meant to recognise html>body but it can't because its a bug in IE. However it is extremely easy and useful to implement. I have solved many problems using this which would otherwise be deemed near impossible to solve. It takes intelligence and coding skill to implement this effectively, as you need to have a good knowledge of the CSS code to correct IE's problems effectively. Revision history:
Last edited by sniperscope : 01-06-07 at 11:56 AM |
|||||||||||||
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|