Resizing Menu Bar

Discussion in 'CSS' started by FishSword, Feb 9, 2009.

  1. #1
    Hi,

    How and is it to create the following menu bar, using only the ul and li tags?
    I need this to resize upon the text being resized, and be cross-browser compatible. ;)

    Any help appreciated!
     
    FishSword, Feb 9, 2009 IP
  2. FishSword

    FishSword Active Member

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #2
    I'm Still Stuck!
     
    FishSword, Feb 20, 2009 IP
  3. Anthony Thomas

    Anthony Thomas Peon

    Messages:
    46
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    not sure if this is the kinda thing you wanted but..

    I also might have it wrong as i'm doing this off the top of my head without checking it, if it's wrong I will be able to help you further later on.

    Assuming you are using an external stylesheet and have linked it from your html already.

    html
    <ul>
    <li><a href="#">Menu item</a></li>
    <li><a href="#">Menu item</a></li>
    <li><a href="#">Menu item</a></li>
    <li><a href="#">Menu item</a></li>
    </ul>


    css

    ul {
    list-style:none;
    padding:0px; margin: 0px;
    }

    ul li {
    float:left;
    padding:0px;
    margin:0px;
    }

    ul li a {
    display:block;
    padding:5px 20px;
    color:#000;
    }
     
    Anthony Thomas, Feb 20, 2009 IP
  4. Jordash

    Jordash Peon

    Messages:
    181
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You could also put a border around each li element

    e.g.
    <style>
    ul{
    list-style-type: none;
    }
    li{
    border: 1px solid #000;
    margin: 0;
    padding: 0;
    display: inline;
    }
    </style>


    <ul>
    <li>Link 1</li>
    <li>Link 2</li>
    </ul>
     
    Jordash, Feb 20, 2009 IP
  5. FishSword

    FishSword Active Member

    Messages:
    131
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    I'm trying to create the navigation bar, as shown in the attached image. How do you make the UL and LI tags enlarge, upon the default browser text size being increased? ;)
     
    FishSword, Feb 21, 2009 IP
  6. Valiant

    Valiant Peon

    Messages:
    284
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    When the text enlarges ... so should the tags.
     
    Valiant, Feb 21, 2009 IP
  7. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Valiant is right, when you zoom in or just make the text larger, the whole thing will enlarge.
    If you'd tried this then you would know this already?
     
    wd_2k6, Feb 22, 2009 IP