Using Tables for Layout

H

Hiroshi Satori

I have been putting together a website for a business, and I've run into a
few problems with getting my tables used for layout to render properly in a
few browsers (as always), namely Mozilla, IE, and Opera.

On the left side of the page, I require several table rows for the
navigation bar; the center, of course, contains the content of the page, and
thus should span as far as it needs to fit all of its text, resizing the
navigation bar along with it.

The method that I always use and highly prefer is that of using a nested
table to achieve this effect. It's easier to read code-wise and makes sense
to me. The middle part of the page consists of two table cells: the first
with a nested table (a cell of which stretches to the height of the content
cell) which holds the links
for the navigation bar and the rest of the left side of the page; the second
with the content.

Of course, in order for the nested table to fill all the area in its
surrounding cell, it's width and height must be set to 100%, as tables
generally size themselves enough to fit the stuff they hold.

This works perfectly in both Mozilla and IE, but not in Opera. It seems that
Opera doesn't much care for the height="100%" setting (or any percentage for
the height attribute, for that matter). And as the HTML spec defines width
and height as deprecated, I decided to try and find a different way to
accomplish this.

I tried using rowspan for the part of the layout like the content cell
described above; again, worked exactly as I had intended in Mozilla and IE,
but not in Opera. Apparently, if you use this method, Opera will always
stretch the last row of those that are spanned to fit the height of the cell
that is spanning them. Even if you specify heights for all but one (leaving
that one to be stretched), Opera will still stretch the last cell.

Which is the better method to employ: nested tables or rowspans? Or is there
another method that is made with enforced standards? How can one get the
same rendering in Opera?
 
D

Davmagic .Com

From: (e-mail address removed)
(Hiroshi Satori)
I have been putting together a website for
a business, and I've run into a few
problems with getting my tables used for
layout to render properly in a few
browsers (as always), namely Mozilla, IE,
and Opera.

Perhaps a different layout: http://davmagic.com/PAGES47.html

Web Design-Magic-Painting-Junking-Games
http://www.davmagic.com
Paint A House
http://www.paintahouse.com
Note: My email is ALWAYS Full to avoid SPAM... you can Contact me via my
websites...
 
D

derefed

Thanks for the tip ... never knew that CSS could be used for that.

--derefed (Hiroshi Satori)
 
C

Cameron

Mark said:
Your loss.

Nah, not really, this means people with browsers that don't support CSS
can still view my website as I intended, and I wont list the numerous
big sites that use tables for layout again.

~Cameron
 
B

Barefoot Kid

| Hiroshi Satori wrote:
| > I have been putting together a website for a business, and I've run into a
| > few problems with getting my tables used for layout to render properly in a
| > few browsers (as always), namely Mozilla, IE, and Opera.
|
| That's what happens when you use tools for something they aren't
| designed for. http://allmyfaqs.com/faq.pl?Tableless_layouts

thats wot happens when u dont have enuff experience with tables
 
W

Whitecrest

That's what happens when you use tools for something they aren't
designed for. http://allmyfaqs.com/faq.pl?Tableless_layouts

You know, the example and demos are pretty bland, and not well known
sites.

Someone needs to create something earth shattering interesting (read
that as not bland) layouts using CSS. then people will convert. Right
now the sites all look like dodoo (YMMV)
 
L

Leif K-Brooks

Cameron said:
Nah, not really, this means people with browsers that don't support CSS
can still view my website as I intended

But blind people won't be able to use your site.
, and I wont list the numerous big sites that use tables for layout again.

If a big site jumped off of a bridge, would you?
 
C

Cameron

Mark said:
Will email them and ask them to then. :)

Whoops, better clarify that. I meant ask them to redo their site with
CSS, not jump off a bridge.

Nope :p

~Cameron
 
D

derefed

Barefoot Kid said:
| Hiroshi Satori wrote:
| > I have been putting together a website for a business, and I've run into a
| > few problems with getting my tables used for layout to render properly in a
| > few browsers (as always), namely Mozilla, IE, and Opera.
|
| That's what happens when you use tools for something they aren't
| designed for. http://allmyfaqs.com/faq.pl?Tableless_layouts

thats wot happens when u dont have enuff experience with tables
---------------------------------------------------
Hung Diep
New Media Designer
www.intro-spect.co.uk
0795 6576 319

Oh, I have plenty of experience with tables ... but does Opera care?
Noooo... ;)

--derefed
 
C

Chuck

Eph, I'm still going to be using tables for now.
his choice

I used tables with CSS, just to piss people off. :)

-Chuck. (www.wormspeaker.com)
_____________________________________________________
Spread love and understanding...
but don't be afraid to bloody your knuckles doing it.
-Alex Ross
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top