Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Design changes (CSS) only on some pages of my website?

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #43802
    ReadPure
    Member

    How can I make changes with CSS, only on some pages of my website? **For example:** I want to make my navigation menu smaller, but only on my main page (index.html).

    I can edit ONLY the main .css file

    #130278
    daffy58
    Participant

    Add extra class, specific one for the main page only, and you can set the css properties for it.

    #130279
    Alen
    Participant

    Are you able to edit HTML?

    You could add a class to body element depending on what page you are on. So for your home page add ``, and for each other page add appropriate class. Then in your CSS you can target each page individually.

    .home .menu {}
    .home .menu ul li {} //etc
    .about .menu {}
    .about .menu ul li {} //etc

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.