开发者

padding and margin for CSS <li> simply NOT WORKING

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;
pad开发者_C百科ding: 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜