Dave2
Dave2

Reputation: 17

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 https://i.sstatic.net/dskZy.png

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

Any ideas? Thanks.

Upvotes: 1

Views: 409

Answers (3)

TNC
TNC

Reputation: 5386

You can add this to top of your CSS:

* { padding: 0; margin: 0;}

Upvotes: 0

thirtydot
thirtydot

Reputation: 228152

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
}

Upvotes: 1

adarshr
adarshr

Reputation: 62573

Perhaps because your DOCTYPE is malformed.

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

Upvotes: 0

Related Questions