CSS has been around for more than 10 years already beginning in its development in 1997 but it seems it has been in the public consciousness for only a relatively short time. The reason for this is because it wasn't until the year 2000 that many web browsers began using the capabilities of CSS beyond its more basic color and font characteristics. Of course things are way different now and virtually all modern day browsers feature support for all CSS Level 1 aspects, many aspects of CSS Level 2 and some web browsers have even gone beyond that to support some of the capabilities of CSS Level 3.
Indeed, it is rarely that you find a web site nowadays that does not utilize some form of CSS in their design and development. For better or worse, web sites that rely solely on HTML are quickly going the way of the dinosaur. May industry pundits as well as end users have even gone so far as to consider a thorough knowledge of CSS as being far more necessary than a thorough knowledge of HTML. While in truth they are both equally important and will continue to be an important facet of the web for many years to come, there is no denying the widespread impact that CSS has brought upon the World Wide Web.
CSS was originally developed as a means by which web developers could define both the look and the feel of their web pages. With its inception, web designers were now able to treat content and design as two separate entities, thereby allowing HTML to function more in accord with its intended purpose, which was to focus on the markup of a particular web site's content and leaving the responsibility of the design and layout to CSS.
The term CSS itself is an abbreviation for Cascading Style Sheet. The style sheet in this particular instance refers to the document itself. The concept of style sheets itself is nothing new; designers have used them in their documents for many years. Strictly speaking, style sheets are the set of technical specifications that govern a particular layout, whether it is online or on print. The purpose of these of course is to ensure that any subsequent designs will conform to the predetermined specifications upon printing.
This concept can be translated easily enough to the World Wide Web only in this particular case, Cascading Style Sheets not only determine the technical specifications of a particular document on the web but also has the added function of communicating to the viewing vehicle (in this case the web browser that the end user is using to surf the Internet) exactly how the document that is being viewed is to be rendered.
One of the most important things to remember in all of this is the key word Cascade. Much like a stream of water running of a cliff or elevated area comes into direct contact with the rocks and soil that line the full course of the incline, yet is ultimately only affected in terms of its final destination by the land elements at the end of the slope, Cascading Style Sheets by their very nature flows or cascades through any number of separate style sheets. To follow the stream of water analogy even further, the appearance of a particular web site is ultimately dependent upon the user agent style sheet, which in many cases is the default style that the Web browser will utilize in the task of displaying a particular web page in the absence of any other set of instructions.
Of course more often than not, a web designer will probably provide any number of his own instructions that are embedded in the web page in question. The Cascading Style Sheet in this particular scenario will be tasked with dictating to the web browser which particular set of instructions will have top priority. The most commonly seen usage of this is in the fonts that are used for a web site. Even if your web browser is set to display web pages in a specific font and type size, say Arial narrow 10 points, the font size and family that is specified in the Cascading Style Sheet will take precedence overriding the default values that have been set in your browser.
Cascading Style Sheet go far beyond font specifications however into the areas of XHTML and XML markup. This means that Cascading Style Sheets could be used to define the look of any XHTML and XML markup that you use in your web site.
Clearly Cascading Style Sheets are one of the most powerful tools that any web designer can have in his or her arsenal and they can have a tremendous impact on the whole look and feel of a web site. If you are at all interested in becoming a professional web designer, a thorough knowledge of Cascading Style Sheets is crucial.
Cascading Style Sheets Reference
The Holy Grail of CSS it to completely separate web page content from the instructions that control its look and feel. If this is achieved then it's much easier for various devices to display the web page correctly. For example the same page would display correctly on a standard web browser (Internet Explorer, FireFox, Opera, Netscape, etc.), devices used by persons with a handicap, cell phones, and yet-to-be-developed interfaces. Nor would the web site designer have to make separate pages for some of these devices. Reality is quite different though and here in the real world CSS does not yet do all these things. But it does have enough positive benefits to learn how it works and to incorporate it into your web pages.
There are a different ways to control how things looks on a web page. For example, the color, size, and font used for a headline or the color, size, and font for a paragraph of text can be defined with in-line styles and tags. In-line means that these formatting commands for controlling the color, size, and font are mixed in with the content. This makes the source code for the page much harder to read and modify when you want to change it or fix a problem. In addition, because you're repeating the same commands over and over down the page, it makes the file size of the page get larger and larger and less efficient (slower) for those browsing your site.
CSS is not repeated throughout the page. CSS can be defined in the head section of the HTML page, or put in a separate file and referenced from the HTML page, or you can even do both. CSS consists of definitions of how a page component should look on the page or device. For example, you can define that a headline should be red, 26 point, right aligned text and that a paragraph should be black, 10 point, left aligned text. Any normal HTML paragraph tags or headline tags would use these definitions when rendered.
You can define pretty much all the normal HTML objects this way; background color, background image, background image position, tables, cells, images, divs, etc. This removes the clutter from your HTML code and makes it much easier to read. But wait, there's more! If you have a web site with more than one page and you use CSS, and, you put all your CSS definitions in a separate file, you have only one place to go to change the look and feel of all the pages in your site. If you have a 50 page site and you learn that the size of your text is too small or you used the wrong color to maximize sales: instead of having to edit 50 pages and change the definition of each paragraph tag, you simply edit the CSS file and you're done!
You may be asking how to make one paragraph or a set of paragraphs look different than the default? One way is to define a class for that item. If you have a right column where you display ads, in your CSS you would make a class and give it a name such as ".rcol". You would define the necessary items for the class that you want to control (paragraph or header tags). ".rcol p" would be used to control how a paragraph tag was rendered. To associate the class to the object, simple add "class=rcol" to the paragraph tag, or the table tag if it's in a table, or div tag if it's in a div, etc. This is also where the term cascading in CSS earns it's keep: the default definitions cascade down into a class as long as the class does not contain something that overrides the default. This means that in our example text rendered in a paragraph tag looks different for the rcol class. However, because that's the only thing we've defined for rcol, everything else would look the same as the rest of the page.
You can also define size and positioning for objects in CSS. This is one place where we hit the real world of CSS pretty hard. Not all browsers support the size and position commands the same way. This leads to hacks that define a position and then use a command that is known, for example, to cause Internet Explorer to bail out of the CSS, after that line you use a position command that Netscape for example understands. CSS uses the last definition of an object so this technique can be used to "trick" or "hack"
CSS into working across more browsers than it normally would. I don't recommend doing this. One reason is that it's messy and easy to forget why you did something. The other reason is because as browsers are updated, or new devices come online, they may not follow these unwritten and unsupported hacks and your pages are apt to be all messed up. To get around this I usually use CSS as much as I possibly can and then use tables and in-line definitions to control positioning and size. Some people will go to great lengths to use CSS for everything, even replacing all tables, but here in the real world, your should get the page built, functioning, and in a form that can be used reliably on as many platforms as possible.
Not all web site software packages like Microsoft Front Page, Dreamweaver, or Adobe GoLive, etc. fully support CSS.
You'll have to do some coding manually. Don't worry, it's not that hard. I have an online course that can teach you how, just follow the link at the end of this article.
Take the time to learn and understand CSS. Implement it in your web pages. It will be time well spent.
Both Mikhail Tuknov & Fred Black are contributors for EditorialToday. The above articles have been edited for relevancy and timeliness. All write-ups, reviews, tips and guides published by EditorialToday.com and its partners or affiliates are for informational purposes only. They should not be used for any legal or any other type of advice. We do not endorse any author, contributor, writer or article posted by our team.
Mikhail Tuknov has sinced written about articles on various topics from Search Engine Marketing, Site Promotion and Computers and The Internet. Mikhail Tuknov is a providing web site search engine optimization (SEO), pay per click (PPC) management and web analytics services.. Mikhail Tuknov's top article generates over 60500 views. to your Favourites.
Fred Black has sinced written about articles on various topics from Computers and The Internet, Stress Management and Computers and The Internet. Learn all about HTML, CSS, and more at Fred Black's web site, An Introduction to Creating Web Sites.. Fred Black's top article generates over 2900 views. to your Favourites.
Close To My Heart Book They come in a pack of 8, which makes them perfect for splitting with a scrapbooking buddy page 33.Have you been inspired? I know that I cant wait to get my creative juices flowing.