user1538582
user1538582

Reputation: 3

Put this menu at top left conner HTML CSS

I want the vertical menu completely at the top-left corner but right now there still about 2px top and left margin and I can not figure out why, all margin set to 0 already. Some one have any idea?

Thank so much!

Upvotes: 0

Views: 373

Answers (5)

Ana
Ana

Reputation: 37178

You need to set margin: 0 on the body (live editing via Developer Tools solves it for me).

And learn to use Developer Tools ;)

Using Chrome, it showed me you had something like this:

body {
  display: block;
  margin: 8px;
}

from the user agent stylesheet.

Upvotes: 1

Eric Robinson
Eric Robinson

Reputation: 2095

add margin: 0px; to your pages body tag.

Upvotes: 1

DorkRawk
DorkRawk

Reputation: 770

I'm guessing that there are still default margins on the page. Try using a CSS reset file. This will make sure that the margin and padding are all 0 when you start (along with some other nice resets).

Upvotes: 0

Lowkase
Lowkase

Reputation: 5699

The body tag has a margin set on it, try:

body { margin:0; padding:0; }

Upvotes: 1

Filipe Manuel
Filipe Manuel

Reputation: 995

You used some CSS Reset? If not, use this: http://meyerweb.com/eric/tools/css/reset/. Or if you want a quicker solution, use body {margin: 0; padding: 0;}

Upvotes: 0

Related Questions