HighDots Forums  

Re: multiple classes - strange behaviour

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Re: multiple classes - strange behaviour in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Harlan Messinger
 
Posts: n/a

Default Re: multiple classes - strange behaviour - 12-27-2004 , 10:15 AM







"Firas D." <usenet (AT) firasd (DOT) org> wrote

Quote:
On this page,

http://firasd.org/scrapbook/dropbox/2004/12/mclasses.html

Why do the first two divs take the properties of the .section class but
not the float or width properties?

It's a reduced test case from this page:

http://one.textdrive.com/~firas/aisr-04-12-25/prototype/

Where the second div seems to ignore the size (or use the size relative
to the screen, not the container div) but picks up the float and
.section class properties.

Interestingly enough, the latter seems to 'work' in IE.

What am I missing?
Kchayka answered your question. As a side note: I trust that

..60pc {width: 58%;}
..40pc {width: 38%;}

illustrates the flaw in the strategy of naming your classes based on the
properties you *at the moment* intend to apply with them. And then what if
you decided to go 70-30 (or 65-28)? Then you'd have to rename the class
everywhere it appears in HTML tags, which defeats the purpose of separating
the presentation out from the content. Well, you wouldn't *have* to, but

..60pc {width: 68%;}
..40pc {width: 28%;}

would get pretty confusing pretty quickly. More appropriate names would be
"leftSide" and "rightSide", or "mainContent" and "navBar", or something like
that, names that describe that content to which they are being applied.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.