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!
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.
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!
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):
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.
I agree, I just gave it that name because I couldn't come up with something else. Finding good semantic names can be hard.
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.