CSS Navigation

The Web Book


CSS Navigation Example Code

HTML CODE ............................................. <!DOCTYPE html> <html> <body> <ul> <li><a href="#home">Home</a></li> <li><a href="#services">Services</a></li> <li><a href="#products">Products</a></li> <li><a href="#support">Support</a></li> </ul> </body> </html> CSS CODE .................................................................... ul {list-style-type:none; margin:0; padding:0;} li {float:left;} a:link {display:block; width:120px; font-weight:bold; color:#FFFFFF; background-color:orange; text-align:center; padding:4px; text-decoration:none; text-transform:uppercase;} a:visited {color:black;} a:hover {background-color:darkorange;} a:active {color:green;} Back