New home page

Bruno Medeiros brunodomedeiros+spam at com.gmail
Wed Oct 6 04:02:05 PDT 2010


On 06/10/2010 01:27, Stewart Gordon wrote:
> On 04/10/2010 19:42, Walter Bright wrote:
>> Stewart Gordon wrote:
>>> The layout breaks in anything but the default text zoom.
>>
>> The annoying thing about this is everyone says "don't use tables for
>> layout, use CSS." Except that using CSS for layout DOESN'T WORK
>> RELIABLY. With tables, I can get 3 columns that are actually 3 columns,
>> not 3 columns that are a side effect of bugs in CSS.
>
> Indeed, here are just a few things I hate to bits about CSS:
>
> - no overflow: grow
> - overflow: grow isn't the default
> - width and height mean the width and height excluding the padding
>
> http://goingspare.wordpress.com/2007/04/06/css-padding-and-width/
>
> Stewart.

I had about 3 jousts with CSS and HTML layout stuff, quite some years 
ago (around 3-5 years). CSS is great for setting up the style of the 
page (as in colors, fonts, font properties, etc.)...  but for layout, it 
sucks a lot! It's the C++ of markup languages, if not worse.

My first joust was me trying to alter the template I got for my homepage 
to use divs/css instead of tables. I tried a few things, but never 
managed to make it show up the way I wanted in both IE 6 and Firefox. I 
gave up and left the template with tables, and here the blame was put 
solely on browsers issues, since it seemed IE 6 was not being standards 
compliant most of the time. (even with the HTML version set to 4, so 
that IE would not try compatibility hacks for old HTML versions) . Note 
that on this first attempt I had only read some simple CSS tutorials, 
and I had no knowledge of how things should render, only intuition (and 
the latest Firefox as a sort of reference).

Fast forward 6 months later or something like that. After reading about 
someone lauding CSS2, I decide to have another go. This time I read a 
lot about HTML/CSS2, hoping do understand it properly, and to actually 
be able to figure how the layout should look like (because at the time 
even Firefox had some prominent layout bugs). It was an utter mess 
again. Even with a a better understanding of CSS, all the code I tried 
never worked properly in both browsers. Now for some of that code I knew 
for sure that the problem was that IE was not being standards compliant, 
and why (even though in some case its behavior seemed the most logical 
one).
After much trial-and-error, learning about the quirks of each browser, 
hair-pulling, I finally managed to get a working layout (with a few 
minor concessions in the original intended functionality). But here even 
though there were faults in the browsers, I became of the opinion that 
that CSS/HTML layout itself was extremely complicated, and was actually 
more at fault than the browsers issues (hence the comment of "C++ of 
markup languages").

The confirmation of that came a year later, when again I delved into 
HTML layout. This time, I wanted to create a HTML page exactly emulating 
the Europass CV template (which, for those not familiar, is actually 
fairly more complicated than the typical resume layout, especially to 
render the separating lines). I found that:
a) I had practically forgotten all the CSS/HTML rules and info that I 
had "learned" before, because they were so strange, complicated, and 
*unnatural* that there is now way you remember them unless you work with 
it on a daily basis.
b) Even though now I only cared about it rendering properly in the 
latest Firefox (it was mostly for internal use only), and so I had no 
more browser incompatibilities, I still had lots of trial-and-error and 
hair pulling. I became completely dissatisfied with HTML/CSS layout... 
it has definitely gained the "crap" designation from me.

-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d-announce mailing list