Superunknown
Superunknown

Reputation: 501

Navbar will not touch the top

Hi I'm trying to get the multicoloured navbar to touch the very top of the screen with zero gap. For some reason...there appears to be a 5px gap between the top of the screen and the navbar.

I've tried

margin-top:0; padding-top:0px; etc

My JS fiddle

Please excuse the horrible colours...I was using them to try and identify any gaps.

Upvotes: 0

Views: 3688

Answers (3)

Nimesh Gami
Nimesh Gami

Reputation: 381

Solution

#wrap {
    margin-top:-16px auto;
    height: 100%;
    width:100%
}

or

body {
        margin-top:-16px auto;
     }

enter image description here

Upvotes: 0

j08691
j08691

Reputation: 207901

You need to remove the margin on your #session div and the body.

jsFiddle example

#session {
    top:0;
    padding-top:0;
    position:relative;
    margin:0;
}

Upvotes: 3

Bosc
Bosc

Reputation: 1509

its your ul #sessions id causing the problem, add a margin:0; to it and also a margin-top:0; to your body

#session {
  top: 0;
  padding-top: 0;
  margin: 0; // add this
  position: relative;
}

Upvotes: 2

Related Questions