Mozilla adds a space in table cells with links in them
jeffd
Status: Assistant
Joined: 04 Oct 2003
Posts: 594
Reply Quote
Does anyone know how to get rid of the space mozilla/gecko adds to table cells in pages with doctype xhtml declared to table cells containing image links.

This has kept me from making some of my websites xhtml, since some of them unfortunately were designed with top nav bars contructed out of graphics, and the xhtml declaration ruins the layout by adding that space between table rows.

This is the only problem I've had with mozilla in terms of layout, and I'd like to get it figured out.

I've tried declaring the


:: Code ::
td {line-height: 0px;}


but that only solves the problem for image containing cells, not image/link cells.

If anyone can help, I'd appreciate it, thanks, Jeff
Back to top
Not a problem anymore
adrian
Status: New User - Welcome
Joined: 09 Oct 2003
Posts: 2
Reply Quote
That stopped being a problem as of the latest Mozilla/Gecko builds, I think around 1.4 or 1.5, I can't remember, it doesn't do that anymore.

One reason it does this is because you have your doctype as XHTML, which puts Mozilla into strict standards mode, I don't know the standards exactly for this, but my suspicion is that this is actually correct, although annoying.

If the page display is more important than the code being perfect xhtml to you, which it should be, just get rid of the XHTML doctype declaration and replace it with a simple <html> document start tag, this will make earlier mozilla's display this image/td thing correctly.

On the other hand, there really aren't that many Gecko 0.9/Netscape 6.x browsers out there, most Mozilla users update pretty regularly.
Back to top
mike
Status: Contributor
Joined: 08 Oct 2004
Posts: 71
Reply Quote
there's a reason most large sites (ie. microsoft, google, yahoo) omit doctype declarations
Back to top
Display posts from previous:   

All times are GMT - 8 Hours