/ Published in: CSS
I tried a menu bar with html5 and css3. Please give me some advice for more advance.
Expand |
Embed | Plain Text
a { text-decoration: none; } nav { background-color: #A3A5A8; border: 1px solid #FFF; border-radius: 6px; display: block; -moz-border-radius: 6px; -webkit-border-radius: 6px; -moz-box-shadow: 0 0 14px #123; -webkit-box-shadow: 0 0 14px #123; box-shadow: 0 0 14px #123; font-size: 15px; margin-bottom: 10px; padding: 8px 2px; width: 450px; } nav a { padding: 5px 10px; color: #141414; } nav .active, nav a:hover { background-color: #000; border-radius: 6px; color: #FFF; -moz-border-radius: 6px; -webkit-border-radius: 6px; }
Comments
Subscribe to comments
You need to login to post a comment.

You should target a:link, a:visited, a:hover and a:active (to better remember: LoVe/HAte). While it does work targetting a on its own it is good practice to target all its states.
"background:#000" is the same as "background-color:#000". There are many short-hands in CSS and you can use them.
Other than that it seems quite okay :)