need help with my navigation bar

closed account (Dy7SLyTq)
so here is what it looks like right now http://imgur.com/VTwEaB2 i want to make the navigation bar so that its centered and only as long as the items is. here is my code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#navbar ul {
  margin: 0;
  padding: 5px;
  list-style-type: none;
  text-align: center;
  background-color: #000;
} 
 
#navbar ul li {
  display: inline;
}

#navbar ul li a {
  text-decoration: none;
  padding: .2em 1em;
  color: #fff;
  background-color: #000;
}

#navbar ul li a:hover {
  color: #000;
  background-color: #fff;
}


the html:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
      <meta charset="utf-8">
      <title id="Title"></title>
      <link rel="stylesheet" href="dragontoothsoftware.css">
  </head>

  <body>
    <div id="navbar">
      <ul>
        <li><a href="#">Home</a></li>
        <li><a href="#">About Us</a></li>
        <li><a href="#">Contact Us</a></li>
        <li><a href="#">Projects</a></li>
        <li><a href="#">Tutorials</a></li>
      </ul>
    </div>

    <script type="application/dart" src="dragontoothsoftware.dart"></script>
    <script src="packages/browser/dart.js"></script>
  </body>
</html>


i know that its not normally a good idea to ask for code, but im not a web developer any more and beyond this site i dont plan on doing anything serious with web developing, so if you guys would cut me some slack just this once

edit: and also how could i make it have rounded corners?
Last edited on
Topic archived. No new replies allowed.