creating a menu in CSS
-
Hi,
I’m a newbie to css. I have the HTML Code ready with me. Please find it below. I have attach the html code below. I want the menu to be something like the one attached image.
<ul id = "nav"> <li class="selected"><a href="#">Home</a></li> <li><a href="#">About Me</a></li> <li><a href="#"></a>Category 1</li> <li><a href="#">Category2</a></li> <li><a href="#">Category 3</a></li> <li><a href="#">Contact Us</a></li> </ul>[IMG]http://i67.tinypic.com/nqssw5.png[/IMG]
Can somebody please help me with CSS.
-
Is your site with this menu up somewhere live currently? That could help guide you a bit more specifically.
This would be a great resource to apply to your own code: http://www.w3schools.com/css/css_navbar.asp
Its in my local host. I’m developing a html site and going to convert it to wordpress template. Can you help me out @allisonplus ?
I can definitely try! Something to keep in mind is that WordPress applies additional classes, etc. to it’s menu + items so the selectors you would be using for your code example currently would most likely shift once you “transfer” your menu items into the WordPress dashboard.
#nav li { display: inline-block; padding: 10px 20px; background-color: pink; } #nav li a { text-decoration:none; color: purple; }This would be a starting point. Are there specific question I can assist with?
I have wireframed something like this http://tinypic.com/r/nqssw5/9 . Would just want 2 horizontal lines and a menu in the center
#nav { border-top: 2px solid black; border-bottom: 2px solid black; }Would add the lines on the top/bottom.
Thanks @allisonplus… It worked for me…
The topic ‘creating a menu in CSS’ is closed to new replies.