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:


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?


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

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

Reply via email to