Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2006
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Header Problem Using CSS

    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:

    Home
    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;".

    Thanks.

    Doug

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •