Handy CSS Reminders

This is a place where I keep handy CSS snippets and how-tos that I might not want to have to look up again.

CSS Link Pseudo-Selectors

a:link {color: #0000ff;}
a:visited {color: #ff0000;}
a:active {color: #00FF00;}
a:hover {background-color: #ffffff;}
a {text-decoration: none;}

Basic Two-Column Layout

Code:

<div>Header</div>
<div>
    <div style="float:left; width: 50%;">Left Column</div>
    <div style="float:right; width: 50%;">Right Column</div>
</div>
<div style="clear:both;">Footer</div>

Example:

Header
Left Column
Right Column
Footer


More Web-Programming Resources