mardi 4 août 2015

How to style more than one ul

I'm using the CSS lines below for a menu on a webpage.

The problem is that I don't know how to make that code apply only to the menu, and not to other ul -unordered lists- on the page!

ul {
text-align: left;
display: inline;
margin: 0;
padding: 15px 4px 17px 0;
}

ul li {
font: bold 12px/18px sans-serif;
display: inline-block;
margin-right: -4px;
position: relative;
padding: 15px 20px;
background: #AAF7BB;
font-size: 110%;
}

ul li:hover {
background: #ffffff;
color: #000000;
}
ul li ul {
padding: 0;
position: absolute;
top: 48px;
left: 0;
width: 150px;  
opacity: 0;
visibility: hidden;
}
ul li ul li { 
background: #ffffff; 
display: block; 
color: #00ff00; 
}

ul li ul li:hover { background: #ffffff; }

ul li:hover ul {
display: block;
opacity: 1;
visibility: visible; 
}
a:link {
text-decoration: none;
}

a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}

a:active {
text-decoration: none;
} 

Please help.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire