Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / December 2004



Tip: Looking for answers? Try searching our database.

multiple classes - strange behaviour

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Firas D. - 25 Dec 2004 15:43 GMT
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 - 27 Dec 2004 14:41 GMT
> http://firasd.org/scrapbook/dropbox/2004/12/mclasses.html
>
> What am I missing?

Validation. ;)
http://jigsaw.w3.org/css-validator/validator?uri=http://firasd.org/scrapbook/dro
pbox/2004/12/mclasses.html


Signature

Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.

Firas D. - 27 Dec 2004 16:59 GMT
>>http://firasd.org/scrapbook/dropbox/2004/12/mclasses.html
>>
>>What am I missing?
>
> Validation. ;)
> http://jigsaw.w3.org/css-validator/validator?uri=http://firasd.org/scrapbook/dro
pbox/2004/12/mclasses.html

Wow.
Damn.
I never really think of validating style sheets.
Damn!
Thanks.
Harlan Messinger - 27 Dec 2004 15:15 GMT
> On this page,
>
[quoted text clipped - 14 lines]
>
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.