3 ms·
Again, I find myself agreeing with you :-) People seem to think that if you create CSS based layouts, that they can be repositioned and re-done using only CSS.
by irrelative 18y ago
Again, I find myself agreeing with you :-) People seem to think that if you create CSS based layouts, that they can be repositioned and re-done using only CSS. This is simply incorrect, and anyone with sufficient html experience knows this.
If you want to change the layout of any site, you need access to both the html and the CSS, so trying to separate the two is just overkill. Sure, you'll want to use CSS for colors and fonts, but for page flow, CSS isn't powerful enough by itself.
- pxlpshr 18y agoYou should tell that to the guys over at CSSZenGarden... they'll get a good chuckle.
- olavk 18y agoThe CSSZenGarden is - as mentioned in the article - a special case because the content never changes. This means that some of the flexibility issues with CSS is not a problem. You can design everything with fixed sizes and positioning. Every single paragraph is assigned a unique id which you can address. This approach will never work on "real" web site, because content on a real web site changes.
- pxlpshr 18y agoWhether or not the content is static or dynamic is kind of a moot point, all things considered. <div style="define-my-location"><?php ?></div>
- olavk 18y agoNo. That is the main point of the article. Pure-CSS layout is only fine if you know the exact dimensions of the text when creating the layout. If the textual content change later you run into problems. That is why tables fare better in "the real world" even if proof-of-concepts like zen-garden seem to demonstrate that CSS is powerful enough.
- pxlpshr 18y agoIn the case of your example, if you truly have a label that resides beside an input box that could hypothetically be as long as a sentence... then you've done more wrong in your content structuring, than you have with your code. :) As far as your column example is concerned, you made two content areas dependent on each other when that relationship may change overtime too, however with tables... you must recode the entire site structure to adapt to that.
- Jem 18y agoI disagree with you... and I'd like to think I have "sufficient" HTML experience but as you didn't define what that is, I could be wrong. A couple of years ago, I ran a styleswitcher on my blog giving the visitor about 5 layouts to choose from. Each one visually different from the rest, not one of them needing any changes to the HTML. The content changed on a daily basis (every time I wrote an entry) and yet it still managed to fulfil its purpose. Sure, it was only a blog and not a commercial website, but it still shows that CSS is capable of changing the layout by itself. Perhaps sufficient CSS experience is the key?