Login | Register | FAQ
Anonymous

Making Horizontal links

+ Post a reply

Page 1 of 1


Making Horizontal links

by jdog110997 » Fri May 04, 2012 10:35 pm

i need help. i don't know how to make horizontal links, only vertical

can somebody help me?
User avatar

jdog110997

  • Posts: 1
  • Joined: Fri May 04, 2012 10:32 pm

Re: Making Horizontal links

by XainPro » Sat May 05, 2012 5:14 am

well you can make it 2 ways 1 with the un ordered list and css and with simple html as well
i.e
Code: Select all
<span><a href="#">HOME</a></span>|<span><a href="#">About US</a></span>|<span><a href="#">Contact US</a></span>

this is an old aproch now the latest and recommended aproch is by using list items like this
Code: Select all
<ul id="horizontal-menus">
<li><a href="#">HOME</a></li>
<li><a href="#">About US</a></li>
<li><a href="#">Contact US</a></li>
</ul>


but by default list items show a bullet in front of them and they are vertical you can change this behavior by using CSS
i.e
Code: Select all
#horizontal-menus {
list-style: none;
    float: left;
}
#horizontal-menus li {
    float: left;
    display: inline;
    margin: 0 10px;
}

#horizontal-menus li a {
    text-decoration: none;
    float:left;
    color: #999;
    cursor: pointer;
    font: 900 14px/22px "Arial", Helvetica, sans-serif;
}


i hope this will help you :)
User avatar

XainPro

  • Posts: 2121
  • Joined: Fri Feb 17, 2012 8:10 pm


+ Post a reply

Page 1 of 1