Html Horizontal Menu

View previous topic View next topic Go down

avatar
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06
View user profile

Postgrimofdoom on 8/3/2012, 7:55 am

I need help. I need a horizontal menu i could use in an html page. Can someone please give me a script that makes a horizontal line with onmouseover type to show A box that can use links.
avatar
Terry Harvey
Member
Member
Forum Posts : 2
Member Since : 2012-03-06
View user profile

PostTerry Harvey on 20/3/2012, 4:09 am

Code:
<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>

Smile
avatar
Mike
Administrator
Forum Posts : 446
Member Since : 2011-10-28
View user profile http://www.codinghelp.org

PostMike on 20/3/2012, 5:47 am

Expanding on Terry's post. You'll need to add CSS

Code:
<div id="navigation">
<ul>
   <li><a href="#">Menu Item 1</a></li>
   <li><a href="#">Menu Item 2</a></li>
   <li><a href="#">Menu Item 3</a></li>
   <li><a href="#">Menu Item 4</a></li>
</ul>
</div>

Code:
#navigation{
width:100%;
height:30px;
background-color:#999;
}
#navigation ul{
margin:0px; padding:0px;
}
#navigation ul li{
display:inline; height:30px; float:left; list-style:none; margin-left:15px;
}
#navigation li a{
color:#fff; text-decoration:none;
}

#navigation li a:hover{
text-decoration:underline;
}
avatar
Terry Harvey
Member
Member
Forum Posts : 2
Member Since : 2012-03-06
View user profile

PostTerry Harvey on 20/3/2012, 5:51 am

Oops - I beg your pardon. I misread the post and thought that you wanted a vertical menu.
avatar
Mike
Administrator
Forum Posts : 446
Member Since : 2011-10-28
View user profile http://www.codinghelp.org

PostMike on 20/3/2012, 1:53 pm

Not a problem terry Smile
avatar
grimofdoom
Member
Member
Forum Posts : 106
Member Since : 2012-03-06
View user profile

Postgrimofdoom on 20/3/2012, 2:40 pm

Sorry i havnt replied sooner, i meant a horizontal with simple drop down box(yes i know css is needed.)
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum