Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CSS Problem Zen Drupal

Discussion in 'Website Design Forum:' started by glenwheeler, Aug 18, 2010.

  1. glenwheeler

    glenwheeler Senior Member

    Hi Guys,

    Don't know if you can help. I am currently themeing a Drupal site and have used the zen theme to start right back to basics. I am trying to style are certain list item which has a class but I cannot seem to get anything to work Any idea's? Please see the image of where the list item is nested.

    http://www.glenwheeler.co.uk/web-box/style.png

    what would the css be for this? I have tried alsorts, the latest one being

    #navigation #main-menu ul li.menu-121 last {
    background: yellow;
    }

    I'm doing something wrong... :/

    Cheers ladies n gents!
     
  2. Harry

    Harry Senior Member

    Just use .last, you don't need all the #navigation #main-menu ul li.menu-121 as well, that's making your CSS far too specific.
     
  3. glenwheeler

    glenwheeler Senior Member

    i know dude, but I dunno if that will work, ill try...

    EDIT: Just tried it and it won't work with just the .last, I have the same issue with my personal site too with this silly nesting That these CMS's do. Grrrr!!
     
  4. Harry

    Harry Senior Member

    Code:
    .last{border:1px solid red!important;}
     
  5. glenwheeler

    glenwheeler Senior Member

    still not having it, damn thing won't budge!
     
  6. Harry

    Harry Senior Member

    Okay what I think needs doing is a CSS rewrite. If you've got CSS full of #id #id .class element .class{ style:info; } then it really is too verbose.

    All you really need to style that nav is:

    Code:
    #main-menu{}#main-menu li{}#main-menu a{}#main-menu .last{}
     
  7. glenwheeler

    glenwheeler Senior Member

    Yeah your right dude, however I was just trying to use the themes code it seems I ight have to do a lot of re writing for it as there's a lot like this. Am finding this first Drupal project of mine a bit of a pain. Cheers for the help Harry.
     

Share This Page