HTML CSS examples for CSS Property:padding
CSS drop down padding
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {<!--from w ww .j ava 2s. c om--> margin:0; padding:0; border:0; font-size:100%; font:inherit; vertical-align:baseline; } article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display:block; } body { line-height:2; } ol, ul { list-style:none; } blockquote, q { quotes:none; } blockquote:before, blockquote:after, q:before, q:after { content:''; content:none; } table { border-collapse:collapse; border-spacing:0; } #navbar { margin:21px 0px; background-color:Chartreuse; } #navbar a { text-decoration:none; display:block; padding:11px; color:yellow; } #navbar a:hover { background-color:blue; color:pink; } #navbar li { display:inline-block; position:relative; } #navbar li ul { background-color:OrangeRed; position:absolute; display:none; } #navbar li:hover>ul { display:block; } </style> </head> <body> <ul id="navbar"> <li> <a href="#">Lorem ipsu</a> <ul> <li> <a href="#">Lorem </a> </li> <li> <a href="#">Lorem </a> </li> </ul> </li> <li> <a href="#">Lorem</a> <ul> <li> <a href="#">Lorem </a> </li> <li> <a href="#">Lorem ip</a> </li> </ul> </li> <li> <a href="#">Lorem i</a> </li> <li> <a href="#">Lorem i</a> </li> </ul> </body> </html>