On Fri, 2009-05-22 at 12:59 +0100, Benjamin Hawkes-Lewis wrote:
> On 22/5/09 12:49, PJ wrote:
> > Sorry, but no one suggested a mailing list for CSS and the W3 Schools
> > Forum has problems.
> Actually, I did:
> http://www.css-discuss.org/
> > Why do I get completely different formatting with two identical classes?
> > I want to change part of the formatting on just one page on the site
> > using the exact same class with some changes so I don't modify other
> > pages. I copied div#frame to div#frame1 and changed the class on the
> > page to id="frame1". But now the page no longer displays the formatting
> > as with id="frame" - e.g.<p>  produces 16px font-size instead of 12px.
> This description is confusing. Can you please link to a minimal test 
> case showing the problem you're talking about, so that we can view your 
> code and ideally probe it with DOM inspectors like Firebug?
> http://webkit.org/quality/reduction.html
> may help you produce one.
> In general, I'd suggest creating page-specific style variations by 
> sticking a class on the body (e.g. <body class="article"> ) and using 
> that as a hook to modify the styling of the class whose formatting you 
> want to be different.
> .thing {
>      font-weight: bold;
> }
> .article .thing {
>      font-style: italic;
> }
> for example.
> --
> Benjamin Hawkers-Lewis
That hook on the body tag is a good one, which I wish I'd thought of a
few weeks back! I've been using PHP to pull in external stylesheets
based on the current script name for a project I'm working on, as each
page has unique tweaks on common elements. It's not like I don't even
use selectors even now!


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to