1 reply [Last post]
metzler000
metzler000's picture
User offline. Last seen 1 year 21 weeks ago. Offline
newbie
Timezone: GMT-4
Joined: 2010-09-06
Posts: 5
Points: 8

If you look at a page I started using tables www.dragora.com/newindex1.asp you can see the menu bar I have. I have the menu in a table surrounded by cells that expand to the full length of the page. I've wasted another whole day trying to figure out how to do this with CSS and am pulling my hair out. I don't even know what this type of menu is called and every time I search google for "expanding menu" "stretching menu" "liquid menu" other types of menus come up. Can anyone post any code, or give me a link with code on how this is accomplished? I'm seriously trying, but the more I try and work with css, the better tables look. Designing in tables just seemed WAY more intuitive.

Mark

Tyssen
Tyssen's picture
User offline. Last seen 20 hours 34 min ago. Offline
rank Moderator
Moderator
Timezone: GMT+10
Joined: 2004-05-01
Posts: 8123
Points: 1302

Try this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title>Menu Test</title>
  <style>
    body {
      margin: 0;
      padding: 0;
    }
    ul {
      background: #CCC;
      list-style: none;
      margin: 0;
      padding: 5px 0;
      overflow: hidden;
      text-align: center;
      width: 100%;
    }
      li {
        border-left: 1px solid;
        display: inline;
        margin: 0 0 0 10px;
        padding: 0 0 0 10px;
      }
  </style>
</head>
<body>
  <ul>
    <li><a href="#">Link 1</a></li>
    <li><a href="#">Link 2</a></li>
    <li><a href="#">Link 3</a></li>
    <li><a href="#">Link 4</a></li>
    <li><a href="#">Link 5</a></li>        
  </ul>
</body>
</html>

How to get help
Post a link. If you can't post a link, jsFiddle it.
My blog | My older articles | CSS Reference