SitePoint
Reference
CSS
Layout Properties
display
CSS Live Demo: display
(this page)
See also:
All Live Demos
CSS Live Demo: display
Type your
CSS
here:
(any properties allowed except expression, behavior and @import)
.menu a { display:block; } .menu a { border:1px solid #f90; background:#fec; padding:4px 10px; margin:0 0 1px 0; color:#c60; text-decoration:none; font:normal normal normal 0.8em sans-serif; } .menu a:hover, .menu a:focus, .menu a:active { background:#f8fbd0; } .menu { width:7em; } .menu, .menu li { margin:0; padding:0; list-style-type:none; }
Type your
HTML
here:
(any tags allowed except script, iframe, frame, object, img and embed)
<ul class="menu"> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Contact us</a></li> </ul>
Show me!
Your results appear here: