By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,557 Members | 1,406 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,557 IT Pros & Developers. It's quick & easy.

table layout

P: n/a
I have a question about table layout in IE. I have a table with two
columns. The left column has two rows and the right column has 1 row
that has a column span of 2. In the left column I have given the top
row a height of 20 pixels. In firefox, that row always stays 20 pixels
high. The bottom row in the left column and the right column expand if
you add more text to either the bottom left row or the right column.
This does not work in IE. If you add a lot of text to the right
column, the top row of the left column will continue to grow the more
text you add. Is there any way in IE to keep that top row in the left
column from getting bigger than 20 pixels? the html is below.

----------------------
<table width="300" border="1" cellspacing="5" cellpadding="0">
<tr>
<td width="102" height="20" valign="top">&nbsp;</td>
<td width="177" rowspan="2" valign="top">sdafasdf<br />
<br />
asdf<br />
<br />
asdf</td>
</tr>
<tr>
<td valign="top">llalala sdk fjlaksd fj;lks </td>
</tr>
</table>

Sep 28 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
In article <11**********************@h48g2000cwc.googlegroups .com>,
<se***@enablearning.comwrote:
>I have a question about table layout in IE.
I'll answer this before you get a bunch of useless non-answers about
how you shouldn't be using tables for layout. Tables have a place
in layout, especially in cases where CSS fails to work consistently
across browsers.
>I have a table with two columns. The left column has two rows and
the right column has 1 row that has a column span of 2.
And your problem is, despite specifying a height for your top-left
cell, IE doesn't respect that height.

You might try specifying height="100%" for all the other cells in
the table. I once had a similar problem with IE not respecting a
cell width I specified. Making the other cell width 100% forced IE
to respect my pixel width for the first cell. It may do the same
with heights.

Another thing you might try is simply use two cells, left and right.
What is it about that top-left cell that requires it to be 20
pixels? if it's a graphic, then you can easily just put the graphic
at the top of a big left-column cell, with everything else below it.

-A
Sep 28 '06 #2

P: n/a
On Thu, 28 Sep 2006, axlq wrote:
I'll answer this before you get a bunch of useless non-answers about
how you shouldn't be using tables for layout.
Tables ought not to be used for layout. It's not just me who thinks
this advice is not "useless".
Tables have a place in layout, especially in cases where CSS fails
to work consistently across browsers.
Tables used for layout cause problems on the web. Who actually cares
about consistency across browsers? Practically no real user is going
to browse the page on several different browsers and award points for
consistency - what the users care about is the content, and when your
table layout gets in the way of their access to that content (e.g
because of a small display area, or a speaking browser if you haven't
thought properly about linearising your tables) they're going to get
annoyed, and rightly so.

With CSS, you can make pages which resemble your concept in the
mainstream situation, but which adapt more gracefully to a wide range
of other browsing situations.
Sep 29 '06 #3

P: n/a
The reason I want to use the table the way it is is because of the
level of importance in each cell. From most to least important it goes
top left cell, right column, bottom left cell. The way the table is
now that is exactly how the content is in the html file. When a search
engine finds the page it looks at it like you would look at it in a
text browser and it flows down the page from most to least important.
If I used two columns it would show up with the bottom left cell coming
before the right column and have a serious impact on the ranking of the
page.

Sep 29 '06 #4

P: n/a
axlq wrote:
I'll answer this before you get a bunch of useless non-answers about
how you shouldn't be using tables for layout.
If you can't make CSS work for layout, learn better CSS (or use the
many examples)

Tables have a place
in layout, especially in cases where CSS fails to work consistently
across browsers.
If a browser wants to get it wrong, leave it to it. These terrible
"failure to work consistently" errors are rarely more than a matter of
a few pixels difference, matters which are simply irrelevant.

Sep 29 '06 #5

P: n/a
In article <Pi*******************************@ppepc20.ph.gla. ac.uk>,
Alan J. Flavell <fl*****@physics.gla.ac.ukwrote:
>On Thu, 28 Sep 2006, axlq wrote:
>I'll answer this before you get a bunch of useless non-answers about
how you shouldn't be using tables for layout.

Tables ought not to be used for layout. It's not just me who thinks
this advice is not "useless".
It's useless for someone who needs to do some layout with tables.
> Tables have a place in layout, especially in cases where CSS fails
to work consistently across browsers.

Tables used for layout cause problems on the web. Who actually cares
about consistency across browsers?
Customers for whom I design web sites. Customers who would rather I
didn't waste my time trying to incorporate workaround hacks to fight
IE's noncompliance with standards. Enough said.

I'm not advocating layout for tables. It's just that I've run
across instances where it's more practical and efficient to make a
simple table than to dick around with a CSS div soup to achieve the
same result.

-A
Oct 2 '06 #6

P: n/a
In article <11**********************@m7g2000cwm.googlegroups. com>,
Andy Dingley <di*****@codesmiths.comwrote:
>If a browser wants to get it wrong, leave it to it. These terrible
"failure to work consistently" errors are rarely more than a matter of
a few pixels difference, matters which are simply irrelevant.
Not with IE's box model - you get far more than a few pixels errors.
I've just about given up trying to support IE's quirks in my pages.
One way to get around it, and have things work correctly in the
two major browsers in use today (IE and Firefox) is to use tables
for some things. I don't like to, I avoid it when possible, but
sometimes you gotta get something done and tables do the job nicely.

-A
Oct 2 '06 #7

P: n/a
axlq wrote:
Not with IE's box model
Then just don't use IE in quirks mode. It's not hard to avoid.

Oct 2 '06 #8

P: n/a
On Mon, 2 Oct 2006, axlq wrote:
In article <Pi*******************************@ppepc20.ph.gla. ac.uk>,
Alan J. Flavell <fl*****@physics.gla.ac.ukwrote:

Tables ought not to be used for layout. It's not just me who thinks
this advice is not "useless".

It's useless for someone who needs to do some layout with tables.
It's quite remarkable the procession of contributors who come to the
WWW authoring groups saying that they "need" this that or the other.

As far as I'm concerned, the "need" in www authoring is to communicate
content nicely to one's end users. All else is secondary to that.
Taking an entrenched position that the solution "needs" a particular
technical solution rates to be a distraction.
Tables have a place in layout, especially in cases where CSS
fails to work consistently across browsers.
Tables used for layout cause problems on the web. Who actually
cares about consistency across browsers?

Customers for whom I design web sites.
They probably think they are doing DTP. It's a pity that there isn't
better education about the nature of the web.
Customers who would rather I didn't waste my time trying to
incorporate workaround hacks to fight IE's noncompliance with
standards. Enough said.
Noted
I'm not advocating layout for tables. It's just that I've run
across instances where it's more practical and efficient to make a
simple table than to dick around with a CSS div soup to achieve the
same result.
OK, that's a better answer.

IE6 doesn't do too badly with standards-conforming web pages if one is
careful to put it into standards mode. I think it's fair to say that
most of its remaining anomalies have well-documented workarounds. So
maybe "dick around with a CSS div soup" is a bit of an exaggeration.

AIUI, the users of IE have a tendency to upgrade to the latest
version, if only in the course of applying security fixes. So I
wouldn't worry too much about the cosmetics of the behaviour of
obsolete IE versions (<=5), so long as they at least give access to
the content. IMHO and YMMV.
Oct 3 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.