HTML Form input boxes clear when clicked

Friday, August 21st, 2009

Here’s a quick tip on clearing the default text from text boxes in a form.
First of all you can add the default text to a input box by declaring a value:
<input type=”text” value=”Enter Name” />
Now we can add an ‘onfocus’ event that will delete this value when the box is clicked, essentially by replacing it [...]




Div containing floating divs collapses

Friday, August 7th, 2009

After about an hour of trying to work out why the spacing between my posts was working in Internet Explorer but not in Firefox, I stumbled upon a common issue.
If a Div contains floating divs it will not resize the height to contain the floating divs. So adding padding to the containg div has no [...]