FRIHOSTFORUMSSEARCHFAQTOSBLOGSCOMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Page columns: tables or no tables?






Do you use tables to split web pages into columns?
Yes
42%
 42%  [ 3 ]
No
57%
 57%  [ 4 ]
Total Votes : 7

sush
Hi,

I've been reading around and it seems the trend in keeping with the times is to avoid tables for splitting pages into columns. A lot of the blog templates I've seen use DIVs and absolute positioning (something I never liked in favour of compatibility).

A template I'm working on (http://sush.frih.net) is a two-column (content/nav) theme but uses tables. I want to try that without the tables.

Could anyone please illustrate how this is done with an example?

Thanks a lot,
Sushant
LukeakaDanish
sush wrote:
Hi,

I've been reading around and it seems the trend in keeping with the times is to avoid tables for splitting pages into columns. A lot of the blog templates I've seen use DIVs and absolute positioning (something I never liked in favour of compatibility).

A template I'm working on (http://sush.frih.net) is a two-column (content/nav) theme but uses tables. I want to try that without the tables.

Could anyone please illustrate how this is done with an example?

Thanks a lot,
Sushant


DIVS are VERY "compatible" - infact, I think they behave more consistently cross-browser than tables.

How to do it?

You dont need absolute positioning, thats definate.

Two collumn layout:

Code:

<div style="width: 50%; float: left; background-color: red;"></div>
<div style="width: 50%; float: left; background-color: blue;"></div>


...as there is no content inside the <div>'s at the moment, they wont appear, however as soon as you add content they're good to go Smile

If you want equal height collumns, its probably easiest to stick with tables. There are solutions like this one, however they use some slightly more complex css, and if your not elite, they may not be the best solution.


- Hope that helped Smile
agente_naranja
The problem with tables...the whole content must be downloaded before anything shows on the table
The problem with CSS...incompability and wrong display in different browsers
The solution...mix a little of both Smile
LukeakaDanish
agente_naranja wrote:

The problem with CSS...incompability and wrong display in different browsers


Thats is SO wrong! Css is no worse than tables - infact, its better for compatibility! - also you actually get control! Learn to use css only - thats my recomendation - and i promise you wont regret it!
agente_naranja
What im trying to say is that even if CSS is great (i have to admit it), is pretty complicated to design a cross-browser web site, because there is diferent behavior going on for equal CSS instructions.
Of course, this is a problem of the browsers and not CSS. In fact i use very little table code and a lot of CSS. Is hard to use at first, because some things get overlaped...but it works very good.
On the other hand, if you wanna have a web site that you can ensure (at 100%) wont be looking all weird in some web browsers, you will probably have to be a CSS expert or use a table instead.

In conclusion: Css is great and it makes web design a lot easier. But sometimes you have to use another tools to get your site working.
LukeakaDanish
Hm...i agree css looks different in different brownsers and that you have to be clever to code around it.

However, tables are just as bad. In the time when I used tables (ages ago) I always designed for IE. because that was the only thing i could do - tables look different in different browsers just as much as css (or possibly more)
purcebr
it's easy to make a mistake using tables. Css probably a better choice
marixworld
sush wrote:
Hi,

I've been reading around and it seems the trend in keeping with the times is to avoid tables for splitting pages into columns. A lot of the blog templates I've seen use DIVs and absolute positioning (something I never liked in favour of compatibility).

A template I'm working on (http://sush.frih.net) is a two-column (content/nav) theme but uses tables. I want to try that without the tables.

Could anyone please illustrate how this is done with an example?

Thanks a lot,
Sushant


There are lot of websites out there offering free CSS tutorials. You can try htmldog.com or w3schools.com, both had been my guide on learning html and CSS.

Also, try to avoid absolute positioning with you website, it will only look good at maximized windows but when you resize your window, it seems that a typhoon has pass by your lay-out.
Dragonfly-online
Sure, you could use CSS to make the whole column layout thing, but that would require a little more learning, but, if you arent very experienced at coding, you could easily use borderless tables to code a page, its so much easier, but if you use CSS, then its somewhat more reliable.
Related topics
Creating Table in HTML
Shouldn´t I use frames?
web design and site optimisation tips
What is a site without tables?
Problem with Table {HTML}
Is CSS a replacement of tables or assisting method of them ?
[urgent] unknown error
Table Positioning
Table Help / Javascript dopdown menu
HTML tables with irregular rows and/or columns
What's the best for page layout? CSS or using Tables?
Css- 2 equal columns in Explorer
CSS and centered columns
Why don't people like tables?
Reply to topic    Frihost Forum Index -> Webmaster and Internet -> Design Tips

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.