Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE8 css bug? 2

Status
Not open for further replies.

maharg

Technical User
Mar 21, 2002
184
0
0
Hi Folks,

I'm battling to find why my code won't render properly in IE8, so wonder if you can spot my error?

Please see
Compare the view in Firefox and IE8, and you will see a white line in IE8, separating the header from the rest of the content.

Any help very much appreciated, as this has been bugging me a few days now!

Thanks in anticipation,

Graham
 
You are missing a doctype, which sends IE into quirks mode, and makes it render things differently.

Additionally you have a few errors that may be causing issues:

Fix those before attempting to wrestle with browser differences.

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Aside from those items pointed out by Phil (which you should address), and aside from that fact you are using a table for layout (trust me when I say this is not a good idea), if you do the following, the gap should go:

- Give your header anchor a "display:block" style

- Give your header anchor a "height:61px" style

Hope this helps,

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Many thanks to you both.

The mystery persists, however :)

I have changed the markup as suggested, but the effect is still present.

Now compliant, no tables, and with the added CSS.

The modified markup is at - I have left the original version unchanged, in its original url.

Regards,

Graham
 
Ah, in fact the white line appears in Firefox also, now!
 
Aah - You appear to be making up non-existent style properties.

Remove the following 2 styles from the img:

header:anchor;
height:61px;

And add this attribute to the anchor:

Code:
style="display:block; height:61px;"

I'm not sure how you got what you did from what I advised, but never mind!

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

Dan's Page [blue]@[/blue] Code Couch:
Code Couch Snippets & Info:
The Out Atheism Campaign
 
Your CSS has a few errors still. However the true culprit of the white line appears to be the actual link there.

Code:
<a href="new-panel-meters-large-displays.php"><img style="height: 61px; border-style: none;" alt="panel meter and large display manufacturer" src="showcase_header.jpg"></a>

Its adding a few extra pixels at the bottom causing the background to show through which makes it look a white line.

Add the following to the link's style and the line should disappear
Code:
  display: block;
    height: 61px;

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top