Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Control table cell height in IE8 + FF

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to resize a div in html 3 37
Html input text color the frame line 2 20
Responsive Font Size 6 27
message Alert on an empty search 10 20
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
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…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

856 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