Solved

Control table cell height in IE8 + FF

Posted on 2009-07-15
2
527 Views
Last Modified: 2012-05-07
We use Dreamweaver to develop. Our website www.newsknife.com has for years had some pages containing tables. The height of the cells would appear as no greater than the contents. Now, in IE8 and FireFox we find that the cells appear with a much greater height than the contents. For example, a cell containing MONTH\PAGE was no higher than that 12pt wording. Now it is three times that height.

Presumably the change is the result of browsers now having better compliance with web standards. The question is how do we now control the cell height to return to being defined by its contents height or something similar? I've tried specifying a pixel height for the table but the cells still grow too high.

You can see this at our site page http://www.newsknife.com/online_news_site_profile.html. And also at http://www.newsknife.com/online_news_site_profile_tabletest.html WITHOUT <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />, (which I think I should probably remove site-wide). Refer to the first table that has a yellow background. The top left cell says MONTH\PAGE.

This table is defined by this code:
<table bgcolor="#FFCC00" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="700">
        <td>
0
Comment
Question by:NEILPH
2 Comments
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
ID: 24867042
There's a <p> in every table-cell?

Anyway, that's an odd IE7 bug. Making other browsers display it the same way is easy. Simply add margin:0 to the "p" style rule.
		p

		{

			font-family: Verdana, arial, hevetica, sans-serif;

			font-size: 12px;

			line-height: 115%;

			padding-left: 5px;

			margin: 0;

		}

Open in new window

0
 

Author Closing Comment

by:NEILPH
ID: 31604110
That certainly worked; see my revised http://www.newsknife.com/online_news_site_profile_tabletest.html.

I thought I was going to have to resort to putting a  around it.

As I recall, I put the  in every cell to format the text in it. I don't recall doing it manually so maybe Dreamweaver did it automatically for me that way when I required all the content in the table to be formatted.

Thanks.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now