0

Is there any way to make the tabs on this script vertical instead of horizontal? (stacked on top of each other)

http://www.javascriptsource.com/navigation/giltab.html

Love it otherwise, but I'm wanting to do a menu inside my main page & my main menu is horizontal.

4

2 回答 2

1

垂直的

     <!DOCTYPE html>
     <html>
     <head>
     <style type="text/css">
     ul
     {
     list-style-type:none;
     margin:0;
     padding:0;
     }
     a
     {
     display:block;
     width:60px;
     background-color:#dddddd;
     }
     </style>
     </head>

     <body>
     <ul>
     <li><a href="#home">Home</a></li>
     <li><a href="#news">News</a></li>
     <li><a href="#contact">Contact</a></li>
     <li><a href="#about">About</a></li>
     </ul>

     </body>
     </html>

水平的

    <!DOCTYPE html>
    <html>
    <head>
    <style type="text/css">
    ul
    {
    list-style-type:none;
    margin:0;
    padding:0;
    }
    li
    {
    display:inline;
    }
    </style>
    </head>

    <body>
    <ul>
    <li><a href="#home">Home</a></li>
    <li><a href="#news">News</a></li>
    <li><a href="#contact">Contact</a></li>
    <li><a href="#about">About</a></li>
    </ul>
于 2012-07-23T08:30:18.997 回答
0
use
//vertical  
li
    {
    display:inline;
    }

//horizontal

li
    {
    display:block;
    }
于 2012-07-23T10:34:26.483 回答