Hello, just found sitepoint, and hope someone here can help me (tried “stackoverflow”, but didin’t get any true help here). I am coding design and now I’m stuck at 30% of it, because it is showing not properly in IE8 (In Mozilla Firefox everything is ok), here’s the problem showed in images ->
How the web should look (and looks expect IE8):
And the gap which I can’t remove in IE8 (marked in blue box):
I’m kinda new to making designs with div’s and css, so it can be very obvious and simple problem… Hope someone will find solution to fix it, I don’t wanna give up.
Hey, my friend helped me with this with such solution:
In mine case i had to add some code to html file, in this case my index.htm got some new code below this line <link rel=“stylesheet” type=“text/css” href=“stilius.css”>
The thing is that if user uses IE 8 or lower version (if lte means if lowe or equal to) to add one more style parameter to my stylesheet class apkarp, in this case I added margin-top:-10px; to remove the unwanted gap.
The reason for the gap is that your HTML file lacks a DOCTYPE, thereby triggering Quirks Mode. Your code implies the document type to be XHTML, so add this to the top of the code, replacing the current <html> tag.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
You can then remove the Conditional Comment with the compensatory negative margin.
Please note: many people will be reluctant to download a .rar file from an unknown source, so it’s best to provide code in the post or, even better, a link to an online example.
Thanks for the help. First time hearing about ‘quirks mode’, will check more about it. When page will be available online I will edit first post as you noted.