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 to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Horizontal nav inline issues

    Hello,
    So I'm working on getting this css horizontal navigation to work. I'm running into two problems which probably have the same solution.

    1. If I use li {display:inline} I can get the li's to line up horizontally. When I do this they don't want to use the width that I set for them through an id. They expand only based on the width of text. Unfortunately (I didn't design this) they require a set width for each button. They also then display a small white gap in-between each 'button.'

    2. If I use li {display:block} I can get the li's to take the width that I set for them. But of course then they want to display vertically instead of horizontally.

    (they really need to have me just do design and no programming )

    My file with the li {display:inline} is here:
    http://www.alluremediadesign.com/fps/css/index2.html
    and the css here:
    http://www.alluremediadesign.com/fps...tylesheet2.css


    My file with the li {display:block} is here:
    http://www.alluremediadesign.com/fps/css/index.html
    and the css here:
    http://www.alluremediadesign.com/fps/css/stylesheet.css

    Any help is appreciated! Thanks in advance!

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    Code:
    ul {
      list-style: none;
    }
    li {float: left;}
    ul a {
      display: block;
      float: left;
      width: ??px;
      height: ??px;
    }
    That should do the trick...


  •  

    Posting Permissions

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