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... Link to comment https://forums.phpfreaks.com/topic/164359-solved-border/ 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. Link to comment https://forums.phpfreaks.com/topic/164359-solved-border/#findComment-867020 Share on other sites More sharing options...
DEVILofDARKNESS Posted July 1, 2009 Author Share Posted July 1, 2009 Thanks, Link to comment https://forums.phpfreaks.com/topic/164359-solved-border/#findComment-867029 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.