Double border in CSS

CSS allows you to add a border to almost all html elements. If you would like a double border you can use CSS like this: style="border:double"

March 30, 2010 · 1 min · 26 words · Andrew

Simple HEX Colour Values

Actual Display Colour HEX Colour #000000 #FF0000 #00FF00 #0000FF #FFFF00 #00FFFF #FF00FF #C0C0C0 #FFFFFF

December 10, 2009 · 1 min · 14 words · Andrew

Wordwrap that PRE!

Ever used a <PRE> in a limited width div container? You will notice that the line gets cut off almost as if word-wrap was not enabled. To correct this you can add the following code into your CSS file. pre{ white-space: pre-wrap; /* CSS2.1 compliant */ white-space: -moz-pre-wrap; /* Mozilla-based browsers */ white-space: o-pre-wrap; /* Opera 7+ */ } This code was originally found somewhere else online but I found it really useful so reposted it!...

November 23, 2009 · 1 min · 91 words · Andrew

Guillotine-Bug? Bug

Yes, it’s called a Guillotine-Bug and it’s yet another bug IE users get to look forward too 😛 So how does it work? Basically, the hasLayout messes around and elements become invisible and visible according to random things. Rather silly, but a bit of a bitch to initially figure out. So how do you fix it? Try this: in your css file add: * html .container {height: 1%;} .container:after { content: �....

October 20, 2009 · 1 min · 90 words · Andrew

cross browser alpha css

.thediv { opacity:.80; filter:alpha(opacity=80); -moz-opacity:.80; }

October 20, 2009 · 1 min · 6 words · Andrew

Need more than hover?

I had a hover effect on an html input element but also needed to have an active state. The css was like this for the inputs in mention: .contactformdiv input:hover, .contactformdiv textarea:hover { background-color:#fff; } It was simple, I just added a focus… .contactformdiv input:hover, .contactformdiv textarea:hover, .contactformdiv input:focus, .contactformdiv textarea:focus { background-color:#fff; }

October 20, 2009 · 1 min · 54 words · Andrew