I had a chance to read about CSS in basic level in bean software. I am presenting as it is here
Why CSS?
Any beginner web developer / designer can easily apply a multitude of formatting to the web pages he produce. One of the methods by which an experienced web designer can show up from the crowd is to provide flexibility to this formatting as well.
What is CSS? | |||||||||||
| CSS (Cascading Style Sheets) is a well established and frequently used technology to achieve the separation we mentioned above between formatting and content. It's supported by virtually all of the moderns web browsers. When you employ CSS techniques, you are always sure that altering the formatting of your web pages will go as smooth as possible. . | |||||||||||
How CSS works? What about CSS levels? | |||||||||||
| You can apply CSS formatting to your web pages at different levels. The first level applies formatting to an entire set of pages in the same time, and this is the level we are mostly interested in in this tutorial. The next two lower levels is to apply CSS to one page by defining the CSS styles in the head of this page or to apply CSS to one particular element inside the page using the STYLE attribute. We are not going to present the two later lower levels here as they suffer from the original problem we are trying to solve: Text is kept with formatting in the same place! Let's illustrate the first level by an example. | |||||||||||
Example 1: Using CSS to format a set of pages | |||||||||||
Create 2 HTML pages as shown in figure 1. When you display them they will display with their default formatting in your web browser as in figure 2.
First of all, create a text file (this is our CSS file) and type the text in figure 3 inside it and save it as "Format.CSS".
We now need to bind the formatting instructions stored in the "Format.CSS" file to our two pages. This can be easily achieved by adding a link tag to the head section or our HTML pages. See our two HTML pages after the changes in figure 4.
| |||||||||||
Jigsaw now combined! | |||||||||||
The biggest advantage we can see here is that you can have 100's of HTML files and in the same time you are able to change the format of every file of them just by changing the format of the CSS file they are all referring to. What a life saver! Let's now dig somewhat deep inside the the code we added to our HTML files to refer to the CSS file (See figure 4):
| |||||||||||
But no one can practically proceed like this! | |||||||||||
| Regardless of the flexibility we gained from using CSS, we are still facing a big problem with the development of the CSS files themselves. No one likes to format text by typing the name of the font he is using or by calculating the numeric equivalent of the color he needs to use. People typically prefer a WYSIWYG interface from which they can visually do whatever formatting they like and then the CSS file is generated automatically and accordingly. Fortunately, Microsoft Visual Studio 2005 contains a visual designer for CSS files. For example, you can select the following from your menus: File / New / File / Web / Style Sheet. You will be presented with a CSS editor inside which you can visually customize your CSS file. | |||||||||||
And .... What is next? | |||||||||||
| The best thing about CSS is not only the flexibility it provides. It's widespread and support in virtually any modern web browser is also a major advantage. If you can afford to go with some thing richer than CSS but less standard, you can go with ASP.NET Themes and Skins. They are much powerful than CSS but still not widely used as CSS. | |||||||||||