I am working on this site, and I have a pretty large .css document. For some reason I cant get these list items to have a padding or margin of anything other than 0px.
I have no idea where it might be inheriting this from, and why me writing
{
margin: 5px;
padding: 5px;
}
does nothing!
Here is the site , im referring to the element in a really ugly, bright green, with the class of ".wiffleMainNav ul li."
The CSS rule is at the bottom of the linked styles sheet.
Thanks so much!
-Aza
You have a comma in your definition.
Change this
.wiffleMainNav ul li {
display: block;
float: left;
padding: 5px, /* PROBLEM! :) */
margin: 0px 2px;
background: green;
}
To this
.wiffleMainNav ul li {
display: block;
float: left;
padding: 5px; /* FIXED */
margin: 0px 2px;
background: green;
}
You have a comma at the end of the padding line:
padding: 5px,
margin: 0px 2px;
Your css uses this:
.wiffleMainNav ul li { display: block; float: left; padding: 5px, margin: 0px 2px; background: green; }
Note the Comma after "padding: 5px" instead of semi-colon.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.