View Full Version : Header Problem Using CSS

10-23-2006, 11:47 PM
I have been working with CSS for about a month and HTML for about 3 months. I think it would be more than fair to call me a newbie.

I have a header upon which I have placed:

Home About Us Contact Us

Then, I have used the following HTML:

<div id="container">
<h1 id="header">&nbsp;&nbsp;autostuffcom</h1>
<ul id="selectheader">
<h4><a href="index.html">Home</a></h4>
<h4><a href="quality.html">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quality</a></h4>

Here is how it is displayed on the header:

About Us

Contact Us

I am not using tables. Instead I am doing it using CSS.

What do I need to do to correct this problem?

Also, is there a way that I can place each element without using all the "&nbsp;".



10-23-2006, 11:51 PM
First off, you can't put h4 tags directly in a ul tag. You can only put html inside of an li tag and an li tag can only go in a ul tag. It seems like you are trying to do a horizontal list. To get spacing on the text use margins and/or padding. There is a reason these two properties exist. Check out this site for some examples of horizontal navigation menus. http://css.maxdesign.com.au/listamatic/horizontal01.htm