|
|
|
|
![]() ![]() |
Apr 25 2005, 09:50 PM
Post
#1
|
|
|
Member [ Level 1 ] Group: Members Posts: 34 Joined: 25-April 05 From: San Diego, California Member No.: 4,345 |
I have heard that using tables for layout in a webpage is bad style. It is possible, but much more of a hassle, to get the same results using CSS (float), but is using float in this way really better style than tables? Most websitesstill use tables.
Please give me your opinion, or the "general" opinion uif you think you know it, I'm curious, and can't decide which way yo go. |
|
|
|
Apr 25 2005, 10:51 PM
Post
#2
|
|
|
Member [ Level 2 ] Group: Members Posts: 51 Joined: 16-April 05 Member No.: 4,048 |
Yes, you are right.
Using HTML TABLEs for lay-out is now considered bad style. Yes, you are right. Getting the same results using CSS is much more of a hassle. At least when confronted with it for the first time. But, as always, as more and more people do it, as more and more programs generate it, the use of HTML TABLEs will drop for lay-out and will continue to be used for what they were invented for: the presentation of tabular data. In my opinion, CSS is the way to go. Personally, I still have troubles with them, so any help that I can find is welcome... |
|
|
|
Apr 26 2005, 12:07 AM
Post
#3
|
|
|
Demonic Enforcer Group: [HOSTED] Posts: 597 Joined: 2-March 05 From: Belgium Member No.: 2,861 |
Well, I have to admit that I did use tables to generate my lay out. Mainly because it was the first time using tables to put a graphic up
I do want to add, that not all broswers support all CSS2 features (IE is the browser I am reffering to of course). This is the case with the a:hover effects in a nested list for example. (To create pop out effects like the ones you get with JavaScript, but then without JavaScript) |
|
|
|
Apr 26 2005, 12:24 AM
Post
#4
|
|
|
Member [ Level 1 ] Group: Members Posts: 34 Joined: 25-April 05 From: San Diego, California Member No.: 4,345 |
I already know how to do it in CSS, I was only wondering if it was teh way to go or not.
This might not be the best way to do it, but I see no other way. To get a layout like this (the different numbers designate what would be cells in a table): 00000000000000000000 00000000000000000000 11122222222222222222 11122222222222222222 11122222222222222222 11122222222222222222 11133333333333333333 11133333333333333333 44444444444444444444 44444444444444444444 These are th divs you will need (DIV1, DIV2, etca re just names for referencign here, you don't need to use those names of course): DIV1 -- for the top, no nesting, no positining DIV2 -- will contain areas 1, 2, and 3, no positioning DIV3 -- for area 1, nested in DIV2, float left DIV4 -- will contain areas 2 and 3, nested in DIV2, float right DIV5 -- for area 2, nested in DIV4, no positioning DIV6 -- for area 3, nested in DIV4, no positioning DIV7 -- for area 4, no nesting, no positioning no positioning means no special horizontal positioning, you may need to have some settigns that will keep them from moving around vertically. Hope that helped! |
|
|
|
Apr 26 2005, 01:02 AM
Post
#5
|
|
|
Member [ Level 1 ] Group: Members Posts: 49 Joined: 1-April 05 Member No.: 3,473 |
QUOTE(eyvind @ Apr 25 2005, 04:50 PM) I have heard that using tables for layout in a webpage is bad style. It is possible, but much more of a hassle, to get the same results using CSS (float), but is using float in this way really better style than tables? Most websitesstill use tables. Please give me your opinion, or the "general" opinion uif you think you know it, I'm curious, and can't decide which way yo go. I found an article that talks about the tables vs. CSS dilemma, it describes briefly the evolution of the website design in the last time and, most interesting, the author explains the experiment he made to find out which option outcome better: http://www.sitepoint.com/article/tables-vs-css I hope it can help you clarify which way is better for you. |
|
|
|
Apr 26 2005, 02:24 AM
Post
#6
|
|
|
Member [ Level 1 ] Group: Members Posts: 34 Joined: 25-April 05 From: San Diego, California Member No.: 4,345 |
Cool, thanx Coach! That did help, I have now set my mind to using CSS.
I ahve alsready tried the above solution, adn it works well, but I need to handl some special cases, which I do in PHP. IT works great! But that article jsut amde things so much better, tahnx again Coach!!! |
|
|
|
| twitch |
Apr 27 2005, 05:20 AM
Post
#7
|
|
Guests |
You are right, but I can not stand floating layers with CSS. They always manage to go wrong. And what exactly are the problems with using tables? I have only found small errors when using the box-model, of which I don't use. I think it is just another reason for the W3 to bossing us around. Well no more I say.
|
|
|
|
Apr 28 2005, 06:38 AM
Post
#8
|
|
|
Member [ Level 2 ] Group: Members Posts: 55 Joined: 25-April 05 Member No.: 4,347 |
QUOTE(twitch @ Apr 27 2005, 03:20 PM) You are right, but I can not stand floating layers with CSS. They always manage to go wrong. And what exactly are the problems with using tables? I have only found small errors when using the box-model, of which I don't use. I think it is just another reason for the W3 to bossing us around. Well no more I say. I totally agree. I've used both CSS and tables to create site structure, and not only does it take me 50% less time to make a site with tables, but also, i find that tables don't generate nearly as much errors as floating layers with CSS does. I've worked with websites for quite some time now, and it's true that either way works, but I don't see any advantages of using CSS instead of simple tables. I guess it depends on how comfortable people are with either one. Personally, I've never had problems when using tables, but always seem to get at least some sort of error or problem when structuring with CSS. So naturally, tables is what i choose to use. That's my opinion. |
|
|
|
Apr 28 2005, 08:39 AM
Post
#9
|
|
|
Member - Active Contributor Group: Members Posts: 93 Joined: 21-March 05 Member No.: 3,136 |
So, It is apparently that using tabled-layout is easier. I usually use CSS for fancy things like theme styles... In this case, CSS does much better and much more flexible.
In my opinion, for the basic web page structure, tables are more likely compatible with all existing browser. I found my pages are displayed differently from one browser to the other when I use CSS style (positioning, margin,...). Some CSS attributes work in this browser but the others. Have you ever tried to view your web pages in several browsers? Do it and see how good your design skill is. Let's consider M$ Internet Explorer, FireFox, Netscape, Opera, Linux browsers (Konkeror, FireFox, Netscape...)... and even Safari on Mac. I have been struggling with my project just because of these browsers. People in my company are using different platforms and different browsers. LOL, each of them complains to me about my pages very very differently. What a shame!!! The more complex is your page, the more likely that compatibility problems will arise Keep it simple as long as it works for everyone (even though it is not a good style) |
|
|
|
Apr 28 2005, 11:07 AM
Post
#10
|
|
|
Premium Member Group: Members Posts: 218 Joined: 14-March 05 From: Singapore Member No.: 3,041 |
Reading through the comments of the link that Coach posted is another very interesting link on this subject, where the author attempts to take an objective look at tables and CSS, this time, advocating that tables should be used side by side with CSS. It's an interesting read, at least, and gives some form of hope to people still wanting to use tables...
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 14th October 2008 - 12:59 PM |