1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Rep Power

    CSS front page (page specific styles)

    Hi all,
    I need too display: none; on h1.title only for the homepage. I need it for the rest of the site though. I remember a while ago I was able to do this but forgot how. I'm using Drupal 7 install. Any help would be greatly appreciated.
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    USA (verifiably)
    Rep Power
    Welcome to DevShed Forums, rcharlieis.

    There are three major ways to make page specific styles. The first two can be implemented in a few different ways. (1) My preference is to give page and/or section specific classes to the <body> element on each page. (Some people prefer to use an ID, but since each ID must be unique to one element per page, classes are better.) (2) You could use a page specific stylesheet (or an inline style on the page, a.k.a. the style attribute). (3) Use JavaScript. However, I recommend avoiding JavaScript for things that don't need to respond to user interactions unless it's the only available option.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).

IMN logo majestic logo threadwatch logo seochat tools logo