Help in wordpress

Discussion in 'HTML & Website Design' started by rgordon83, May 28, 2007.

  1. #1
    i need a little help in wordpress. I am very very novice at CSS and PHP (VERY!) and i am trying to figure out how to use the grey background styling from the sidebar on :http://theguitarresource.com/ in my store section behind the main store categories (sub-pages) in the body of the page at http://theguitarresource.com/store/
    Can someone please help with this? thanks!
     
    rgordon83, May 28, 2007 IP
  2. Fold

    Fold Peon

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Grey background? I only see a pale green background.

    Anyway, the CSS for a background colour is as follows:

    #divname {
      background-color: #EDEDED;
    }
    Code (markup):
    Where "divname" is the name of the element you want to style, and "EDEDED" is the hexadecimal code for the desired colour.

    You should be able to take a look into your stylesheet and identify what the colour is - as I say, I see that pale green colour which is EDEDED.
     
    Fold, May 29, 2007 IP
  3. rgordon83

    rgordon83 Peon

    Messages:
    671
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah, you'r right. that's the color i want. looked grey on my screen.
    So how can i style the element i want to style with that background? thanks!
     
    rgordon83, May 29, 2007 IP
  4. Ragnhild

    Ragnhild Peon

    Messages:
    28
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You put the element in a div and give the div a name, like so:
    
    <div id="grey">
    *content goes here
    </div>
    
    Code (markup):
    then you have to have this in your CSS:
    #grey {
      background-color: #EDEDED;
    }
    Code (markup):
     
    Ragnhild, May 29, 2007 IP
    rgordon83 likes this.
  5. rgordon83

    rgordon83 Peon

    Messages:
    671
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #5
    cool thanks!
     
    rgordon83, May 29, 2007 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just so you know, you shouldn't use color names in your IDs - give the IDs and classes semantic names instead, that way they don't lose their "meaning" when you change their properties.
     
    Dan Schulz, May 29, 2007 IP
    rgordon83 likes this.
  7. rgordon83

    rgordon83 Peon

    Messages:
    671
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Good point. thanks for the tip!
     
    rgordon83, May 29, 2007 IP
  8. Ragnhild

    Ragnhild Peon

    Messages:
    28
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I agree, I just gave it that name because I couldn't come up with something else. Finding good semantic names can be hard.
     
    Ragnhild, May 30, 2007 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I prefer to use names like "header" "menu" "content" "sidebar" and "footer" for IDs, and "section" for classes. If it sounds like a unique region (such as "breaking-news" then it'll get an ID, if it can be reused (I consider "content" to be unique since I code my entire main content region as a single DIV container) it'll get a class.
     
    Dan Schulz, May 30, 2007 IP