CSS

CSS File Include Order

Most of the time, when elements are put in the HTML HEAD tag, order does not matter.  But in the case of CSS, not only do styles cascade from the include file to the local file to the element, but styles also cascade in the order that files are included in the page's HEAD tag.  The following is a quick test that shows how the order that files are included affects the rendering of a CSS styled element.  This CSS code has been tested on Internet Explorer 8, Safari 4, and Firefox 3.5. 

CSS Shorthands and Input Styling

The following is a list of useful shorthands for specifying typically large CSS properties in a small and succinct one line definition.  This not only keeps your CSS files clean and easy to read, but more importantly, it significantly reduces the size of your CSS files. 

ASP.NET CSS Highlight TextBox on Focus

Many sites have a useful visual way to show the user what TextBox (input text control) is currently focused or selected by highlighting the background of the control with a color such as yellow. When you tab or click into the TextBox, the border and background usually change to denote it has focus.

Here is what the TextBox should look like when it is focused and unfocused after applying this trick:

Un-Focused TextBox
unfocused textbox