Solved

Control table cell height in IE8 + FF

Posted on 2009-07-15
2
531 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

911 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

21 Experts available now in Live!

Get 1:1 Help Now