Friday, 6 September 2013

New to HTML/CSS navbar get rid of whitespace

New to HTML/CSS navbar get rid of whitespace

Hello I am just getting started with HTML and CSS but having a weird issue.
If I use border:0; and padding:0; I still get a white space all the way
around my div. I can fix the issue by doing margin:-8; but that doesn't
seem right to me. I am using Dreamweaver if that matters. thanks!
<head>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="navbar">Home - Introduction - Stakeholders - Implementation Plan
- Proposal - Training</div>
</body>
</html>
and the CSS:
@charset "utf-8";
#navbar {
font-family: Verdana, Geneva, sans-serif;
font-size: small;
font-weight: bold;
text-decoration: none;
background-color: #CCC;
height: 25px;
text-align: center;
border: 1px solid #000;
margin: -8px;
}

No comments:

Post a Comment