Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 28th, 2006, 09:25 PM
sethp@enablearning.com
Guest
 
Posts: n/a
Default table layout

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>

  #2  
Old September 29th, 2006, 12:35 AM
axlq
Guest
 
Posts: n/a
Default Re: table layout

In article <1159475822.848803.211880@h48g2000cwc.googlegroups .com>,
<sethp@enablearning.comwrote:
Quote:
>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.
Quote:
>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
  #3  
Old September 29th, 2006, 01:45 AM
Alan J. Flavell
Guest
 
Posts: n/a
Default Re: table layout

On Thu, 28 Sep 2006, axlq wrote:
Quote:
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".
Quote:
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.
  #4  
Old September 29th, 2006, 02:45 PM
sethp@enablearning.com
Guest
 
Posts: n/a
Default Re: table layout

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.

  #5  
Old September 29th, 2006, 04:05 PM
Andy Dingley
Guest
 
Posts: n/a
Default Re: table layout

axlq wrote:
Quote:
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)

Quote:
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.

  #6  
Old October 2nd, 2006, 05:05 PM
axlq
Guest
 
Posts: n/a
Default Re: table layout

In article <Pine.LNX.4.64.0609290149010.23181@ppepc20.ph.gla. ac.uk>,
Alan J. Flavell <flavell@physics.gla.ac.ukwrote:
Quote:
>On Thu, 28 Sep 2006, axlq wrote:
>
Quote:
>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.
Quote:
Quote:
> 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
  #7  
Old October 2nd, 2006, 05:15 PM
axlq
Guest
 
Posts: n/a
Default Re: table layout

In article <1159542822.197377.170620@m7g2000cwm.googlegroups. com>,
Andy Dingley <dingbat@codesmiths.comwrote:
Quote:
>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
  #8  
Old October 2nd, 2006, 05:25 PM
Andy Dingley
Guest
 
Posts: n/a
Default Re: table layout

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

  #9  
Old October 3rd, 2006, 10:15 AM
Alan J. Flavell
Guest
 
Posts: n/a
Default Re: table layout

On Mon, 2 Oct 2006, axlq wrote:
Quote:
In article <Pine.LNX.4.64.0609290149010.23181@ppepc20.ph.gla. ac.uk>,
Alan J. Flavell <flavell@physics.gla.ac.ukwrote:
Quote:

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.
Quote:
Quote:
Quote:
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.
Quote:
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
Quote:
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.
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles