0xSina
0xSina

Reputation: 21553

Twitter bootstrap weird top and left margin

I am trying out twitter bootstrap and am new to CSS/HTML. Here's my simple HTML:

<!DOCTYPE html>
<html>
<head>
  ......
</head>
<body>
  <div class="navbar">
    <div class="navbar-inner">
      <div class="container">
          <a class="brand" href="#">Test App</a>
      </div>
    </div>
  </div>
</body>
</html>

It renders and page that has a weird top and left margin:enter image description here

Upvotes: 0

Views: 5122

Answers (3)

giulia
giulia

Reputation: 11

With regards to the top margin try body { padding-top: 0; }

Upvotes: 1

Coffee Monkey
Coffee Monkey

Reputation: 472

If you would like the navbar to be full width and stuck to the top then add the navbar-fixed-top class to the navbar like so:

<div class="navbar navbar-inverse navbar-fixed-top">

Upvotes: 2

Ashwin
Ashwin

Reputation: 12411

check in firebug, either of your container - navbar, navbar-inner, container may have padding or margin.

Upvotes: 1

Related Questions