Taming The Beast” Cascading Style Sheets. Pulling The Monster Out From Under The Bed


Download Read Online

                           Introduction


 As you probably already know, CSS is a distant cousin to the Boogey Man and lives under the beds of webmasters which explains why many of us spend so many hours on the computer in a constant state of sleep deprivation and caffeine intoxication.


For our peace of mind and health, we will yank the CSS Monster out from under the bed and into the blinding light so we can overcome our fear and hopefully be able to enjoy a full night's rest knowing that the CSS Monster is not so ugly and can actually be our friend, if we'll let it.


Cascading Style Sheets (CSS) was brought about by the World Wide Web Consortium (W3C), and not by evil programmers with too much time on their hands as originally believed, to develop a standard which could be interpreted by different browsers.


This became a necessity as Microsoft and Netscape battled for world domination and kept adding html attributes which were only understood by their browser.


Great for them, bad for us. 1 Now, through the implementation of CSS, we can design ONE website for all browsers instead of multiple websites, one for each browser.


What started out as a way of standardizing the way code was displayed through basic things, like font and color tags, has quickly grown into something much more powerful, which makes sense because all of the not so evil programmers could now spend more time working on the one standard which could be understood by all browsers. CSS can be utilized in your web pages a couple different ways.


The FIRST and the one that takes priority over the others is what is known as Inline CSS and is used inside the html tag directly and only affects what is inside that element.


This is a useful method when you are doing something like adding a Drop Cap or something which will only be used once or twice and you don't want to clutter up your External Style Sheet.


The SECOND, and the one that takes priority over an External Style Sheet but not Inline CSS is the Internal Style Sheet which is placed in head of your page between the and tags.


You might want to use this when you only have one page on your website or you need a page to look differently than the other pages which use your main CSS External Stylesheet.


You could then use your Inline Style Sheets to overwrite anything on a line by line basis should you need to.


Remember from above, the Inline CSS takes priority over the others. The THIRD method is the External Style Sheet.


This is a document that lives outside of your web page. By placing some code in the head of your web page between the and tags, you tell your web page to look for and use the instructions from that file to interpret how to display your page.


This method is useful when you have two or more pages and will allow you to control the look across all of your pages maintaining a consistent look throughout. What a huge time saver

Customer Reviews