Guide to CSS - Part 2
This is a followup to my original list from way back. Here is another little cheat sheet for CSS. Font properties:
instead of using:
font-family: Verdana, arial;
font-style: italic;
font-weight: bold;
font-size: 10px;
shorten it by using:
font: bold 10px italic Verdana, arial; Padding:
instead of using:
padding-top: 5px;
padding-right: 20px;
padding-bottom: 5px;
padding-left: 20px;
shorten it with:
padding: 20px 5px 20px 5px; which could also be shortened again to
padding: 20px 5px; Borders:
to remove a border from an image, use the following:
border: 0;
but, if you want to use a border, try styling it, for example:
border: 3px solid #37556a;
just change the thickness and color as required, you could also change the solid to dashed. Underline:
to underline a word, paragraph or div, using the following:
text-decoration: underline; Capitalize the first letter of ever word:
text-transform: capitalize;
the rule of thumb with padding and margins is simple, the padding/margins are applied in clockwise order starting with the top (12) and ending with left (9). Links:
when styling links, remeber, LoVe HAte:
a:link {text-decoration:none;color:#a2a2a2}
a:visited {text-decoration:none;color:#000000;}
a:hover {text-decoration:underline;}
a:active {text-decoration:underline;}
That's all for now.
Geoserv
|