I have a menu that has to be white text on a black background. I've been getting by, setting up psuedo-classes for any links in the content area. I've been looking to find a way to get the css for the menu to lay-off the text in the content area. It's just a pain in the neck when I cut-and-paste, all the links disappear, it's white text on a white background.
I set up a css menu, now I've got li's and ul's that have a black background, and a specific width. Now I can't use li's or ul's in the content area.
The menu's in a div. I'm trying to use a linked style sheet.
If you want something to only apply to elements within a DIV which has an ID (such as <div id="my_id">), then simply use that ID as a parent designator within your CSS selector for the child element:
Code:
#my_id a {
/* only applies to A elements within the #my_id element */
color: white;
background-color: black;
}
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
...is setting all LI and A elements to display as block type elements. I think what you want here is...
Code:
#nav ul, #nav li, #nav a {display:block; margin:0; padding:0; border:0;}
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks