|
css on tables? that's crazy
06-22-2008, 11:08 PM
|
css on tables? that's crazy
|
Posts: 2
Name: joseph haah
|
should I be using CSS if i have tables. I thought we can only use with divider tags and on special occassions C++ websites...
any ideas?
|
|
|
|
06-22-2008, 11:28 PM
|
Re: css on tables? that's crazy
|
Posts: 20
Name: Mason
|
i think it depends. If I'm not mistaken strict xhtml doesn't validate certain table attributes like height. If you are coding according to this then you would have to put those attributes in a CSS to validate. Validate your pages and see if that holds true for your chosen doctype.
|
|
|
|
06-23-2008, 08:45 AM
|
Re: css on tables? that's crazy
|
Posts: 119
|
you can also use style tags
style=" height: NNpx; width: NNpx;"
|
|
|
|
06-23-2008, 09:43 AM
|
Re: css on tables? that's crazy
|
Posts: 10,016
Location: Tennessee
|
There is absolutely nothing wrong with using CSS to style tables for DATA - they should never be used for LAYOUT.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
06-23-2008, 10:39 AM
|
Re: css on tables? that's crazy
|
Posts: 49
Name: Minsky
Location: UK
|
Quote:
Originally Posted by LadynRed
There is absolutely nothing wrong with using CSS to style tables for DATA - they should never be used for LAYOUT.
|
That's a fine statement to make (and I'm sure you're right) if you are skilled in CSS, but if like me you only play at web design then tables with CSS makes life very easy.
I've not mastered layout with CSS yet, although I am improving.
__________________
Never argue with a fool. They will drag you down to their level and then beat you with experience.
|
|
|
|
06-23-2008, 10:58 AM
|
Re: css on tables? that's crazy
|
Posts: 58
Name: Bryan
Location: Wisconsin
|
Even if you just play around with web design it will be a big improvement and help if you start to branch away from table design. I know it gets to be a habit and a routine, but you really need to start going tabless.
|
|
|
|
06-23-2008, 11:08 AM
|
Re: css on tables? that's crazy
|
Posts: 20
Name: Mason
|
Quote:
Originally Posted by LeetPCUser
Even if you just play around with web design it will be a big improvement and help if you start to branch away from table design. I know it gets to be a habit and a routine, but you really need to start going tabless.
|
Everyone has been saying this since the hard push to web 2.0 however it has not been prove to any extent at all that it affects Search Engine Optimization. As long as your pages are validating and it doesn't have those really old table borders enabled it shouldn't really matter if you have tables or not for layout.
I think its more important to code how you are comfortable. If the site you are designing doesn't require a lot of fluid layout a table might work just fine especially like our friend here said they are just dabbling.
I personally do like the table-less layouts better but they aren't necessary to have a successful website. Just my 2 cents.
|
|
|
|
06-23-2008, 11:24 AM
|
Re: css on tables? that's crazy
|
Posts: 49
Name: Minsky
Location: UK
|
Quote:
Originally Posted by LeetPCUser
but you really need to start going tabless.
|
Can't you get arrested for that?....
But seriously. I really can't invest the time and effort to learn new tricks at my age. If I relied on it as a living then it'd be a different story, but as things are it's only a hobby for me.
I've heard this argument a million times on various forums, but never have I seen anyone say WHY. My argument is "if something works it isn't broken. If it's not broken, don't fix it".
I know. I'm a neanderthal.
Incidentally. My pages do validate on W3C.
__________________
Never argue with a fool. They will drag you down to their level and then beat you with experience.
Last edited by minsky; 06-23-2008 at 11:27 AM..
|
|
|
|
06-23-2008, 12:17 PM
|
Re: css on tables? that's crazy
|
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
Once you go tableless, you'll never go back. 
Seriously, I don't want to waste my breath, but developing sites without using tables is actually much EASIER once you invest a little time and effort in learning how the rules work.
I don't know why everyone thinks it is so hard, or somehow more difficult than learning how tables work. It also takes time and effort to learn how to make table-based layouts, so I don't understand why anyone would consider learning it this way, when CSS-box-model layouts are capable of so much more.
|
|
|
|
06-23-2008, 04:42 PM
|
Re: css on tables? that's crazy
|
Posts: 57
Name: Jesse
Location: Phoenix, AZ
|
Generally, most tables Ill end up using, I style the cell container.. and treat it just like any other blocking element in CSS.
so absolutely you should use CSS with tables.. For data OR layout..
|
|
|
|
06-23-2008, 06:10 PM
|
Re: css on tables? that's crazy
|
Posts: 10,016
Location: Tennessee
|
There are a lot of reasons NOT to use tables for layout, even if your 'just dabbling'. I've been building web sites for more than 10 years, I've BEEN there with tables, and I've also been thru the stress of having to maintain and change the beasties. It is SO much easier to maintain and change a css-based site, I can literally change the look of an entire site by changing ONE file - the css file. And, as Wayfarer mentioned, you can do SO much more once you shed the tables.
As for the whys of not using tables for layout, some industry gurus put it out there better than I could: http://www.hotdesign.com/seybold/everything.html
Minsky - age has nothing to do with it. I'm not exactly a spring chicken myself 
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
06-23-2008, 08:12 PM
|
Re: css on tables? that's crazy
|
Posts: 49
Name: Minsky
Location: UK
|
LadyinRed, that looks like an interesting bit of reading, thanks. I've saved it to favourites to read later. It's a bit long to read in between posts.
However, there are two arguments going on here and I don't want to hijack the thread. The OP didn't ask IF he should use tables or not, he asked:
Quote:
Originally Posted by crazywebguy
should I be using CSS if i have tables.
|
I think everybody would answer that with a " yes". Using CSS with tables makes the tables a lot more versatile.
You also said:
Quote:
Originally Posted by LadynRed
I can literally change the look of an entire site by changing ONE file - the css file.
|
I can do that with tables too. I use external CSS files to style the tables. If I change the CSS file the whole site responds. Mind you, CSS would be a lot more versatile in itself if it allowed the inline use of variables. Just imagine if you could replace "border: 1px solid #000000;" (which you might use 50 times in a single CSS file) with a variable something like "border: <@border-color>;". Then again, that's a whole different thread....
I'm not saying you're wrong, I'm just suggesting there are two sides to this story. Never the less, I'm willing to give your way a try.
__________________
Never argue with a fool. They will drag you down to their level and then beat you with experience.
|
|
|
|
06-23-2008, 09:52 PM
|
Re: css on tables? that's crazy
|
Posts: 10,016
Location: Tennessee
|
Quote:
|
I can do that with tables too. I use external CSS files to style the tables.
|
To some degree, yes. However, you cannot change the layout of an entire site with css and tables because you have to go in and adjust the tables on every single page. I could literally change the layout of an entire site by changing just the CSS. Have a look at csszengarden.com - it is a perfect example of just that - same html file for every layout - different CSS - many, many different looks.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
06-23-2008, 10:32 PM
|
Re: css on tables? that's crazy
|
Posts: 57
Name: Jesse
Location: Phoenix, AZ
|
Quote:
Originally Posted by LadynRed
To some degree, yes. However, you cannot change the layout of an entire site with css and tables because you have to go in and adjust the tables on every single page. I could literally change the layout of an entire site by changing just the CSS. Have a look at csszengarden.com - it is a perfect example of just that - same html file for every layout - different CSS - many, many different looks.
|
See to me, I see that as an implementation problem. I can change an entire site with a single page layout too.. its called using some sort of template mechanism. I mean I dont think Ive worked on many "big" sites that are just a bunch of disperate html files..
So its great that you can change the position of the 100, 1000, 50 whatever web site pages by changing a single CSS file, but what about the common banner? what about ads? Labels and other things? I mean are you going through and manually cutting and pasting markup for reoccuring site elements in EACH of those pages? If so.. CSS guru or not, I feel for you.. I think that is where most large sites that have many pages and carry a consistent theme, generally should be run by some CMS type system.. at the very least a "master page" system similar to what you see in ASP.NET or Java Server Faces.
That is the true way to separate your layout from your content. Otherwise, your managing CONTENT in your CSS as well as layout.
|
|
|
|
06-24-2008, 01:01 AM
|
Re: css on tables? that's crazy
|
Posts: 3,985
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
No one is saying that an entire site can, or should, be managed with CSS alone. I think she is just illustrating the dynamic power of CSS in a layout, and how it can be used to affect a site with broad strokes, which is what we want. Obviously, for the issues you mentioned, a templating system usually comes into play.
I work almost exclusively with PHP generated sites. In my sites, the header file is shared throughout most of the pages (except for usually the homepage), and is the heart of the application, containing much shared data. Other shared files are the footer, and sometimes a sidebar.
The entire site always should have a wrapper on it, which is, of course controlled with CSS. Usually all of the pages on my sites have one master.css file, which is shared with every page, and thus cached. Sometimes pages will have individual CSS files, which I sometimes generate with PHP, so that it can be kept in one place.
Javascript, also, has a special relationship with CSS on my sites. Style and behavior are closely related from my perspective. Javascript is also used to generate and affect CSS, change classes, and in general, put frosting on the cake.
I consider myself to be a developer, not really a designer. More specifically, I am a front-end developer, although I do many functions on a day to day basis. Because I specialize in the front end, I see things in a very different way than many people, just as a back-end developer may see things in terms of database relations.
It is frustrating sometimes to see the same issues coming up again and again. The adage "if it ain't broke" doesn't apply here, because it IS BROKE. The web isn't a very evolved development platform, and CSS isn't perfect either. It a fragile system, and probably will have to be replaced eventually. But it is light years ahead of table based layouts. 
Last edited by wayfarer07; 06-24-2008 at 01:08 AM..
|
|
|
|
06-24-2008, 05:39 AM
|
Re: css on tables? that's crazy
|
Posts: 49
Name: Minsky
Location: UK
|
For those in favour of pure CSS, you are indeed putting forward some very compelling arguments. However, I still have to weigh off the cost (in time, not money) I would need to become skilled enough to warrant a complete changeover. That's not to say I won't invest the odd hour here and there to test the water. I envy those of you who can program to such a skilled level.
The CSSZenGarden does show some beautiful displays, but the first example seems to have a serious scrolling problem.
http://csszengarden.com/?cssfile=/213/213.css&page=0
I viewed it on a 2.6GHz Pentium machine and the scrolling was slow and very lumpy. The rest were OK though.
Whenever I see a really well programed site (like the BBC or CNN as a couple of examples) I also realise they are backed by a huge team of designers and developers.
Wayfarer is right, the web is a very evolved place. For companies, or even individuals who rely on their skills to make money, I see the need to keep up, but there will always be people like me who just don't have the resources to evolve at the same speed.
I do this more as a hobby from home in my spare time and have nobody to fall back on when I need help. If I have a problem I have to go to a website like W3schools or come into a forum like this and ask my newbie questions in order to learn. A very time consuming pastime.
[EDIT] Something really odd about that csszengarden site. If I use the link I posted above everything is OK but if I use the menu link inside the site the scrolling is awful. Any explanations for that?
[UPDATE] Ahhhh. It only seems to play up when viewed in Firefox.
__________________
Never argue with a fool. They will drag you down to their level and then beat you with experience.
Last edited by minsky; 06-24-2008 at 08:18 AM..
Reason: New info
|
|
|
|
06-24-2008, 09:41 PM
|
Re: css on tables? that's crazy
|
Posts: 10,016
Location: Tennessee
|
Quote:
|
I mean are you going through and manually cutting and pasting markup for reoccuring site elements in EACH of those pages?
|
Not at all, but then I don't do sites that use ads and banners and such, at least not for my day-to-day job. If I DID have to do such a thing, and we are a MS shop, we would indeed be using server-side includes and master pages for those sorts of 'mundane' and repetitive things. Our intranet uses SSI and it works very handily, and we have over 5,000 pages.
We have a site that we're taking over that WAS a cold fusion site. We can't use CF, so we are going to set that one up with master pages because that's basically how the site was set up under CF.
On CSSZengarden: interesting, I hadn't been over there in a while, didn't see that page you linked to.. very cool ! I'm using FF2 at home and there is no problem with the scrolling though, have to check it at work with FF3 and see.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
06-25-2008, 04:35 AM
|
Re: css on tables? that's crazy
|
Posts: 49
Name: Minsky
Location: UK
|
Quote:
Originally Posted by LadynRed
On CSSZengarden: interesting, I hadn't been over there in a while, didn't see that page you linked to.. very cool ! I'm using FF2 at home and there is no problem with the scrolling though, have to check it at work with FF3 and see.
|
Very strange, it's still doing it for me. I'm using FF2 as well. This is what happens.
1) I typed the address into the address bar to get there.
2) when on the main page, the first option on the right menu is called "Under the Sea". Click it.
3) Scroll down the page. The scrolling is very slow and takes ages to catch up.
It only happens to me on "Under the Sea", not on any of the other designs.
It's fine in IE. The difference in display layout between IE and FF is the bottom image (a pic showing multiple ships). In IE you have to scroll to the bottom of the page to see the image, wheras in FF the image is visible all the time. It sits at the bottom of the screen and the rest of the page scrolls in from behind it.
It's not important, it just caught my curiosity.
Incidentally, I like the way that bottom pic remains fluid regardless of the screen width. I have to admit, I couldn't do that with tables.... 
__________________
Never argue with a fool. They will drag you down to their level and then beat you with experience.
|
|
|
|
|
« Reply to css on tables? that's crazy
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|