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

    Join Date
    Nov 2012
    Rep Power

    Talking <p> overriding class selector with !important


    I'm brand spanking new here, and yes I am a wordpress web designer but my background is graphic design and html so please be kind!

    I ma updating my own website, and have changed the body style to 14px. In my homepage slider this is too big so I have created a class selector to apply to the slider text:

    .slider-text {
    font-size: 12px;
    line-height: 1.4em !important;
    margin: 0 0 20px 0;

    Trouble is the p selector is overriding that with 1.7em line-height and I just can't work out why. .slider-text is AFTER the p selector, and has !important applied to it also.

    Obviously I can't add in my URL but any advice you might give would be greatly appreciated.

    Thankyou thankyou if you can help!
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2012
    Troy, NY
    Rep Power
    could you provide an url please.
  4. #3
  5. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

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

    As you found out new users are restricted from posting URLs until they have made 5 posts. You may need to get around this by leaving out the "http://" and putting a space before each ".". Yes this rule is annoying, but the administrators say it's necessary for limiting spam.

    P.S. It would be helpful if you put your code between [code][/code] tags in the future.
    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