JamesBranam's Blog
Neat Things with CSS
Hi all,
I thought I'd share a few CSS tricks with you. These are from an earlier blog entry.
Trick 1: Removing underlines
a:link a:visited a:hover a:active {
text-decoration: none;
}
Trick 2: Adding a dotted underline
a {
text-decoration: none;
border-bottom: 1px dotted #000000;
}
Trick 3: Removing indentation in lists
ul {
padding-left: 1em;
margin-left: 0px;
}
Trick 4: A background image behind text
Trick 5: Add color to a drop down menu

It should look like this:
Trick 6: Capitalize the first letter in each paragraph
Place this between the tags.
Then place this at the beginning of each new paragraph.
It should look like this:
This is where I put my text."
Trick 7: Highlighting links on hover or when clicked
a:hover, a:active {
color: #FF0000;
background-color: #FFFF00;
}
Trick 8: Stacking headings (to get rid of unwanted space)
h1, h2 {margin-top: 3em;}
h1+h2 {margin-top: -3em;}
Trick 9: Using an image as a bullet
ul {
list-style-image: url(yourimage.gif);
}
Cheers!
--James
Posted at 07:58PM Sep 25, 2008 by branajam in NetBeans |