- This topic is empty.
-
AuthorPosts
-
May 7, 2012 at 9:18 pm #37977
alexflaco
ParticipantHi,
I need to do a nav bar with different items color. for the moment all my buttons have the colour desired in a roll over state but the problem comes when the button has sub menus. I can not make it work and is driving me mad.
here is the link two show you what i mean.
http://www.sunnyspell.com/navbar/index.html
Thanks
May 7, 2012 at 10:01 pm #102470alexflaco
ParticipantEach button has a different colour when hovered as I show in the second picture. the initial state of the nav bar is with the background white and text in black.
If the button had sub buttons like in the About Us the effect will be like in the third picture.I hope it is clear now, if you check the pictures you can see the different states of the buttons.
Thanks
May 7, 2012 at 10:14 pm #102471joshuanhibbert
MemberPlease show us what you currently have. Ideally in a jsFiddle.
May 7, 2012 at 10:29 pm #102472alexflaco
ParticipantGuys, I am going to bed, I will catch up with you tomorrow with everything ready for action.
May 8, 2012 at 2:32 am #102483timmey
Memberif i get it right:
how do you apply your stlyes to each button? if you have a class like.about-us {background: ..}
, you could style the submenu with
.about-us li {background: ..}
May 8, 2012 at 6:58 am #102491Rutger
MemberYou could use
.about-us li:hover {background: ..}
May 10, 2012 at 3:41 pm #102669ylc66
Participanthi,
what about :
HTML :
CSS :
ul {list-style-type:none;}
ul li {float: left; position: relative}
ul li#blue ul { display:none; position:absolute; top:43px;left:0; width:150px;}
ul li#blue:hover ul { display:block;}
ul ul li {float:none; text-align:left;}
ul li a {text-decoration:none; font-weight:bold; display:block; line-height:2em;color:black; padding:5px 10px;background-color:#F6F6F6;
border-left:1px solid white;border-right:1px solid #999;border-bottom:1px solid #999;}
ul ul li a { font-weight:normal ;border-right: none;border-left: none;}
ul li a:hover {color:white;}
ul ul li a:hover {color:grey;background-color:#40C4D0;}
ul li#green a:hover {background-color:#C5D01C;}
ul li#blue a:hover {background-color:#40C4D0;}
ul li#orange a:hover {background-color:#FF6600;}
ul li#yellow a:hover {background-color:#FFC602;}
ul li#yellowgreen a:hover {background-color:#C5D01C;}
ul li#ligthblue a:hover {background-color:#40C4D0;}
then, you can make your buttons look better, for example using ultimate css gradient
hope it helps ….
youn.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.