Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorjazzdev
    • CommentTimeJun 28th 2010
     permalink
    I'm not sure the best way to setup my HTML/CSS to get different styling on different pages.

    Let's say I have a top menu with Foo, Bar and Baz. I want the top menu rendered basically the same on each page, but on the Foo, page I want Foo to be slightly different:

    FOO Bar Baz

    and on the Bar page, Bar should stand out:

    Foo BAR Baz

    I could either use different CSS for each page, or different HTML:

    A) Use a different style sheet for each page so the CSS controls the rendering

    B) Use a different class on the "current" page in the HTML, something like:

    <li>Foo</li>
    <li class="bar">Bar</li>
    ...

    Is there any advantage to one method or the other?
    • CommentAuthoraddedjacky
    • CommentTimeJul 10th 2010
     permalink
    The B method will be better .
Add your comments
    Username Password
  • Format comments as (Help)