blenderNetworkpatreonblender-logosdheartuserthtimesbookphotopencilmap-markerchevron-rightbancommentcommentstwitterfacebookrsschainnavicongoogle-plusenvelopelinkedinmail-replycalendar-otumblrredditstumbleuponshare-altbloggerflattrflag

CSS-Menu

CSS-Menu

Postby djm » May 27th, 2010, 2:35 am

On my second design on the brektzar website I've been working on making my very own CSS-menu. Yes, I did manage to make it work and it looks nice aswell. BUT.. I't very pale when it comes to FX.. I didn't want to add too much to id, so I removed my Hover-Add-Menus (Menues that pop out Next to the Main menu on a mouseOver command, but in CSS).

Anyway, for those who are interested, here's the CSS for it:
(I used the class-names glossmenu because the tutorial I worked with had that name).
Code: Select all

.glossymenu, .glossymenu li ul{
list-style-type: none;
margin: 0;
padding: 0;
width: 126px; /*WIDTH OF MAIN MENU ITEMS*/
border: 0px solid black;
}

.glossymenu li{
position: relative;
}

.glossymenu li a{
background: white url(glossyback.gif) repeat-x bottom left;
font: bold 12px Verdana, Helvetica, sans-serif;
color: white;
display: block;
width: auto;
padding: 5px 0;
padding-left: 10px;
text-decoration: none;
}

.glossymenu li ul{ /*SUB MENU STYLE*/
position: absolute;
width: 126px; /*WIDTH OF SUB MENU ITEMS*/
left: 0;
top: 0;
display: none;
}

.glossymenu li ul li{
float: left;
}

.glossymenu li ul a{
width: 126px; /*WIDTH OF SUB MENU ITEMS - 10px padding-left for A elements */
}

.glossymenu .arrowdiv{
position: absolute;
right: 2px;
background: transparent url(arrow.gif) no-repeat center right;
}

.glossymenu li a:visited, .glossymenu li a:active{
color: white;
}

.glossymenu li a:hover{
background-image: url(glossyback2.gif);
}

/* Holly Hack for IE \*/
* html .glossymenu li { float: left; height: 1%; }
* html .glossymenu li a { height: 1%; }
/* End */




The HTML is very simpel! If you know what <ul> and <li> is and how they work you'll make this menu with ease :D

The HTML:
Code: Select all

<ul id="verticalmenu" class="glossymenu">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>

Enjoy :)
Regards, DJM aka Sheldin!

DeviantArt Profile
http://sheldiner.deviantart.com/

Youtube (Tutorials/Gaming)
http://www.youtube.com/SheldinLP
User avatar
djm
Pro
Pro
 
Posts: 478
Joined: December 11th, 2009, 4:04 pm
Location: Sweden
Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

cron