DIV haters
- Started
- Last post
- 90 Responses
- ********0
Let's call it a "flexible amount", 3 to 8. It's a real life situation, the site was going to be updated by a cms.
mase: your example is actually very close, do you know a way to make the elements stretch evenly in the page's width?
shaft
(Jan 6 06, 01:57)Again, if we're talking about good design using CSS and DIV's then I would redesign the site to use a cascading nav...
- mase0
errr...
if you knew you were having 5 items you could put them at 20% width and that should do it. But you'd have to change the percentage every time you put a new item in.
I dont know but... I think you'd need to somehow dynamically set the width % depending on how many menu items you had. Java Script maybe!!??
there might be something on http://css.maxdesign.com.au/inde…
(listomatic)
- ********0
Yes.. If you had a CMS, you can use PHP/ASP to take the number of menu items at any given time and work out the % to set the DIV widths to.
- mase0
cool!
- ********0
- shaft0
Great!.. but not working without an ugly server-side or JS hack for percentage width setting. And it's hacking the CSS, the browsers are ok this time. Wasn't CSS supposed to be easier and more flexible than tables?
Also, try to add line breaks between two words of a title. Remember that cell content must be centered vertically too, that's where the css-fun begins :)
I was given an image based menu and was supposed to recreate it so that it could be updated dynamically. I spent a lot of time trying to do it with CSS, but to no good result. It took me just a few minutes to do it as a table. And it's not a browser issue, we're talking "good browsers" like Firefox or Opera. The problem lies in CSS itself.
People always say about how CSS gives us more control over layout, which is partially very true. Why did they take away useful stuff like easy centering, vertical alignment or control over stretching of elements?
I think that is because for CSS fathers a website is just a flow of text with floating images, what do you need centering and stretching for?
There's more issues in CSS that seem just dumb (ie. canceling the top/bottom margins of two blocks stacked up on each other). Why didn't those nerds consult designers when creating the standards?..
- ********0
Great!.. but not working without an ugly server-side or JS hack for percentage width setting.
shaft
(Jan 6 06, 05:33)I think you're missing the point.
What you are doing by adding further categories via a CMS, is asking the server to generate varying HTML. You could use tables OR divs, but either way you are going to have to tell the table or the div to change it's width accordingly!
What I suggested is not a hack!
- shaft0
Actually, that's my point: the table will adjust automatically, just insert a [td] - no need to calculate any parameters. Not to mention the ease of vertical alignment of elements.
There's more: what happens if some of the cells have wider text than the others? Percentage might not help here, since the text might be wider than its calculated cell. Again, the table adjusts automatically just as needed.
There was a good reason people were sticking to tables: they were great for the job. They gave flexible grid most layouts needed. Paired with css they're a perfect design tool.
It's just tables are bad now.
My point is that tables were replaced by divs and a lot of layout flexibility was lost while we were constantly being told we got more control.
I use tableless layouts now, there's no turning back. It just feels like you bought a new edition of your favourite car and despite being newer, faster, it's surprisingly uncomfortable. Also, it has an ugly trunk now ;)
- ********0
Actually, that's my point: the table will adjust automatically, just insert a [td] - no need to calculate any parameters. Not to mention the ease of vertical alignment of elements.
shaft
(Jan 6 06, 07:31)If you're coding properly you really should be stating TD widths all the time.
Really... If you really understood what the standards do... why they are in place, we wouldn't be having this discussion.
Do you see yourself as a designer or developer?
- shaft0
If you're coding properly you really should be stating TD widths all the time.
Really... If you really understood what the standards do... why they are in place, we wouldn't be having this discussion.
Do you see yourself as a designer or developer?
determinedmoth
(Jan 6 06, 07:53)
---------------------I consider myself a developer rather than a designer, even if design is a big part of my work.
I don't care for proper code as much as I do for the result. I value user higher than a validator. I mean it doesn't bother me if a [td] has no width stated if it works ok.I do understand the need for standards, how they bring a totally different approach, the importance of accessibility etc. I'm using xml/css in my everyday work and I know it's the way to go.
I just hate how they fucked up some things on the way and you can't blame browsers for it.It dates long back to html 4 and quirksmode. Quirksmode was the browser makers answer to real-life developer needs. In example it supported table height, which wasn't allowed by w3c specs, but was really useful in our work. Time goes on and xhtml brings even less support for centering, stretching and aligning. Why didn't they listen?
I don't care for proper code as much as I do for the result, it doesn't bother me if a [td] has no width stated if it works ok.