CSS: How can I reduce the spacing between paragraphs?

March 8th, 2009

Set line-height to less than 1. But be careful - while paragraphs are drawn closer together, the lines within a paragraph are pushed very close together. With anything less than .9, letters on two lines within a para will touch. It is therefore only useful if you know your paragraphs will be less than one [...]

Filled Under: CSS

CSS: Change the color of the text on change event.

March 8th, 2009

<form>
<input type=”text” onChange=”this.style.color=’red’”>
</form>
</p>
<br>
<p class=”code”>
// Add this to the head section of your page
<style type=”text/css”>
textarea.normal { background-color:FFFFFF }
textarea.hilite { background-color:FFFFCC;color:0000FF }
.textbox_normal { background-color:#FFFFFF; }
.textbox_hilite { background-color:#FFFFCC;color:#0000FF }
</style>
<input type=”text” name=”textbox1″ size=”30″ maxlength=”40″ class=”textbox_normal” onFocus=”this.className=’textbox_hilite’” onblur=”this.className=’textbox_normal’”>
<textarea name=”textarea1″ cols=”100″ rows=”2″ wrap=”VIRTUAL” class=”normal” onFocus=”this.className=’hilite’” onblur=”this.className=’normal’”></textarea>

Filled Under: CSS