Posts tagged ‘css’

Reset Style Sheet

January 1st, 2008

Reset style sheets are used to create a baseline that web designers can work from no matter which browser people are using to view the web site.

On the web, a style sheet is a file or section of code contains information about how to display elements on a web page. A style sheet tells the browser where to place certain elements, how big they should be and what colour they should be. Styles sheets are written in CSS (Cascading Style Sheets).

Whether or not the designer adds a style sheet to a web site, the web browser will still use its own default style sheet to decide how big different types of text elements should be and what sort of margins they should have etc. Each browser (Internet Explorer, Firefox, Safari, Chrome, Opera etc)  uses different default settings.

So many web designers choose to use a reset style sheet to clear out all of the default setting before applying their own styles.

Class

January 1st, 2008

A class is an attribute that is applied by a web designer to a specific set of elements in a web page. The class has instructions about how to display those elements when the page is loaded.

Classes are often defined in a seperate file called a style sheet which can be used on all of the pages that make up a web site.

For example, if we have a calender grid displayed on our page, we may apply a class called "weekend" to the columns in the calendar that are for Saturday and Sunday.

In the style sheet for the web site, the class "weekend" could contain instructions to highlight the columns in a bright colour such as yellow and make the letters bold.

Classes don't have to exists in a separate fille called a style sheet, but by keeping all of the classes in one place (a separate file) presentational information is much easier to maintain and change.