开发者

CSS navigation bar: spacing issue

for some unknown reason, my navigation bar is shifted over to the right, on Firefox and also on Chrome. See http://i.stack.imgur.com/ds开发者_运维问答kZy.png

And what's weird is that the issue doesn't arise on jsfiddle. See http://jsfiddle.net/bMAGX/

Any ideas? Thanks.


Are you using a CSS Reset? I'm guessing not. You should consider using one to help with issues like this.

I think you need this CSS to remove the default ul margin/padding:

#topmenu ul {
    margin: 0;
    padding: 0
}


Perhaps because your DOCTYPE is malformed.

<!DOCTYPE html> should be one of the types defined here.


You can add this to top of your CSS:

* { padding: 0; margin: 0;}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜