WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] CSS Not Working With Page-id PLEASE HELP??!! (18 posts)

  1. Ben32
    Member
    Posted 1 year ago #

    Hi My content div can't be styled on my website.
    I added body class and added a div called content arround my loop but when I type{ .page-id-16 #content } and add the css Font-family:helvetica; the font doesn't change nothing can be styled?

    Weird!!
    Please Help

    Cheers

    Ben

    My website- http://bengrahamdesign.com/?page_id=16

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    Try applying more specific CSS selectors, especially when applying font styles. Font style should be applied to inline elements.

  3. Ben32
    Member
    Posted 1 year ago #

    So what are you saying?
    Is .page-id-16 #content ....Correct?

  4. Ben32
    Member
    Posted 1 year ago #

    Thanks

  5. Ben32
    Member
    Posted 1 year ago #

    font-style does not need to be inserted into the style........?
    For the font-family to be applied.....

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    when I type{ .page-id-16 #content } and add the css Font-family:helvetica;

    May you post the CSS you're using for this?

  7. Ben32
    Member
    Posted 1 year ago #

    Thanks

    CSS//

    .page-id-16 #content {
    font-family:helvetica, geneva, sans-serif;
    font-size:12px;
    }

  8. Ben32
    Member
    Posted 1 year ago #

    The whole CSS file :-)

    [CSS moderated]

  9. Andrew
    Forum Moderator
    Posted 1 year ago #

    It's not necessary to paste the whole CSS file as you've linked the website.

    You've entered that CSS within media queries;

    @media only screen and (max-width : 480px),
    only screen and (max-device-width : 480px){
  10. Ben32
    Member
    Posted 1 year ago #

    Yes but when I delete it it doesn't work...
    also when I delete the media queries @media only screen and (max-width : 1220px),
    only screen and (max-device-width : 1220px)

    and add the obove css that doesn't work either?

    Thanks

  11. esmi
    Forum Moderator
    Posted 1 year ago #

    I'm sorry but it is beyond the scope of these forums to deal with general CSS issues. Try a dedicated CSS resource such as http://www.css-discuss.org/ instead.

  12. Ben32
    Member
    Posted 1 year ago #

    For some reason in firebug...
    the only css that is visable is this

    @font-face {
    font-family: "Cinzel Decorative";
    font-style: normal;
    font-weight: 400;
    src: local("CinzelDecorative-Regular"), url("http://themes.googleusercontent.com/static/fonts/cinzeldecorative/v1/fmgK7oaJJIXAkhd9798yQoem3WQP60SwtMX1R01QT0U.woff") format("woff");
    }

    Is google fonts conflicting with the css?

  13. Ben32
    Member
    Posted 1 year ago #

    @esmi

    I'm not yet sure if this is a css error....

    It very well could be a wordpress problem m8....

  14. Andrew
    Forum Moderator
    Posted 1 year ago #

    To check whether it's a WordPress error, change to one of the default themes and determine whether the problem still exists.

  15. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    definitively not a WordPress problem

    - tidy your stylesheet, and make sure to add the new font styles for instance before any @media queries;

    where the styles are now, there is still a @media query open.

  16. Ben32
    Member
    Posted 1 year ago #

    Thanks you Alchymyth !!!

    Simple style error......
    the css was after the @media queries ! Doh !

    Is that always the case ?

  17. Ben32
    Member
    Posted 1 year ago #

    Thanks again !!

    Inline styles always flow from the top !!!!!!

    Basic

  18. Ben32
    Member
    Posted 1 year ago #

    :-)

Topic Closed

This topic has been closed to new replies.

About this Topic