Click to See Complete Forum and Search --> : Table layout or CSS layout?


le007
10-11-2006, 11:04 AM
I finally went with trying to learn some css and design a layout using it instead of tables...

I've found problem AFTER problem with it. Either firefox or IE doesn't lay it out properly where as with tables - both work fine!

Can anyone please tell me either how to fix my site to work in firefox or why to bother using CSS AT ALL for layout...

Thanks,
Leo
http://homepage.eircom.net/~egoman/leocss1.html :rolleyes:

Fang
10-11-2006, 11:26 AM
Fix the errors first:
html http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fhomepage.eircom.net%2F~egoman%2Fleocss1.html
css http://jigsaw.w3.org/css-validator/validator?profile=css2&warning=2&uri=http%3A%2F%2Fhomepage.eircom.net%2F~egoman%2Fleocss1.html
Why tables are wrong: http://www.hotdesign.com/seybold/

drhowarddrfine
10-11-2006, 01:38 PM
In addition, do not trust what IE displays. IE is old, buggy and non-standard. Get your page working in Firefox first, then adjust for IEs quirks and bugs.

le007
10-11-2006, 07:15 PM
Thats the thing though...
Whats wrong with the page that it won't display in firefox for me?

drhowarddrfine
10-11-2006, 08:22 PM
Did you design it using IE first?

ray326
10-11-2006, 10:02 PM
Whats wrong with the page that it won't display in firefox for me?A lot of it looks like IE's incorrect stretching of a container by contained floated elements.

le007
10-12-2006, 01:32 PM
Yes I did design it in IE -
very tempted to go back to using html, I really am trying to learn css though and know its the way of the future.

Its just I really can't see whats wrong with the site that it won't just display universally the same :)

ray326
10-12-2006, 01:47 PM
its the way of the future.Well it's actually the way of the present.
Its just I really can't see whats wrong with the site that it won't just display universally the same The books linked in my sig have discussions on that as do A List Apart, Quirks Mode, Blue Robot and other web design sites.

felgall
10-12-2006, 03:11 PM
When creating web pages you should always ignore Internet Explorer until after you have the HTML, CSS, and Javascript working correctly in modern web browsers such as Firefox, Opera, and Safari.

The last thing that you do is to check the page in IE and patch it for those things wich that antiquated browser does not handle correctly. Those patches should be applied using Internet explorer conditional statements in the HTML which other browsers will see as comments.

A page that uses tables for layout will "display" incorrectly in far more browsers than you could possibly achieve using CSS since it will be completely jumbled in all web readers, probably wont fit into PDA screens and may even be too wide to be able to print properly.

dotancohen
10-12-2006, 08:11 PM
In short- don't worry about what you see in the current IE. It's about to replaced with IE7, which will break things in a whole new way.

Use Firefox instead: http://what-is-what.com/what_is/firefox.html

le007
10-12-2006, 09:09 PM
OK cool. Thanks - I have FF already. Wonder what IE7 is gunna be like?

felgall
10-12-2006, 09:18 PM
IE7 has apparently fixed some of the CSS support issues that exist in IE6 so it will come part way between them in what it displays.

Kravvitz
10-12-2006, 10:47 PM
OK cool. Thanks - I have FF already. Wonder what IE7 is gunna be like?
I've had IE7 since shortly after beta2 came out. In my opinion its too little too late. Firefox 1.5 (Mozilla 1.8), Opera 9, and Safari 2 are much better than IE7.

Here's some information about what's been changed for IE7:
Layout Complete Announced at MIX06 (http://blogs.msdn.com/ie/archive/2006/03/23/559409.aspx)
Standards and CSS in IE7 (http://blogs.msdn.com/ie/archive/2005/07/29/445242.aspx)
What’s New for CSS in Beta 2 Preview? (http://blogs.msdn.com/ie/archive/2006/02/02/523679.aspx)
Details on [the] CSS changes for IE7 (http://blogs.msdn.com/ie/archive/2006/08/22/712830.aspx)

plancieri
10-15-2006, 07:19 PM
I think CSS has its place but lets face it as much as we may not like it, it is a windows world and IE will always be the most widely used Browser and will never make itself 100% CSS complient. I will stick with the tables unless someone can really convience. Here is a link I found very interesting

http://www.decloak.com/Dev/CSSTables/CSS_Tables_01.aspx

Kravvitz
10-15-2006, 07:58 PM
Here's a comment on that article:
This statement indicates the author is not sufficiently adept at writing well structured, well formed and semantic html + css to be taken seriously.

Only beginners replace tables with divs. The purpose of ridding yourself of table based layouts is to free yourself to write properly marked up content. Tables used for layout are neither well structured nor semantic. Simply replacing them with divs is idiotic.

The author's other statements are no less imbecilic, completely ignorant of the power of selectors, inheritance and the cascade.

So, no. The article has no credibility. Ignore it.
Learning how to make layouts with semantic X/HTML and CSS instead of tables does take some effort, but most worthwhile things do.

I suggest you learn how semantics apply to X/HTML. (http://www.dynamicsitesolutions.com/html/semantics/) Semantics is really a very important subject when it comes to X/HTML.

If you haven't already read these, I suggest you read them now, since you seem to be unconvinced.
Why tables for layout is stupid: problems defined, solutions offered (http://www.hotdesign.com/seybold/index.html)
Ten ways to speed up the download time of your web pages (http://www.webcredible.co.uk/user-friendly-resources/web-usability/speed-up-download-time.shtml)
Nested Tables: About the (ab)use of tables as layout tools in webpages. (http://www.dorward.me.uk/www/nested/)
Why Tables Are Bad (For Layout) Compared to Semantic HTML + CSS (http://www.phrogz.net/CSS/WhyTablesAreBadForLayout.html)
Why go table free? (http://www.workingwith.me.uk/tablefree/why/)
Why avoiding tables (for layout) is important (http://davespicks.com/essays/notables.html)

plancieri
10-15-2006, 08:17 PM
Thank you, I am a old developer and need to learn alot more then I thought, Thanks I will posting alot for help though!! Hope no one minds :confused:

le007
10-15-2006, 09:55 PM
Ok mate I'll read all those articles - throw together what I can and get back to you tomorrow nite (GMT TIME) - I'm back living in Ireland!