User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 455,964 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,630 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 557 | Replies: 3
Reply
Join Date: Nov 2007
Posts: 10
Reputation: black3 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
black3 black3 is offline Offline
Newbie Poster

Why is CSS such a mess?

  #1  
Nov 18th, 2007
It's a great way to change background colors site wide.

But it seems so horribly broken for what it's used for.

The tools given aren't particularly sane for page layout. One should be able to set up whatever constraints (equal, proportional, parallel, etc) as needed and the agent displaying the content finds a suitable solution. As an example, the login div must be equal width as the sidebar div, the sidebar div is at the left of the screen, the navbar is at the top of the screen and above the sidebar, and the content div is below the navbar and to the right of the sidebar. If everything is in a box, it would make sense to use other boxes as a reference point, rather than the screen. Tables are much more intuitive for layout purposes, but simply aren't capable enough. We can do what we need with CSS, but everything along the way is a messy hack.

Why would a spec for something that needs to be pixel-precise not come with an example implementation?

If the point is to separate content and presentation, then why must I change the content to get the effect I want?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2007
Posts: 10
Reputation: black3 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
black3 black3 is offline Offline
Newbie Poster

Re: Why is CSS such a mess?

  #2  
Nov 18th, 2007
Here's an example of a two column tableless layout => http://www.daniweb.com/code/snippet684.html
Here's a really good site to go to for CSS tutorials => http://www.alistapart.com/articles/
Reply With Quote  
Join Date: Jan 2007
Posts: 2,604
Reputation: MidiMagic is on a distinguished road 
Rep Power: 7
Solved Threads: 119
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Posting Maven

Re: Why is CSS such a mess?

  #3  
Nov 19th, 2007
CSS is not the problem. I use CSS with tables too. The REAL problem is that the div method of making columns falls apart if something won't fit in the allowed space. Usually this happens when the browser window changes size.

It is not a terrible event if you use a table, especially if you must have the parts render in the same relationship to each other. Table is not deprecated. It will force a horizontal scrollbar if stuff doesn't fit, instead of falling apart.

The REAL problem with using tables for layout is that it isn't politically correct. It won't render correctly on devices intended to audibly read a website for the blind. At the beginning of each cell, it inserts verbal text similar to "Table row 3, column 1" into the audible rendering.

The REAL problem with the div method is that there is no equivalent to the tr tag to force stuff to stay in rows. There is also no equivalent to rowspan.

So I suggest that you try to get divs to render what you want. If they don't work, use a table anyway. It will still validate.

What is NOT proper usage is using tables to define page margins. Before CSS margins existed, page authors used table to put margins around the page.
Last edited by MidiMagic : Nov 19th, 2007 at 9:47 pm.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jun 2004
Posts: 231
Reputation: cmills83 is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
cmills83 cmills83 is offline Offline
Posting Whiz in Training

Re: Why is CSS such a mess?

  #4  
Dec 3rd, 2007
CSS isnt a problem if you know what youre doing. IMO easier than tables.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 9:03 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC