Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Having problems with top nav bar

Featured Replies

For some reason it wont display correctly in either mozilla or i.e and i have triple checked everything.

its the horizontal ist in

 

.navlinkstop > .topnav

 

even though ive set the height to 25px and have a background image of 25px the display isnt even and when i add a border to see whats going wrong .navlinks top is about twice the height of .topnav. I cant work it out.

 

<!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 http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>Website Title V1.0</title>

<link rel="stylesheet" href="style.css"/>



</head>

<body>

<div id="wrapper">
<div class = "toplinks"><div class ="tlcon"><a href="#">Home</a><a href="#">Contact</a>
	<a href="#">About</a><a href="#">Terms & Conditions</a></div></div>
<div class ="logobit"></div>
<div class="navlinkstop">	
	<div  class="topnav">
		<ul>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
		</ul>
	</div>
</div>

<div id = "lcol">

<div id="navleft">
<div class = "navleftheader"></div>
<div class= "navleftlistbox">
	<ul>
		<li><a href="#">Home</a>
		<ul>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>	
		</ul>

		</li>

		<li><a href="#">Projects</a>
		<ul>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>	
		</ul>
		</li>
		<li><a href="#">Qualifications</a>
		<ul>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>	
		</ul>
		</li>
		<li><a href="#">Contact</a>
		<ul>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>
			<li><a href="#">inner link</a></li>	
		</ul>
		</li>

	</ul>
</div>

</div>

</div>




<div id = "ccol">
<div id = "ccolhdr"><div class="hdrtxt">My Previous Work</div></div>
<div id ="cleft"><a href="#"><img src="bargainpcs.jpg"/></a>
			  <a href="#"><img src="bargainpcs.jpg"/></a>
			  <a href="#"><img src="bargainpcs.jpg"/></a></div>
<div id ="cright">
	<p>This was the first site i worked on. It was designed as an ecommerse site to
	sell computer components. To build this site i worked with Zen Cart and created
	my own template using PHP, CSS and HTML</p>
	<br>
	<br>

	<p>This was the first site i worked on. It was designed as an ecommerse site to
	sell computer components. To build this site i worked with Zen Cart and created
	my own template using PHP, CSS and HTML</p>
	<br>


	<p>This was the first site i worked on. It was designed as an ecommerse site to
	sell computer components. To build this site i worked with Zen Cart and created
	my own template using PHP, CSS and HTML</p>
</div>

</div>
<div id = "footer"></div>
<div id = "Copyw"><div class="cw">Copywrite 2008 Robe Technology:: <a href="www.edealbase.co.uk"> Web Design Specialists</a></div></div>
</div>

</body>
</html>

 

#wrapper {
margin-left: 100px;
margin-right: auto;
width: 1000px;


}

.toplinks {
width: 1000px;
float:left;
height: 20px;
border: 1px solid  #6d6969;


}

.tlcon {
float: right;

}

.tlcon a {
text-decoration: none;
font-size: 9pt;
font-family: verdana;
font-weight: bold;
color: #38b8bd;
padding-right: 15px;

}

.logobit {
width: 1000px;
float: left;
height: 150px;
background-image: url(logo.png);
}

.navlinkstop{
width: 1000px;
float: left;
height: 25px;
background-image: url(bk.gif);
background-repeat: repeat-x;
	border: 1px solid #a4b2bc;


}

.topnav {
height: 25px;





}

.topnav ul {
margin 0;
padding 0;



}

.topnav ul li {
display: inline;
border: 1px solid #a4b2bc;
padding-left: 20px;
padding-right: 20px;




}
.topnav ul li a {


text-decoration: none;
font-size: 12pt;
font-family: 'orator std';
color: #364149;
font: weight: bold;


}

.topnav ul li a:hover {
color: #79b8b4;


}


#navleft {
width: 150px;
float: left;

}

.navleftheader {
width: 150px;

}

.navleftlistbox {
width: 150px;

}

.navleftlistbox ul {
list-style: none;

}

.navleftlistbox ul li {

}

.navleftlistbox li li {

}

.navleftlistbox ul li a {
text-decoration: none;
font-size: 9pt;
font-family: verdana;
font-weight: bold;
color: #38b8bd;
border-bottom: 1px solid #6d6969;
width: 100%;
display: block;
padding-top: 10px;


}
.navleftlistbox li li a {
font-weight: normal;
color: #6d6969;
border: none;
padding-left: 0px;
padding-top: 5px;
padding-bottom: 5px;


}

.navleftlistbox li li a:hover {
font-weight: bold;
background-color: #d5f4f7;
color: #4a4646;

}

.navleftlistbox li ul {
margin: 0px;
padding: 0px;

}


#ccol {
width: 845px;
float: left;



}

#ccolhdr{
width: 845px;
float: left;	
font-size: 12pt;
font-family: verdana;
font-weight: normal;
color:  #6d6969;


}

.hdrtxt {
font-size: 12pt;
font-family: verdana;
font-weight: normal;
color:  #6d6969;
padding-left: 70px;
padding-top: 5px;
padding-bottom: 19px;

}

#cleft{
padding-left: 25px;
width: 320px;
float:left;




}

#cleft img{


}

.lft{
padding: 15px;


}

.rit{
padding: 15px;


}

#cright{

width: 420px;
float: left;


}

#cright p {

font-size: 10pt;
font-weight: bold;
font-family: verdana;
color: #6d6969;


}


#footer {
width: 1000px;
height: 100px;
float: left;
background-color: #e3eff8;
border: 1px solid  #6d6969;

}

#Copyw {
width: 1000px;
height: 30px;
float: left;
clear: both;

}

.cw{
font-size: 7pt;
font: weight: bold;
font-face: verdana;
color: #3f4142;
text-align: center;


}

In your html you seem to have a lot of spaces:

 

<div class="topnav">

<div id = "lcol">

<div id = "footer"></div>

<div id = "Copyw">

 

etc

this:

 

<div class="navlinkstop">	
	<div  class="topnav">
		<ul>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
		</ul>
	</div>
</div>

 

could so easily be:

			<ul class="navlinkstop">
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
			<li><a href="#">TopNav</a></li>
		</ul>

 

This would make your life so much simpler.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.