1 reply [Last post]
ultra mega noob
ultra mega noob's picture
Offline
newbie
Last seen: 8 years 31 weeks ago
Timezone: GMT-5
Joined: 2013-12-30
Posts: 1
Points: 2

i don't understand why i cant add a height: ??px; line in the css code to resize the nav bar. what am i missing?

<!DOCTYPE html>
	<html>
	<head>
	<title>Media Monster</title>
	link href="stylesheet.css" rel="stylesheet" type="text/css" />
	</head>
	<body>
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Solutions</a></li>
<li><a href="#">Projects</a></li>
<li><a href="#">Contact</a></li>
<li><a href="#">More</a></li>
</ul>
			</body>
			</html>

----------------------------------------------------------------

body
{
height: 100%;
width: 100%;
background: #0a0c11;
}
ul
{
font-family: "Aharoni";
font-size: 17pt;
width: 100%;
height: 100%;
list-style-type: none;
margin: 13.5px 0px;
padding: 0px;
}
li
{
display: inline;
padding-left: 0px;
float: left;
}
a:link, a:visited
{
color: #444f51;
background-color: #ea4f00;
text-align: center;
padding:8px;
text-decoration: none;
}
a:hover, a:active
{
background-color: #0a0c11;
}

bijayjoshi
bijayjoshi's picture
Offline
Regular
Patan, Nepal
Last seen: 8 years 26 weeks ago
Patan, Nepal
Timezone: GMT+5.75
Joined: 2012-02-06
Posts: 30
Points: 32

To increase the height of

To increase the height of your nav, you need to give height in li > a selector. But, since a tag is an inline element, you should first add: display: block to li > a selector.

Cheers!

Bijay Josi
Loves Open Web.