Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How far does it go? 1

Status
Not open for further replies.

skiflyer

Programmer
Sep 24, 2002
2,213
US
Just wondering, how far do people experienced with CSS take it? I'm still new to it, and am not sure of all the proper applications, specifically for positioning.

Currently I'm designing a relatively in depth personal information page. Not just name, email, phone... maybe 30 or so fields, plus their labels.

Now, at first glance this seems like a natural application for a table, but then I'm wondering if maybe this is a good place for CSS? Is the positioning good for something like that, or would it be tedious and overkill?

-Rob
 
You could use CSS to produce this page. The main difference I've come across between CSS and table layouts is that CSS layouts can be slightly more flexible if you want to rearrange parts of your site

MrBelfry
 
Tables do have my vote
CSS can still be not delivering up to expectations in a few situations
although I extensively use it within tables
but not for positioning
further if you are working on a personal doc... I will not take a chance.
To obtain a quick "mini CMS" (for your only CMS use)on your own site and not using a DB
I will use a .shtml extension and feed your doc with includes

cheers

 
A good way to see how far you can go with css is to look at:
This site demonstrates css by examples of differant css style sheets applied to the same html. Look carefully at several differant examples. The html is exactly the same, but with css the look and layout is completely differant.
 
Personally, I'm waiting for CSS to be correctly implemented by the leading browser(s) before switching to using it for layout. I currently use it for presentation, and it is excellently supported for that.

The problem is that the new versions of IE still don't correctly implement CSS for layout - to get it to work you have to use a few workaround 'hacks'. Possibly IE 7 might fix this (if they ever release another IE) ..

Ah well, at least it works really well for presentation. (..and layout too if you use the workarounds - see that zen garden link).

Posting code? Wrap it with code tags: [ignore]
Code:
[/ignore][code]CodeHere
[ignore][/code][/ignore].
 
When given the choice (which is rare in a realworld environment) I take CSS all the way using tables ONLY for tabulating data and CSS positioning of divs and spans for everything else.
Of course no use at all of <b><u><i><font> etc. etc. etc.
 
Sure, but as one of those sites pointed out, form fields lie in an interesting inbetween... depending on how you lay it out, you could consider it tabular data.

I'm still torn, given the importance of this project I think I'm going to just have to go all the way with both solutions and see which I think looks better and is easier to maintain.

I greatly appreciate the resources provided, is helping me make a much more informed decision.

-Rob
 
It's a myth to think that html tables can only be used for data. There's nothing wrong with using tables for menu systems (even the W3C do that) or page layouts. tables were not designed for layouts but there has never been a suitable alternative and currently CSS falls short of being able to replace tables. Also, there are only a few negatives against using tables for layouts, they are still the best tool for the job.

Don't push yourself to do complicated things in css unless or really want to or have the resources to test in different browsers/platforms.







- É -
 
The problem with using tables for layout is that you loose the flexibility CSS offers to change that layout.
I agree CSS positioning isn't as easy as defining a few nested tables, but maintaining nested tables (ever tried 5 levels deep?) can be a nightmare.
 
Cian,

That's pretty much where I'm standing right now as well. I have copious experience laying out with tables for small sites where function is key, or where I just want to put something out now. But I'm undertaking a significant project here, and want to make sure I'm doing it &quot;right&quot;, I know there's no absolute, but it's exactly these tops of opinions from people with more experience than myself which I'm looking for.

I thank everyone who gave an opinion, have a good Wednesday.

jwenting,

Do you have any examples of websites out there which make extensive use of CSS positioning for this type of application? The above resources were great, and I'm still digging into them (unfortunately right now this project is one of those in my freetime things)... but I always love more.


-Rob
 
jwenting
A valid point but actually I don't think any flexibility is lost. If I want to change my design I just make a change to the template file, takes a few minutes, just the same as editing a CSS file to change layout. The only difference I see is that with full css you have layout and presentation in one document which is handier.

When I make a change I have the template file and the css file open, any changes takes mere minutes.

One thing about CSS, I just don't have confidence it it. If I change a table structure in my template I confident all is ok but with CSS I wouldn't be happy unless I could test it on all browsers.





- É -
 
templating the HTML does of course much the same as CSS positioning, but it can get ugly.

And in severe cases rendering multiple levels of nested tables can fail or incur a big performance penalty (no laughing matter, I've seen pages where a dataelement (created as a nested table) retrieved from a remote source was positioned using nested tables to a total nesting of 10 levels deep.
IE took several seconds to display the table, Netscape failed to render it at all.
We ended up redesigning the JSP to use a different layout structure (divs containing tables, we were in a hurry) and writing a servlet to parse the retrieved HTML into something else of our own devising that used no nested tables at all.
Not only did Netscape now parse it (which was a requirement, as the corporate WAN used Netscape 4.x exclusively) but the performance hit was also gone.
 
Guess it sort of comes down to education. A site can be built with tables to current standards and load 'almost' as fast as a CSS based site.
It's also common sense how far to nest tables but it all comes down to the designers awareness of the problems and how to get around them. i think!?!




- É -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top