This is a discussion on "IE displaying (table) cell widths incorrectly" within the Web Page Design section. This forum, and the thread "IE displaying (table) cell widths incorrectly are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
IE displaying (table) cell widths incorrectly
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
IE displaying (table) cell widths incorrectly
I believe I'm encountering an IE bug, but I can't find anything about it anywhere on the web, so I'm hoping someone can shed some light on this (and hopefully point me toward a workaround.)
The problem is that IE is rendering table cells much wider than they should be. I'm guessing it has something to do with my use of background images via CSS. The general idea is to frame individual posts on a message board with (what looks like) glowing neon tube frames - but IE is screwing it up BADLY. I'm not doing anything (in either html or css) that's terribly out of the ordinary. (At least I don't think I am.) Here's the html (I'm not posting all of it, but enough for the problem to be apparent.)
http://stickpuppy.com/dhs57/_wtf.htm http://stickpuppy.com/dhs57/_wtfb.com (The second link puts a border around all the table cells to really demonstrate the problem.) I hope someone can help me on this. I've spent 48 of the last 60 hours fighting this bugger and I've already missed a deadline. Thanks for taking a look. Last edited by Donny Bahama; Apr 3rd, 2007 at 00:09. Reason: Original title does not reflect problem accurately |
|
|
|
|||
|
Re: Bug in IE display of td background image?
Donny neither of the links you posted are working and the code you provided doesn't shed enough light since I can't see your background graphics.
If you can get the links to work, that would be helpful. |
|
|||
|
Re: Bug in IE display of td background image?
I think they're working now, but I'll post them again just in case...
http://stickpuppy.com/dhs57/_wtf.htm http://stickpuppy.com/dhs57/_wtfb.com |
|
|||
|
Re: Bug in IE display of td background image?
You really should be using div classes instead of tables. I'm not actually sure how you'd code a table cell with a flexible width. If you used div classes you'd have have just a snippet of that graphic as the div background and repeat-x. Then it would just fill up whatever the cell width is and not make it a mandatory 436 in width. |
|
|||
|
Re: Bug in IE display of td background image?
Quote:
Quote:
|
|
|||
|
Re: Bug in IE display of td background image?
Quote:
![]() Quote:
Quote:
|
|
|||
|
Re: Bug in IE display of td background image?
Thanks for the clarification. I needed that
Your table should be 3 columns, currently you have four. Try this
|
|
|||
|
Re: Bug in IE display of td background image?
Hmmm. Thanks for the help, but I'm not sure where you came up with those numbers...
The table needs to be 472px wide, and that's what's being specified in CSS. (See #em_post.) The two side cells (containing the vertical neon frame elements) need to be exactly 18px - and I'm specifying that in html:
Also, in the finished product, there are a total of 10 columns necessary (which is why R2C3 has a colspan of 7). Last edited by Donny Bahama; Apr 2nd, 2007 at 16:47. |
|
||||
|
Re: Bug in IE display of td background image?
Change
|
|
|||
|
Re: Bug in IE display of td background image?
Thanks, Karinne. em_post is actually only used once. (It formats the table.)
While I appreciate the good catch (and I've fixed it), this minor semantic issue doesn't resolve the main issue. Feel free to check out the updated version: http://stickpuppy.com/dhs57/_wtf2.htm |
|
|||
|
Re: Bug in IE display of td background image?
I would suggest you set the width on each cell
|
|
|||
|
Re: Bug in IE display of td background image?
Quote:
I did finally get to the bottom of this, though. I'll document it for posterity... You're actually part right - a width *is* needed on every cell in a row once a total width has been defined for the table itself. BUT - you can't have unnecessary colspans - even if all the widths are defined properly. This works:
|
|
|||
|
Re: Bug in IE display of td background image?
Moderators: As it turns out, the issue here had nothing whatsoever to do with the display of background images. For those who might need to find this post due to a similar problem, I suggest the title be changed so that they don't overlook it based on its inaccurate title. I tried to change it to "IE displaying (table) cell widths incorrectly" but it only changed the title of my first post (and not the topic title as displayed in the forum topic list.)
|
|
||||
|
Re: IE displaying (table) cell widths incorrectly
Have you tried using <col>?
I will say, at this point, I have stopped using tables and table commands for anything but a big mass of data (for which tables/php/sql kick butt). It takes more front-end work coding the divs but the result renders faster and is a lot more flexible. PS I'll take IE7's handling of nested/floating div's any day. |
|
|||
|
Re: IE displaying (table) cell widths incorrectly
I didn't know about col, but now that I've taken a look, it looks like it would be a nice solution. Thanks, Mason!
I agree with you regarding the use of tables - I only use them when I'm going to display a lot of data queried from a db. (But this is just such a situation.) |
|
|||
|
Re: IE displaying (table) cell widths incorrectly
I had already (before seeing mason's post) recoded the page, defining widths for each and every cell - and it worked great, but I decided to experiment with the col tag just for the heck of it. I took the simplest route first, adding
Last edited by Donny Bahama; Apr 3rd, 2007 at 17:10. Reason: Clarification of workaround |
![]() |
| Tags |
| table width, table, ie bug, cell width |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| putting a forum into a table cell? | GeekyBabe | PHP Forum | 9 | Jan 30th, 2008 09:45 |
| Horizontal drop down in table cell | gribble | JavaScript Forum | 1 | Mar 5th, 2007 20:31 |
| How to force table cell widths | AdRock | Web Page Design | 1 | Sep 7th, 2006 14:54 |
| Table cell not stretching | julie | Web Page Design | 3 | May 18th, 2006 01:48 |
| Table cell (NO)wrap? | ktsirig | Web Page Design | 4 | Sep 28th, 2005 19:49 |