CSS, How to work with content areas.

October 3rd, 2009

The content are of a box can be given width, height, and color. Width and height can be specified in points (equal to 1/72 of an inch), picas (equal to 12 points), pixels, ems, exes, millimeters, centimeters, inches, or percents. p { width: 100pt ;} p { width: 20pc;} p { width: 300px;} p { width: 40em;} p { width: 50ex;} p { width: 600mm;} p { width: 8in;} p { width: 50%;} The color property can be used to style the text color Read More...

CSS, How to Padding Padding and more Padding

August 24th, 2009

Padding can be applied to the outside edges of the content area of any block level or inline element. Padding creates the space between the edge of the element and its content. Like margins, padding can be applied to individual sides of a box. p {padding: 10px} h1 {padding-top:0px} h2 {padding-right:5px} h2 {padding-bottom:7px} h3 {padding-left:10px} Padding can alse be applied using a single shorthand property Read More...

CSS, How to deal with background color and images.

August 23rd, 2009

The background-color property sets the background color of an element. The backgound-image property applies a background image to an element, which will appear on top of any background-color. body { background-color:#000 } h1 { background-image:url(header.png); }

CSS, How to Hide Styles from Older Browsers?

August 12th, 2009

Some older browsers, such as Netscape Navigator 4 and IE 4, have poor support for CSS. It is possible to hide styles from these browsers using specific media types and @import rules. All styles will be hidden from Netscape Navigator 4 by changing the link element's media type from screen to screen, projection Read More...

CSS, How To use advanced selectors.

August 6th, 2009

Child selectors Child selectors are used to selected an element that is a direct child of another elements parent. Child selectors will not selected all descendants, only direct children. For example, you might want to target an <em> that is a direct child of a <div>, but not other <em> elements that are descendants of the <div> *Child selectors are not supported by IE 5, 5 Read More...

CSS, How to, should you use ID or Class?

August 5th, 2009

Should you use id or class? Classes can be used as many times as needed within a document. IDs can only be applied once within a document. If you need to use the same selector more then once, classes are a better choice. However, IDs have more weight then classes. If a class selector and ID selector apply the same property to one element, the ID selector's value would be chosen.

CSS, How to use type, class and id selectors

August 4th, 2009

Selectors are one of the most important aspects of CSS because they are used to "select" elements on an HTML page so the can be styled. Sample HTML <body> <div id="content"> <h1> Heading Here </h1> <p> Lorem ipsum dolor sit amet. </p> <p>Lorem ipsum dolor <a href="#">sit</a> amet Read More...