<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-32523277</id><updated>2011-04-21T13:48:51.117-07:00</updated><title type='text'>{Cascading Style Sheets}</title><subtitle type='html'>Cascading Style Sheets. Language used to describe how an HTML document should be formatted.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://style-sheets.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://style-sheets.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>User</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32523277.post-893119085161175488</id><published>2007-04-18T04:28:00.000-07:00</published><updated>2007-04-18T05:14:46.919-07:00</updated><title type='text'>Rounded Corners without Images: A Nifty Corners Inspiration</title><content type='html'>&lt;div lang="en"&gt;&lt;br /&gt;  &lt;p&gt;When I first saw &lt;strong&gt; &lt;a href="http://pro.html.it/esempio/nifty/" hreflang="en"&gt;Alessandro Fulciniti's Nifty corners&lt;/a&gt; &lt;/strong&gt; page, I thought it's a little bit too complicated for me. Good luck I found it later again. It's a perfect idea.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;What is it all about? It's a method of creating rounded corners of an element without using images, just with a piece of JavaScript and few drops of CSS. I like rounded corners, but the necessity to create for every diameter and every combination of foreground and background color 4 images for me as the designer and to download them for the user makes me use the square ones in most cases. The Nifty corners method offers different approach: instead of inserting the images of rounded corners it inserts a few pixels high container block of the same background color as the background of the parent element. This block contains strips 1–2 pixel height, that have the same background color as the element, that should have rounded corners. Margins of these strips changes from 0 up to radius of desired corners, which makes the outer element appear rounded. See the picture for explanation:&lt;/p&gt;&lt;br /&gt;  &lt;div&gt;&lt;br /&gt;    &lt;object data="http://seky.nahory.net/pics/0504-kulate-rohy/rounded-corners-schema.svg" type="image/svg+xml" height="220" width="300"&gt;&lt;br /&gt;      &lt;img alt="schéma uspořádnání prvků" src="http://seky.nahory.net/pics/0504-kulate-rohy/rounded-corners-schema.png" /&gt;&lt;br /&gt;    &lt;/object&gt;&lt;br /&gt;  &lt;/div&gt;&lt;br /&gt;  &lt;p&gt;The point is adding the strips into the page via JavaScript. The Allesandro Fulciniti's script calls a function for each element, that should be rounded with foreground and background colors and ID of the element.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Well, this is a serious disadvantage of this method, at least for me, as I am a lazy web designer and the necessity to call the JavaScript for each element would in real life cause me not to use this function at all. The perfect way for me would be to add a class to each element, that should be rounded and leave the rest to JavaScript. And it would be nice to have possibility to set the radius of the rounded corners as well. Also could be useful if the script can determine the colors, so that I don't have to set them up manually.&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;So I got to work and after some time spent on fighting sin() and cos() functions I had it.&lt;/p&gt;&lt;br /&gt;  &lt;h2&gt;Instructions for use&lt;/h2&gt;&lt;br /&gt;  &lt;ol&gt;&lt;br /&gt;    &lt;li&gt;Link the JavaScript &lt;a href="http://seky.nahory.net/soubory/0504-kulate-rohy/rounded-corners.js" type="text/javascript"&gt;rounded-corners.js&lt;/a&gt; to the page (by adding the &lt;code&gt;&amp;lt;script src="rounded-corners.js"&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt; to the header of your page).&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;Add the &lt;code&gt;rounded&lt;/code&gt; class to all elements, that should have the rounded corners. You can set up some parameters of the corners by adding another classes as well, see bellow.&lt;/li&gt;&lt;br /&gt;    &lt;li&gt;On the very bottom of the page call the JavaScript function &lt;code&gt;make_corners()&lt;/code&gt;. (It's better than calling it by the &lt;code&gt;onload&lt;/code&gt; event of the page, because it waits till all the pictures are loaded.)&lt;/li&gt;&lt;br /&gt;  &lt;/ol&gt;&lt;br /&gt;  &lt;p&gt;See &lt;a href="http://seky.nahory.net/soubory/0504-kulate-rohy/rounded-corners-1.html"&gt;a simple example of rounded corners&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;  &lt;h3&gt;Setting up the parameters of corners&lt;/h3&gt;&lt;br /&gt;  &lt;p&gt;For each element with the &lt;code&gt;rounded&lt;/code&gt; class you can set additional parameters through another classes. The layout can be set up through CSS as well, using the classes &lt;code&gt;rounded&lt;/code&gt; (the element with rounded corners), &lt;code&gt;rc-container-top&lt;/code&gt; and &lt;code&gt;rc-container-bottom&lt;/code&gt; (containers for the rounding strips), &lt;code&gt;rc-inner&lt;/code&gt; a &lt;code&gt;rc-level-NN&lt;/code&gt; (rounding strips; NN is i number in range 0 up to corner radius).&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Names of the parameters classes should have name in the form &lt;code&gt;rc-[property_name]-[property_value]&lt;/code&gt;. Use 1 / 0 values for booleans (you can omit the 1 value). All the parameters have a corresponding JavaScript variable with the name &lt;code&gt;$rc_[property_name]&lt;/code&gt;, in the &lt;code&gt;rounded_corners() function&lt;/code&gt;. The next table shows an overview of all the parameters.&lt;/p&gt;&lt;br /&gt;  &lt;table border="1" cellpadding="0" cellspacing="0" bordercolor="#333333"&gt;&lt;br /&gt;    &lt;thead&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;th&gt;CSS Class name&lt;/th&gt;&lt;br /&gt;        &lt;th&gt; &lt;abbr title="JavaScript"&gt;JS&lt;/abbr&gt; variable&lt;/th&gt;&lt;br /&gt;        &lt;th&gt;Description&lt;/th&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;    &lt;/thead&gt;&lt;br /&gt;    &lt;tbody&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-radius-[integer]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_radius&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Sets the radius of corners.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-top-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_top&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Switches rounding of upper corners.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-bottom-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_bottom&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Switches rounding of lower corners.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-right-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_right&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Switches rounding of right corners.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-left-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_left&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Switches rounding of left corners.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-selfcolor-[RRGGBB]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_self_color&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Sets color of the rounded element.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-parentcolor-[RRGGBB]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_parent_color&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Sets the background color (color of the parent element).&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-inheritstylecolors-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt; &lt;/code&gt;&lt;/td&gt;&lt;br /&gt;        &lt;td&gt;When enabled, the script sets no color, which means that CSS defined colors are used.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-antialiased-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_antialiased&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Adds border to the strips which makes the corners look a bit anti-aliased. (But it's no real anti-aliasing.)&lt;br /&gt;          Works with &lt;code&gt;rc-method-margin&lt;/code&gt; only. &lt;strong&gt;Warning:&lt;/strong&gt; doesn't work with &lt;abbr title="Microsoft Internet Explorer"&gt;MSIE&lt;/abbr&gt; when colors are set like &lt;code&gt;white&lt;/code&gt; or &lt;code&gt;#FFF&lt;/code&gt; and not &lt;code&gt;#FFFFFF&lt;/code&gt; or &lt;code&gt;rgb(255,255,255)&lt;/code&gt;. (Execution crashes in such case and no rounding is produced.)&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-antialiasedcf-[0-1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_antialiased_cf&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Anti-aliasing ratio. The closer to 1, the closer is the color of anti-aliasing border to the background color.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-compact-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_compact&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Sets negative margins to the containers, so that the rounded element doesn't get bigger.&lt;br /&gt;          Sometimes buggy in &lt;abbr title="Microsoft Internet Explorer"&gt;MSIE&lt;/abbr&gt;.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-automargin-[0|1]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_auto_margin&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Sets negative margin to compensate padding of the rounded element.&lt;br /&gt;          Does not work in &lt;abbr title="Microsoft Internet Explorer"&gt;MSIE&lt;/abbr&gt;.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-method-[margin|border]&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_method&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Sets the method of drawing rounded corners.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;      &lt;tr&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;rc-border&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;&lt;code&gt;$rc_border&lt;/code&gt; &lt;/td&gt;&lt;br /&gt;        &lt;td&gt;Creates rounded borders. For instructions about how to use it see &lt;a href="http://seky.nahory.net/soubory/0504-kulate-rohy/rounded-corners-with-borders.html"&gt;example of rounded borders&lt;/a&gt;.&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;    &lt;/tbody&gt;&lt;br /&gt;  &lt;/table&gt;&lt;br /&gt;  &lt;p&gt;The &lt;code&gt;rc-method&lt;/code&gt; property is of importance, as it determines the method of drawing rounded corners:&lt;/p&gt;&lt;br /&gt;  &lt;dl&gt;&lt;br /&gt;    &lt;dt&gt;margin&lt;/dt&gt;&lt;br /&gt;    &lt;dd&gt;Draws the container with the same background color, as the parent element. The strips have the color of rounded element and variable margin &lt;code&gt;margin&lt;/code&gt;. You can use the “anti-aliasing” in this case.&lt;/dd&gt;&lt;br /&gt;    &lt;dt&gt;border&lt;/dt&gt;&lt;br /&gt;    &lt;dd&gt;Background of the container and strips remains transparent, but the strips have variable with borders of the same color, as the parent element. This method is useful, when you have an image as background of the rounded element.&lt;/dd&gt;&lt;br /&gt;  &lt;/dl&gt;&lt;br /&gt;  See &lt;a href="http://seky.nahory.net/soubory/0504-kulate-rohy/rounded-corners-2.html"&gt;an example of using parameters of rounded corners&lt;/a&gt;.&lt;br /&gt;  &lt;p&gt;&lt;/p&gt;&lt;br /&gt;  &lt;h2&gt;How does it work?&lt;/h2&gt;&lt;br /&gt;  &lt;p&gt;First the script finds all the elements that should be rounded (using the &lt;code&gt;find_class()&lt;/code&gt; function) Then it checks the rounded corners parameters. When a property is not found, it uses the default value (see the first line of &lt;code&gt;rounded_corners()&lt;/code&gt;function). Then it inserts the rounding container and strips. Their color is determined by the function &lt;code title="rovněž produkt onoho pokusu"&gt;get_current_style()&lt;/code&gt;, which unfortunately doesn't work in KHTML browsers (like Safari and Konqueror) and older versions of Opera (prior to 7.5) as these browser don't support the &lt;code&gt;getComputedStyle()&lt;/code&gt; method of &lt;code&gt;defaultView&lt;/code&gt; object. However, for these browser you can use the “manual setting” of colors or just leave the corners square till they start to support it. (The time should come, as this is a part of &lt;abbr title="Document Object Model"&gt;DOM&lt;/abbr&gt; standard.) &lt;/p&gt;&lt;br /&gt;  &lt;p&gt;All comments, improvements, suggestions etc. are welcome. You can use all the code, ideas etc. any way you want. Enjoy.&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32523277-893119085161175488?l=style-sheets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://style-sheets.blogspot.com/feeds/893119085161175488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32523277&amp;postID=893119085161175488' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/893119085161175488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/893119085161175488'/><link rel='alternate' type='text/html' href='http://style-sheets.blogspot.com/2007/04/rounded-corners-without-images-nifty.html' title='Rounded Corners without Images: A Nifty Corners Inspiration'/><author><name>User</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32523277.post-115540456104557846</id><published>2006-08-12T10:41:00.000-07:00</published><updated>2006-08-19T00:40:31.000-07:00</updated><title type='text'>Syntax</title><content type='html'>The CSS syntax is made up of three parts: a selector, a property and a value:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;  &lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;selector {&lt;/span&gt;&lt;span style="color: rgb(102, 0, 204);"&gt;property&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;value&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The selector is normally the HTML element/tag you wish to define, the property is the attribute you wish to change, and each property can take a value. The property and value are separated by a colon, and surrounded by curly braces:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;  &lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;body {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;color&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;black&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Note: If  the value is multiple words, put quotes around the value:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;p {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;font-family&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;"sans serif"&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Note: If you wish to specify more than one property, you must separate each property with a semicolon. The example below shows how to define a center aligned paragraph, with a red text&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;color:&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;p {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;text-align&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;center&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;color&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;red&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;To make the style definitions more readable, you can describe one property on each line, like this:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;p&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;text-align&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;center&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;color&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;black&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;font-family&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);font-family:courier new;" &gt;arial&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;Grouping&lt;br /&gt;You can group selectors. Separate each selector with a comma. In the example below we have grouped all the header elements. All header elements will be displayed in green text color:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;h1,h2,h3,h4,h5,h6&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;color&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;green&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The class Selector&lt;br /&gt;With the class selector you can define different styles for the same type of HTML element.&lt;br /&gt;Say that you would like to have two types of paragraphs in your document: one right-aligned paragraph, and one center-aligned paragraph. Here is how you can do it with styles:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;p.right {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;text-align&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;right&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;br /&gt; &lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;p.center {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);font-family:courier new;" &gt;text-align&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);font-family:courier new;" &gt;center&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt;}&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;You have to use the class attribute in your HTML document:&lt;br /&gt;&lt;p class="right"&gt;&lt;br /&gt;This paragraph will be right-aligned.&lt;br /&gt;&lt;/p&gt;&lt;p class="center"&gt;&lt;br /&gt;This paragraph will be center-aligned.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Note: Only one class attribute can be specified per HTML element! The example below is wrong:&lt;br /&gt;&lt;p class="right"&gt;&lt;br /&gt;This is a paragraph.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;You can also omit the tag name in the selector to define a style that will be used by all HTML elements that have a certain class. In the example below, all HTML elements with class="center" will be center-aligned:&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;.center {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;text-align&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;center&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;In the code below both the h1 element and the p element have class="center". This means that both elements will follow the rules in the ".center" selector:&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;This heading will be center-aligned&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;p class="center"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="text-align: center;"&gt;This paragraph will also be center-aligned.&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;br /&gt;Do NOT start a class name with a number! It will not work in Mozilla/Firefox.&lt;br /&gt;The id Selector&lt;br /&gt;&lt;div style="text-align: center;"&gt;You can also define styles for HTML elements with the id selector. The id selector is defined as a&lt;span style="color: rgb(255, 153, 255);font-family:courier new;" &gt; #.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;The style rule below will match the element that has an id attribute with a value of "green":&lt;br /&gt; &lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;#green {&lt;/span&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;color&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(51, 51, 255);"&gt;green&lt;/span&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;The style rule below will match the p element that has an id with a value of "para1":&lt;br /&gt;&lt;div style="border: 1px solid rgb(153, 153, 153); margin: 10px; padding: 10px; background-color: rgb(243, 243, 243);"&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="color: rgb(255, 153, 255);"&gt;p#para1&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 255);"&gt;{&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 255);"&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;text-align&lt;/span&gt;: &lt;span style="color: rgb(51, 51, 255);"&gt;center&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 255);"&gt;&lt;span style="color: rgb(51, 51, 153);"&gt;color&lt;/span&gt;: &lt;span style="color: rgb(51, 51, 255);"&gt;red&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;   &lt;span style="color: rgb(255, 153, 255);"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32523277-115540456104557846?l=style-sheets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://style-sheets.blogspot.com/feeds/115540456104557846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32523277&amp;postID=115540456104557846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/115540456104557846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/115540456104557846'/><link rel='alternate' type='text/html' href='http://style-sheets.blogspot.com/2006/08/syntax.html' title='Syntax'/><author><name>User</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32523277.post-115540415061045040</id><published>2006-08-12T10:29:00.000-07:00</published><updated>2006-08-12T10:41:03.966-07:00</updated><title type='text'>What is CSS?</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;strong&gt;What is CSS?&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;CSS stands for Cascading Style Sheets&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Styles define how to display HTML elements&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Styles are normally stored in Style Sheets &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Styles were added to HTML 4.0 to solve a problem&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;External Style Sheets can save you a lot of work&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;External Style Sheets are stored in CSS files&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Multiple style definitions will cascade into one&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:85%;"&gt;Styles Solve a Common Problem&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;HTML tags were originally designed to define the content of a document. They were supposed to say "This is a header", "This is a paragraph", "This is a table", by using tags like a nd so on. The layout of the document was supposed to be taken care of by the browser, without using any formatting tags.&lt;br /&gt;As the two major browsers - Netscape and Internet Explorer - continued to add new HTML tags and attributes (like the tag and the color attribute) to the original HTML specification, it became more and more difficult to create Web sites where the content of HTML documents was clearly separated from the document's presentation layout. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;To solve this problem, the World Wide Web Consortium (W3C) - the non profit, standard setting consortium, responsible for standardizing HTML - created STYLES in addition to HTML 4.0.&lt;br /&gt;All major browsers support Cascading Style Sheets. &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;&lt;span style="font-size:85%;"&gt;Style Sheets Can Save a Lot of Work&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Styles sheets define HOW HTML elements are to be displayed, just like the font tag and the color attribute in HTML 3.2. Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in your Web, just by editing one single CSS document!&lt;br /&gt;&lt;br /&gt;CSS is a breakthrough in Web design because it allows developers to control the style and layout of multiple Web pages all at once. As a Web developer you can define a style for each HTML element and apply it to as many Web pages as you want. To make a global change, simply change the style, and all elements in the Web are updated automatically.&lt;br /&gt;Multiple Styles Will Cascade Into One Style sheets allow style information to be specified in many ways. Styles can be specified inside a single HTML element, inside the element of an HTML page, or in an external CSS file. Even multiple external style sheets can be referenced inside a single HTML document. &lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Cascading Order&lt;/strong&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;What style will be used when there is more than one style specified for an HTML element?Generally speaking we can say that all the styles will "cascade" into a new "virtual" style sheet by the following rules, where number four has the highest priority:&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Browser default&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;External style sheet&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Internal style sheet (inside the tag)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Inline style (inside an HTML element)&lt;/span&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;So, an inline style (inside an HTML element) has the highest priority, which means that it will override a style declared inside the tag, in an external style sheet, or in a browser (a default value).&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32523277-115540415061045040?l=style-sheets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://style-sheets.blogspot.com/feeds/115540415061045040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32523277&amp;postID=115540415061045040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/115540415061045040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/115540415061045040'/><link rel='alternate' type='text/html' href='http://style-sheets.blogspot.com/2006/08/what-is-css.html' title='What is CSS?'/><author><name>User</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32523277.post-115523018445170848</id><published>2006-08-10T09:50:00.000-07:00</published><updated>2006-08-10T10:16:24.470-07:00</updated><title type='text'>Cascading Style Sheets</title><content type='html'>&lt;span style="font-family: georgia;font-family:Verdana, Arial, Helvetica, sans-serif;font-size:85%;"  &gt;A standard for specifying the appearance of text and other elements. CSS was  developed for use with HTML in Web pages but is also used in other situations,  notably in applications built using XPFE. CSS is typically used to provide a  single "library" of styles that are used over and over throughout a large number  of related documents, as in a web site. A CSS file might specify that all  numbered lists are to appear in italics. By changing that single specification  the look of a large number of documents can be easily changed. &lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; font-family: georgia;font-size:85%;" &gt;&lt;span style="font-size:100%;"&gt;Effective Use of Style Sheets&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: georgia;font-size:85%;" &gt;Cascading style sheets (CSS)  are an elegantly designed extension to the  Web and one of the greatest hopes for recapturing the Web's ideal of  &lt;strong&gt;separation of presentation and content&lt;/strong&gt;. The Web is the ultimate  cross-platform system, and your content will be presented on such a huge variety  of devices that pages should specify the meaning of the information and leave  presentation details to a merger (or "cascade") of site-specified style sheets  and the user's preferences. If the introduction of WebTV broke your pages, you will appreciate the ability to  introduce new page designs by creating a single style sheet file rather than by  modifying thousands of content pages.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Centralized Style&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Use a &lt;strong&gt;single style sheet for all of the pages on your site&lt;/strong&gt; (or  possibly a few coordinated ones if you have pages with very different needs: for  example technical documentation versus marketing pages). One of the main  benefits of style sheets is to ensure visual continuity as the user navigates  your site. Legacy publications have long known the value of basing print  products on a single typeface: no matter where you turn in a magazine or a  newspaper, the text and basic layout will look the same. Websites will gain the  same brand cohesiveness if all the pages on a site link to the same style sheet.   &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Always use &lt;strong&gt;linked style sheets&lt;/strong&gt; rather than embedded styles.  Only by referencing an external file will you get the maintenance benefits of  being able to update the look of your entire site with a single change. Also, by  pulling style definitions out of your pages, you make them smaller and faster to  download. If you use a single style sheet for your entire site, that file will  be a single download once and for all.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;For each site, all the style sheets should be designed by a single, central  design group. Two reasons: First, &lt;strong&gt;centralized design&lt;/strong&gt; is the  only way to ensure a consistent style and reap one of the main benefits of style  sheets. Second, the majority of Web content creators are not capable of  designing and writing good style sheets. Experience with word processors that  support style sheets indicates that &lt;strong&gt;most authors mangle their style  sheets terribly&lt;/strong&gt;. Understanding the effect of style is relatively easy  in traditional desktop publishing because it is a WYSIWYG environment with a  single, canonical output form. The &lt;a href="9705a.html"&gt;Web is not WYSIWYG&lt;/a&gt;  because of the variability in supported platforms. Furthermore, Web stylesheets  are cascading, meaning that the site's style sheet is merged with the user's  style sheet to create the ultimate presentation. These differences make it  important that Web style sheets are designed by a specialist who understands the  many ways in which the result may look different than what is on his or her own  screen.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Fund an &lt;strong&gt;active evangelism program&lt;/strong&gt; to teach your content  creators how to use the centrally defined style sheet. Do not assume that people  understand the concept of style and how to apply it, simply because they know a  word processor with style sheets. Research shows that &lt;a href="http://www.ifi.uio.no/%7Epaalso/artikler/styles/new-version/pap.html"&gt;most  users make horrible mistakes in using word processing style sheets&lt;/a&gt;: partly  because the main word processors have particularly bad style sheet usability and  partly because style is hard. Your style sheet should come with a small manual  that explains the different styles and when and how to use them. Include  &lt;strong&gt;plenty of examples&lt;/strong&gt;, including both raw HTML code  (cutting-and-pasting examples is the main way people use documentation) and  screenshots of the appearance of correctly coded pages in several mainstream  browsers on several different platforms. The screenshots should be made into  clickable imagemaps, allowing users to click on an effect they want to achieve  and get to the documentation for the appropriate styles. In particular, if  multiple styles have similar appearance, many errors can be avoided by  explaining the differences and when to use which style.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;Despite my preference for linked style sheets and central design, individual  &lt;strong&gt;page authors should be allowed to create additional embedded styles for  their own pages&lt;/strong&gt; when necessary. Authors should be encouraged to only do  so when absolutely necessary, but there will always be cases where a certain  style is needed that is not supplied in the central style sheet. If many pages  need the same effect, it should be added to the site's global style sheet, but  it would be bad to inflate the one linked style sheet with styles that are only  needed once. Single-page styles should be embedded rather than linked: the page  should continue to link in the global style sheet and then override it with  local, embedded styles as necessary. Doing so has the benefit of allowing future  changes to the central style sheet to propagate to the modified page to the  greatest extent possible.&lt;/span&gt;&lt;/p&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Implementation Advice&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Pages must &lt;strong&gt;continue to work when style sheets are disabled&lt;/strong&gt;:  for example, do not use tricks where the same words are repeated multiple times  with small offsets to create shadow effects (without the intended style, the  text turns into gibberish). Retaining a decent presentation without the style  sheet is mandatory to support users with older browsers, &lt;a href="9610.html"&gt;blind users&lt;/a&gt;, and users who need to disable the style  feature in their browser (either because of bugs or because your style conflicts  too much with their preferences). Luckily, it is very easy to check conformance  with this rule: simply disable style sheets in your browser and reload the page.   &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Do not use more than two fonts&lt;/strong&gt; (plus possibly a third for  special text like &lt;code&gt;computer code&lt;/code&gt;). Remember the lesson from the  early days of desktop publishing: using a lot of fonts simply because you  &lt;em&gt;can&lt;/em&gt; will result in a ransom-note look. Typically, you can use one  typeface for body text and another, bolder, face for headings. Note that it is  fine (indeed, recommended) to use a long list of alternate fonts in the style  sheet specification for a given class of text: the user's browser will pick the  first available font in the list and use it throughout your pages, meaning that  the user will see a single font, making the site feel typographically unified.  It is important that lists of font names have the fonts listed in the same  order, since the browser picks the first one it has available.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Do not use absolute font sizes&lt;/strong&gt;; instead specify all text  relative to the base font size defined by the user's preference setting. For  example, large text could be defined as "200%", meaning that it would be set as  24 point if the user preferred 12 point for body text and 20 point if the user  preferred 10 point for body text. Whether people prefer large or small fonts  depends on a variety of questions, including the size and resolution of their  monitors and the user's eyesight. It is somewhat annoying to visit a website  where the text is too small for comfortable reading under my circumstances, but  it is &lt;em&gt;very&lt;/em&gt; annoying to click on the "make text bigger" button and have  nothing happen because the font sizes were defined as an absolute number of  points.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Do not use the&lt;span style="color: rgb(255, 0, 0);font-size:100%;" &gt; &lt;code style="font-weight: bold;"&gt;!important&lt;/code&gt;&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/span&gt;attribute&lt;/strong&gt; to  override the user's settings. It is hard to imagine cases where you are  justified in ignoring the user's preferences if the user felt strongly enough to  use his or her own &lt;span style="font-weight: bold; color: rgb(255, 0, 0);font-size:100%;" &gt;&lt;code&gt;!important&lt;/code&gt; &lt;/span&gt;rating, so&lt;span style="font-size:100%;"&gt; &lt;code style="font-weight: bold; color: rgb(255, 0, 0);"&gt;!important&lt;/code&gt;&lt;/span&gt;  should be reserved for user style sheets.  &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;If you have multiple style sheets, then make sure to &lt;strong&gt;use the same  CLASS names for the same concept in all of the style sheets&lt;/strong&gt;. Content  creators using two or more style sheets will be confused if different CLASSes  are used for the same thing or if one style sheet has a CLASS that is missing in  the other style sheet even though the concept applied in both cases. If, for  example, you have a CLASS for the name of the author of a document, then all of  your style sheets should have this CLASS, even though it may be defined to  render differently, as appropriate for the different kinds of documents.  &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32523277-115523018445170848?l=style-sheets.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://style-sheets.blogspot.com/feeds/115523018445170848/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32523277&amp;postID=115523018445170848' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/115523018445170848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32523277/posts/default/115523018445170848'/><link rel='alternate' type='text/html' href='http://style-sheets.blogspot.com/2006/08/cascading-style-sheets.html' title='Cascading Style Sheets'/><author><name>User</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
