View Full Version : Crunched up tables


ElderShadow
01-06-2004, 12:23 AM
http://www.freewebs.com/esigs/
why are my left and center tables crammed together? and why does my center table go straight down instead of across?

Lissa
01-06-2004, 01:23 PM
Posted by Jamslam:

You might want to clean up your source code a little bit.. you have two body tags, and i found no closing </table> tags in there...

But to answer your question...

A table is a block level element. What does that mean? It means it automatically puts a space above and below itself, whereas an inline element (such as any font formatting tag, or the <span> tag) has no space around it. So imagine a block level element, spanning across the page, then nothing else can go there.

So there a few ways of going about this...

You can either use even more tables, which isn't recommended by any means, or use CSS float property... or what seems to be the buzz around here, you can position things.

However, considering you current source, your best bet would to just put the tables inside tables. But just make sure you be more careful when coding, because that could be the fault of some errors

Something weird happened with his post, don't ask me what ;)


Anyways:

http://www.freewebs.com/esigs/
why are my left and center tables crammed together? and why does my center table go straight down instead of across?

Run your site through here:

http://cgi.w3.org/cgi-bin/tidy

and it will fix all your tables, you're missing quite a few tags.

Thox
01-06-2004, 03:35 PM
To avoid the nested tables approach (tables within tables), it would be best to simply add more cells into the existing table. This makes the site easier to work with and reduces the amount of code.

It's bad enough having one table on a website, but more than one would just be silly :)

ElderShadow
01-10-2004, 03:23 PM
ok thank you ^^