![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Why is CSS such a mess?
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?
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
|
|
|
|
|
#2 |
|
Hobbyist Programmer
![]() Join Date: Oct 2007
Location: New York
Posts: 169
Rep Power: 10
![]() |
Re: Why is CSS such a mess?
I'm pretty good with CSS but I'm not exactly sure what you're describing? Creating multi-column layouts in CSS is actually relatively simple.
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/
__________________
DaniWeb IT Discussion Community Everything Information Technology related all in one convenient interactive online publication and community |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Sep 2007
Location: Sydney - Australia
Posts: 322
Rep Power: 2
![]() |
Re: Why is CSS such a mess?
I used CSS a while ago, it is a bit confusing and messy at times.
What you have to realise is that it is a scripting language for Designers. If you meet a designer (a real one) you will understand why CSS is like the way it is.
__________________
SYNTAX ERROR ... |
|
|
|
|
|
#4 |
|
Professional Programmer
Join Date: Oct 2005
Location: Chitown
Posts: 422
Rep Power: 4
![]() |
Re: Why is CSS such a mess?
It is a mess if you have to make it work across different browsers, otherwise its not that bad.
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Re: Why is CSS such a mess?
I tend to agree with Dameon on this. CSS is pretty awful at layout. Sure, you can get around it with numerous "two column" techniques, but if CSS was designed properly, then it would be much more obvious how to achieve such layouts.
You can make arbitrary elements act as tables, but I'm unsure if this works with IE. I seem to recall it doesn't. A lot of things about the web could be better. HTTP, for instance, is a poor protocol for many of today's more complex AJAX applications. Some support for SVG on IE wouldn't go amiss, either. |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Oct 2007
Posts: 32
Rep Power: 0
![]() |
Re: Why is CSS such a mess?
Here is another in agreement. But actually I steer clear of web-development and never intend to get drawn into it - the whole thing seems ugly and unstructured. The really really sad thing is, that, they, are bringing this generation of design to application development with XAML for .NET.
The thing I have found awkward about writing HTML/CSS code for layout in the past is the fact of the buff's dedication to a set of unwritten(?) standard's. Yes we could do what we want, and easily, seemingly with no errors, but show a buff and their reaction never fails - 'You should'nt use that there, or that here, or this there'. Okay, so maybe we should'nt use tables for laying out and it's not results from the clients db table I want to display, but it works, browser's don't get upset by them, generally speaking, and you spend alot less time phaffing. That's my opinion anyway. |
|
|
|
|
|
#7 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Why is CSS such a mess?
"Separating content and presentation" is a worthless buzz phrase, without clarification. Bolded text (presentation) carries meaning (content). Granted that it's nice to be able to bold an entire class of things (section heads, say), one needs to distinguish between presentation that is merely a stylistic or formatting issue and presentation that adds to the meaning of the document.
The problem is that disciplines almost always breed a class of people that I call "high priests." The people issue dictums to their acolytes and expect 100% compliance and obediance; no independent thought, and no exceptions. A "kiss my ring and the hem of my robe, you little effer" kind of thing. Another problem is with the rendering engines, themselves. Even "compliant" browsers choose to set their own values for certain defaults. Examples would be margins, paragraph spacing, and so forth. The only solution to this is for the designer to "zero out" all the default values and set them all from scratch to the values he or she wishes to use. After that, one then hacks for "non-compliant" browsers. All that said, I personally prefer the CSS approach, applied semantically. That isn't to say that there aren't things that make me regularly grit my teeth and mumble imprecations. I highly recommend A List Apart, linked to earlier in the thread. It's very good, but it isn't God's Word, so keep a couple of your brain cells under your own control.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#8 | ||
|
Troll
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4
![]() |
Re: Why is CSS such a mess?
Quote:
Quote:
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270 |
||
|
|
|
|
|
#9 |
|
Expert Programmer
|
Re: Why is CSS such a mess?
I haven't done CSS for a while, but I remember how much of a pain it was trying to get it to work properly over cross browsers. I'm not going into detail, but I would agree with the idea that it could have been done better. I just love being able to change styles for the whole page at once. That's the biggest plus. Layouts get tricky.
|
|
|
|
|
|
#10 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Re: Why is CSS such a mess?
Unfortunately, things get tricky. C++ is as good an example as CSS. One solution is to get on a standards committe, fight for 5 years or so, and still lose half the battles.
The other solution is to gut it up and do the best you can do in the face of constraints imposed by those deal in words and taurine excrement, rather than deeds. Don't get me wrong: some of those who contribute to laying down the rules are extraordinarily sharp. They, too, fight losing battles. Web "standards" (I know of no actual standards, but who's counting) seem to be particularly lacking. Perhaps the best people are busy elsewhere.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS file for Firefox | bigguy | HTML / XHTML / CSS | 7 | Aug 30th, 2007 10:20 AM |
| HElP !! My CSS skills STINK BIG TIME | woocha | HTML / XHTML / CSS | 23 | Aug 30th, 2007 9:04 AM |
| JScript CSS style switcher BY BROWSER | physicist | JavaScript and Client-Side Browser Scripting | 0 | Jun 11th, 2007 10:58 AM |
| CSS is lost when I change Dreamweaver html tag to accomodate Javascript | ccarter1971 | JavaScript and Client-Side Browser Scripting | 3 | Jun 1st, 2007 11:20 AM |
| Major IE6 issue + CSS | Kezzer | HTML / XHTML / CSS | 1 | May 29th, 2007 8:52 AM |