Jump to content

[SOLVED] border


DEVILofDARKNESS

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.