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,
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:
...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
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
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
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!
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.
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)
it's easy to make a mistake using tables. Css probably a better choice
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.
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.