ColdFusion Consulting
Fast, Scalable, and Data-Driven Web Applications that your business depends on.
ColdFusion Articles

 home > articles >

ColdFusion Documents Introduction to CSS   May 11, 2007

Using CSS to design your ColdFusion web sites is a great way to go. ColdFusion web sites built using CSS are better looking and faster to download then other non-CSS designed sites. Everywhere you look these days, you see very professional ColdFusion web sites using CSS. The critical components of CSS can be tricky at first, but if you stick with it and persevere, you will be rewarded. Using style sheets is an excellent way to design your web site; you will need to understand three concepts to implement style sheets into your ColdFusion web site and are as follows: setting up rules for common html tags, setting up rules for classes, and setting up rules for custom ID selectors.

To use CSS style sheets you will need to understand how to set up tag based rules. For example, normal XHTML tags, such as, table, body, header, and paragraph tags can have rules applied to them. You can have attributes such as font-family, font-size, font-weight, and color. These attributes each have a value associated with them. Understanding the fundamentals of how to implement tag-based selectors is a necessary ingredient to using CSS style sheets in your ColdFusion web site design. Let us move you into the next section where you will learn about setting up class rules.

Setting up class-based rules in CSS is quite easy. Classes allow you to have multiple variations of tag-based rules. For example, let us say you needed certain paragraphs using the paragraph tag to appear in bold and some to appear in regular font type. You can set a class attribute to make this happen. Setting up classes in CSS is a great way to add variety to your styles and they can be very useful. Now, that you just learned about classes in CSS let us teach you how to create your own custom selectors.

Finally, you will need to understand how to use customer ID selectors. These are known as divs. For example, a div is a container in the shape of a box. If you have used traditional HTML tables to build your website layout, you can now do this entirely using custom divs. You can set up a div element for the header, nav, body, and footer. Each div is in the shape of a box and can have margin around the border, can have padding within the border, and be placed on the page in the left or right side of the page. Custom ID selectors are at the heart of CSS and can help you build clean, custom designed layouts.

In conclusion, using CSS style sheets is an excellent way to design your ColdFusion web sites. You learned the basics of how to implement CSS into your ColdFusion web design projects. You have been given some examples to help you illustrates these main concepts. Using CSS style sheets is an excellent way to design your web sites, you will need to understand these three concepts to implement style sheets into your web site and they are as follows: setting up rules for common html tags, setting up rules for classes, and setting up rules for custom ID selectors.