[UPHPU] More CSS frustration

Mac Newbold mac at macnewbold.com
Wed Jan 17 17:36:03 MST 2007


Today at 3:22pm, cole at colejoplin.com said:

>>>> something that can  properly do auto-sizing rows and columns. (No, 
>>>> floating divs can't  do that.) The way people try to float divs, 
>>>> abosolute position  things, and fix absolute dimensions (height and/or 
>>>> width) on  things to make them work is a much less robust and flexible 
>>>> solution (even though it might be "pure css") than the  corresponding 
>>>> implementation that may include actual tables.
>
> I can't recall a float that wouldn't auto-size vertically. I've never used a 
> float with javascript. I never use a float to auto-size horizontally, because 
> of the width requirement, but that doesn't stop me from using a div. The 
> layout requirements determine my layout strategy.

I've seen issues where the height won't match up well between two 
side-by-side floated divs. But it's a huge problem (to me at least) that a 
floated div won't auto-size its width. That's a dead simple task with a 
table, but not with floating divs.

>>>> I haven't found a good way  to make a living trying to make them all 
>>>> "pure css".
>
> Hmmm, well I have. "Pure css" is a bit too utopian for me, I use transitional 
> instead of strict. Consider high volume sites (like my company, with over 
> 700,000 pages), with common, cached 20k css files handling all the layout 
> info. HTML filesizes are at least cut in half. Less bandwidth saves real 
> money, just ask ESPN.
>
> In the last four months, I have been tasked with over a dozen minor tweaks, 
> and layout changes. I changed one or two css files, where it took just me a 
> few hours. We have 3,000 legacy pages that do not use css layouts. It took 
> four people six weeks to make the same changes. Comparing the time involved, 
> and the outlay for salaries, there is no comparison.
>
> On the flipside, if everyone did css, maybe a lot of people wouldn't have 
> jobs to do it the table way, and that's how they make a living. So, you may 
> have a really good point there, depending on the person.

It's the "utopian" view of "pure css" that I take the most issue with. I 
use a lot of css in my sites, and I totally agree with what you've said 
about file sizes and html sizes. I've cut html filesizes by 75% by 
applying a little css goodness to them. I guess part of my point was that 
it is easy to change the html when it's dynamically generated from a PHP 
script, which is almost always the case for me. A little bit of 
programming goes much farther than a lot of cut and paste or even a lot of 
clean html plus some css.

>> Separation isn't always a good thing.
>
> Depends on who you're married to. :o

Point taken. Haven't been stuck in that position, and don't plan on it.

>> 1. If making a change would require changing things on both sides of
>> the boundary (i.e. you have to make a change to the presentation to
>> compensate for a change made to the semantic markup)
>
> Neither tables nor css can future-proof you from sweeping site changes.

Amen. Thinking that they can is delusional.

>> 2. If you rarely can make common changes by editing just one file.
>
> Example above works. Check.

Good work, then.

>> 3. If you don't find yourself (over months or years of maintaining
>> projects) replacing one of the files without replacing or majorly
>> overhauling the others, perhaps the separation was unnecessary?
>
> Sure signs of a small, or worse, failing business. Not my problem. Aren't we 
> supposed to make money at this?

Ensuring job security by creating a dependence upon your future work is 
frowned upon in some circles... Generally I make them want me rather than 
forcing myself upon them. But whatever works for you, I guess... :)

>> I'm all for benefits. Separation offers benefits. If those benefits
>> aren't something you ever end up using, then how much are they really
>> worth to you in your situation?
>
> While I may be impressed with the technical benefits of css (like vastly 
> faster downloading and rendering of all my pages), I don't bore the suits 
> with it. The financial benfits of css stand on their own when used on a site 
> of magnitude that can realize the financial benefit. The bigger the site and 
> traffic, the greater the financial benefit.

I'm 100% in favor of CSS, just not to the exclusion of other (perhaps 
older) technologies that work as well or better for me in some cases. I'm 
all about using the right tool for the right task.

>> When you write code for a
>> living, or even as a hobby, isn't it really about getting the most done
>> in the shortest amount of time over the long term?
>
> Yes, that's why I use css. The bigger picture is when the CFO presents Profit 
> & Loss statements. Technology choices are the path. Financial results measure 
> the effectiveness. In that light, css justifies itself nicely.

Agreed, unless you're taking the CSS overboard beyond the point of 
diminishing returns.

>> I'm planning on being careful with how I
>> invest my time, in my programming projects as well as everything else.
>> I want every hour I spend doing anything to be "worth it" to me as I
>> look back on it.
>
> I completely agree with you. If your answer is tables, I'm 100% behind you. 
> In my personal case, css has been a very smart investment. So has PHP, Flash, 
> C++, Java, etc., all have made me money when I look back on it.

Exactly!

>> For example, what do I get by contributing time/effort to UPHPU? I get
>> to learn new things and hear new ideas, I get satisfaction of helping
>> people (or at least trying to), I get good coworkers, build
>> friendships, build business associations, and I clarify my own thoughts
>> and opinions by thinking about things I might not have taken enough
>> time to think about, so I become a better person and hone my skills.
>> Are those things worth the time I put into it? I feel like they are.
>
> Your reasons are spot on here, it's worth it to me too.
>
>> I sincerely hope I don't offend anyone nor make anyone feel like I'm
>> belittling their style of doing work or their opinions or point of
>> view.
>
> No offense taken, and hopefully none given. I hate .Net and Java, but would 
> never criticize someone who is feeding their family on it. I think css is a 
> better mousetrap than tables, both technically and financially, and that's 
> the basis for my personal preference.

Now there's something we agree on... Down with .Net and Java! >:->

Mac

--
Mac Newbold		MNE - Mac Newbold Enterprises, LLC
mac at macnewbold.com	http://www.macnewbold.com/


More information about the UPHPU mailing list