• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug  Using A Table In Header Doesnt Display Properly

graham_w

Active member
#1
I have a header in a table that I use on my current vBulletin forum - it displays just fine there.

vb4_header.gif

Putting the table in a standalone html page displays it properly as well.

header.gif

When I put the same table into the header template in XF it isn't displaying properly.

xenforo_header.gif

Happy to provide a copy of the header table html if it helps.
 

Mike

XenForo developer
Staff member
#5
This is down to relying on a non-standards compliant behavior. I actually like the behavior, but it is what it is.

XHTML 1.0 transitional only triggers "almost standards" on the browsers. The one thing it violates is leaving space around images in tables for ascenders/descenders. HTML5 triggers full standards mode. This table is relying on the almost standards behavior.

http://en.wikipedia.org/wiki/Quirks_mode
https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps

The workaround is to give the images style="display:block". This will have to be applied to the images coming from the ad code as well.
 

graham_w

Active member
#6
I learn something new every day :) The information in the second link fixed my issue.

Many thanks Mike for following this up and for the information you have provided.