DEVILofDARKNESS Posted July 1, 2009 Share Posted July 1, 2009 Okay I have the folowing html: <html> <div id="navigation"> <h2 class="nav">User</h2> <ul> <li class="nav"><a href='./register.php'>Register</a></li> <li class="nav"><a href='./login.php'>Login</a></li> </ul> <h2 class="nav">About</h2> <ul> <li class="nav"><a href='./about.php'>the game</a></li> </ul> </div></html> Now is my question How can I draw a border just around the used space? I tried the folowing: #navigation { float: left; text-align: center; width: 9%; height: 90%; border-style: solid; border-color: red; border-width: 1px; font-weight: normal; } but the border is around whole the navigation div included lots of white spaces... Quote Link to comment Share on other sites More sharing options...
departedmind Posted July 1, 2009 Share Posted July 1, 2009 Where do you want the border ? #navigation { float: left; text-align: center; width: 15%; height: 90%; font-weight: normal; border:1px solid black; } #navigation li { border:1px solid blue;} #navigation li a { border:1px solid red;} Paste this in your style and see the different borders. Quote Link to comment Share on other sites More sharing options...
DEVILofDARKNESS Posted July 1, 2009 Author Share Posted July 1, 2009 Thanks, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.