CSS TAB Pls help

Discussion in 'CSS' started by gireeshgv, Apr 7, 2006.

  1. #1
    Pls Help me to create a TAB Using CSS.
     
    gireeshgv, Apr 7, 2006 IP
  2. superclick

    superclick Peon

    Messages:
    369
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is so many way how to make tabs here is one:

    HTML

    <div id="topnav">
    <a href="#" class="active">Link1</a>
    <a href="#">Link2</a>
    <a href="#">Link3</a>
    <a href="#">Link4</a>
    <a href="#">Link5</a>
    </div>

    CSS

    #topnav {
    margin-top:105px;
    margin-left: 300px}

    #topnav a{
    display: block;
    float: left;
    text-align: center;
    width: 95px;
    height: 35px;
    line-height: 35px;
    text-decoration: none;
    color: #a0a0a0;
    text-transform: uppercase;
    font-size: 0.7em;
    background-image:url(tab.png);
    background-position:bottom left;
    background-repeat:no-repeat;}

    #topnav a:hover {
    background-image:url(tab.png);
    color: #000;
    background-position:top left;
    background-repeat:no-repeat;}

    #topnav .active {
    background-image:url(tab.png);
    color: #000;
    background-position:top left;
    background-repeat:no-repeat;}

    Make one 95x72 image in colors you wish for the tab background.

    I am suggesting you to visit oswd.org or openwebdesign.org you vill find a lot of useful information regarding CSS there.
     
    superclick, Apr 7, 2006 IP
  3. 87654321

    87654321 Well-Known Member

    Messages:
    317
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #3
    Yea, openwebdesign.org is a very comprehensive resource!
     
    87654321, Apr 9, 2006 IP