<?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-7681105400300687252</id><updated>2011-11-02T21:58:23.526-07:00</updated><category term='CSS Padding'/><category term='CSS Aural'/><category term='CSS Dynamic Content'/><category term='eyovurc'/><category term='CSS Outline'/><category term='CSS3 Info'/><category term='CSS International'/><category term='CSS Font'/><category term='CSS Positioning'/><category term='CSS Scrollbars'/><category term='CSS Tables'/><category term='W3C CSS3'/><category term='CSS Generated Content'/><category term='CSS Shortcuts'/><category term='CSS Color and Backgrounds'/><category term='CSS Text'/><category term='CSS Dimensions'/><category term='CSS Printing'/><category term='CSS Classification'/><category term='About CSS3'/><category term='Advance CSS3'/><category term='css articles'/><category term='CSS Margins'/><category term='CSS Tutorial'/><category term='CSS Borders'/><category term='CSS Lists'/><title type='text'>CSS3 Examples</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default?start-index=101&amp;max-results=100'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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>267</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7681105400300687252.post-3810830248936938103</id><published>2008-07-21T09:35:00.000-07:00</published><updated>2008-07-21T09:38:51.734-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS Shortcuts'/><title type='text'>Keyboard Shortcuts</title><content type='html'>&lt;p&gt;Learning a few quick-key secrets can make you look like a computer expert  too, and save you seconds when you need something finished fast. Here are a few  tips to help you speed up your computing.&lt;br /&gt;&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:100%;"&gt;Turn back the clock: Ctrl-Z&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;We have all done it; deleted the wrong text, changed the wrong formula in a  spreadsheet, or formatted text in Word and messed up a whole document  layout.&lt;/p&gt; &lt;p&gt;Using the Ctrl-Z quick-key combination will save you time and frustration.  This is an excellent time-saver; once you know it, you’ll wonder how you ever  survived without it. Simply hit the Control key and Z to undo any mistake you  make. This is great for when you cut-and-paste the wrong data into a Microsoft  Excel file or accidentally delete a paragraph from a Microsoft Word document.  Also repeat the key presses to go back a few stages to a previous version of a  document.&lt;/p&gt; &lt;p&gt;And just as useful, Control key and Y ‘undoes the undo’, i.e. it puts it back  again if you undo one stage too far!&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:100%;"&gt;From upper case to lower easily: CTRL-SHIFT-A&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;One of the more time-consuming things we often have to do is restyle copy  from upper case to lower case, or vice-versa, when preparing a presentation or  business proposal.&lt;/p&gt; &lt;p&gt;Rather than spend all that time retyping the headline, sentence, paragraph or  page, simply highlight the words you want changed and hit your Control key with  the Shift button and A – you’ll toggle between upper and lower case copy in an  instant.&lt;br /&gt;&lt;/p&gt; &lt;h2 style="font-weight: bold;"&gt;&lt;span style="font-size:100%;"&gt;Minimise everything: Windows key-M&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;On a busy day you can often have ten or more windows open on your PC.  Accessing your desktop in these circumstances can be a lengthy process as you  click away each individual window. But you can actually minimise all windows in  the blink of an eye by hitting the Windows key and M together.&lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:100%;"&gt;For when time stands still: Ctrl-Alt-Del&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;It is unfortunately possible for applications on older model PCs to freeze  and force you to wait while your PC troubleshoots. For example, Word can  sometimes lock up when opening a corrupted document or one in a new format that  an older model PC can’t read. This is doubly frustrating if it happens when you  are racing to meet a deadline. (Hint - call CSS to get your PC upgraded if this  happens often!)&lt;/p&gt; &lt;p&gt;The Control/Alt/Delete shortcut is helpful in these situations because it  takes you straight to Task Manager, where you can immediately shut down and then  re-start applications that are experiencing difficulties.&lt;/p&gt; &lt;p&gt;This handy combination also gives you the option of locking your computer,  logging off, shutting down, or changing your password.&lt;br /&gt;&lt;/p&gt; &lt;h2&gt;Magic Text resizer&lt;/h2&gt; &lt;p&gt;Finally my favourite, and one which never fails to impress anyone watching -  resizing text in Word.&lt;/p&gt; &lt;p&gt;When you are laying out a flyer or a brochure, you often need to get text to  just the right size to fit in with graphics or text boxes. Highlight the text,  and press Control and [ or Control and ] to decrease/increase the point size one  at a time. The text will magically grow or shrink as you tap the keys, and makes  it dead easy to fit text into a certain space.&lt;/p&gt; &lt;p&gt;More shortcuts:&lt;/p&gt; &lt;ul&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;CTRL-C = Copy  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;CTRL-X = Cut  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;CTRL-V = Paste  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;CTRL-A = Highlight all (for instance a whole Word document to change a font  size or style)  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;CTRL-ESC = Open Start Menu, use the arrow keys to select an item  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;F1 = Help  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;F2 = Rename an item  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;F3 = Open Find All Files dialog  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;ALT-F4 = Close the current window, or quit the current program  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;SHIFT-F4 = Automatically repeats the previous Find command in Word  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;F5 = Refresh Screen  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;ALT-F6 = Switch between multiple windows in the same program  &lt;/li&gt;&lt;li style="color: rgb(0, 102, 0);"&gt;F10 = Activate the menu bar in a program  &lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;SHIFT-DEL = Delete items permanently&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;With these speedy keyboard tips, you will soon be tapping out impressive  shortcuts that help you get more done in less time.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-3810830248936938103?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3810830248936938103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3810830248936938103' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3810830248936938103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3810830248936938103'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/keyboard-shortcuts.html' title='Keyboard Shortcuts'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7681105400300687252.post-6425382294310137661</id><published>2008-07-21T09:25:00.001-07:00</published><updated>2008-07-21T09:31:06.655-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS Tutorial'/><title type='text'>CASCADING STYLE SHEETS TUTORIAL PART 3 OF 3</title><content type='html'>&lt;p&gt;In part 2 of the tutorial we broke down  the major sections of HTML on the page and established separation using DIV tags  with unique ID's attached to them: &lt;/p&gt; &lt;div class="codeSnippet" style="width: 60%;"&gt; &lt;p&gt;&lt;/p&gt;&lt;div id="navigation"&gt; ... &lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;div id="centerDoc"&gt; ... &lt;/div&gt; &lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;Using DIV's (to position the major page sections) is the alternate method to  what most people use: tables. I would argue one method is not necessarily better  than the other. But consider that CSS in the 'official' method to position page  elements and tables should only be used to hold tabular data. &lt;/p&gt; &lt;p&gt;On the other hand there are simply times when using tables is much easier and  CSS just doesn't cut it. &lt;/p&gt; &lt;p&gt;That said, our current layout (left or right side navigation) CSS is far  easier to use and is an overall better solution. &lt;/p&gt; &lt;p&gt;Now that we have that covered, everything gets really easy from here. We've  established our main document and the major sections are in place, all we need  to do is add our text and images.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Breaking down the page: &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;This page is simple, we have just a single heading: &lt;/p&gt; &lt;div class="codeSnippet" style="width: 60%;"&gt;&lt;h1&gt;&lt;span style="font-size:100%;"&gt;The Main Heading&lt;/span&gt;&lt;/h1&gt;  &lt;/div&gt; &lt;p&gt;And a single paragraph: &lt;/p&gt; &lt;div class="codeSnippet" style="width: 60%;"&gt; &lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt; &lt;p&gt;Go to the Web Designers Killer Handbook home page and grab the practice HTML  page that we will used as the starting template for this tutorial. You can find  it under the heading: 'To create the practice HTML page do the following:'.  Follow the instructions there and create your basic HTML page ... and do it  now!&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;We define how the paragraphs and the headings will look in our CSS code: &lt;/p&gt; &lt;div class="codeSnippet"&gt; &lt;p&gt;p { &lt;/p&gt; &lt;p&gt;width: 80%; &lt;/p&gt; &lt;p&gt;} &lt;/p&gt; &lt;p&gt;h1 { &lt;/p&gt; &lt;p&gt;font-family: Georgia, "Times New Roman", Times, serif; &lt;/p&gt; &lt;p&gt;font-size: 18px; &lt;/p&gt; &lt;p&gt;font-weight: bold; &lt;/p&gt; &lt;p&gt;color: #000000; &lt;/p&gt; &lt;p&gt;} &lt;/p&gt;&lt;/div&gt; &lt;p&gt;This is pretty much self-explanatory. The only thing that should be mentioned  is that we set the width of the &lt;/p&gt;&lt;p&gt; tags to 80%. This allows us to control  all of our text width in one easy to edit spot. &lt;/p&gt; &lt;p&gt;The only thing missing from the page is the actual navigation. The best and  easiest way to do this, is by using list (&lt;/p&gt;&lt;li&gt;) tags. That makes sense,  since navigational menus are essentially a list of pages. &lt;p&gt;&lt;/p&gt; &lt;p&gt;We styled the list item tags with this CSS: &lt;/p&gt; &lt;div class="codeSnippet"&gt; &lt;p&gt;li { &lt;/p&gt; &lt;p&gt;list-style-type: none; &lt;/p&gt; &lt;p&gt;line-height: 150%; &lt;/p&gt; &lt;p&gt;list-style-image: url(../images/arrowSmall.gif); &lt;/p&gt; &lt;p&gt;} &lt;/p&gt;&lt;/div&gt; &lt;p&gt;The above code uses an image as the bullets for the list and makes the space  between the listed items 1 and ½ times larger than normal (I like a little more  'breathing room'). You don't have to have an image for the bullets, you could  leave it with no images and no bullets by just removing the attribute: &lt;/p&gt; &lt;div class="codeSnippet"&gt;list-style-image: url(../images/arrowSmall.gif); &lt;/div&gt; &lt;p&gt;Or you could use on of the built in bullet options: 'disc', 'circle' and  'square'. &lt;/p&gt; &lt;p&gt;Next you should add to the HTML page an unordered list  (&lt;/p&gt;&lt;ul&gt;&lt;/ul&gt;) in between the navigation DIV's just under the 'main  navigation' heading: &lt;p&gt;&lt;/p&gt; &lt;div class="codeSnippet"&gt; &lt;p&gt;&lt;/p&gt;&lt;h2&gt;&lt;span style="font-size:100%;"&gt;The Main navigation&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;ul&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;li&gt;Page One&lt;/li&gt;   &lt;li&gt;Page Two&lt;/li&gt;  &lt;p&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;/ul&gt; &lt;p&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;To make things easier (for the purpose of the article), change the CSS  affecting the list item tags (&lt;/p&gt;&lt;/li&gt;&lt;li&gt;) so that we use a built in bullet: &lt;p&gt;&lt;/p&gt; &lt;div class="codeSnippet"&gt; &lt;p&gt;li { &lt;/p&gt; &lt;p&gt;list-style-type: disc; &lt;/p&gt; &lt;p&gt;line-height: 150%; &lt;/p&gt; &lt;p&gt;} &lt;/p&gt;&lt;/div&gt; &lt;p&gt;Now we have the navigation! &lt;/p&gt; &lt;p&gt;That pretty much covers our goals for this tutorial, but we have just  scratched the surface of CSS. As you can see, we created a nice looking page,  while using very few types of HTML tags. At this time there isn't much text on  the page, but we could add to the page easily, building it out to include lots  of information and images with practically no HTML work at all!&lt;/p&gt; &lt;div class="call-out"&gt; &lt;p&gt;&lt;strong&gt;Video Tutorial on CSS for Page Layout:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;I've created a quick video that talks about page layout in CSS. I talk about  some ideas that will make your life a lot easier when it comes to building pages  with CSS.&lt;/p&gt; &lt;p&gt;CSS for Page Layout&lt;/p&gt;&lt;/div&gt; &lt;p&gt;  &lt;/p&gt; &lt;p&gt;I hope the CSS tutorial was useful for you all, it may have been a little  hard to get your head wrapped around this subject at first, but in time you will  see that your efforts will pay off. Please let me know how you felt about this  article. &lt;/p&gt;&lt;/li&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-6425382294310137661?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/6425382294310137661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=6425382294310137661' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6425382294310137661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6425382294310137661'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/cascading-style-sheets-tutorial-part-3.html' title='CASCADING STYLE SHEETS TUTORIAL PART 3 OF 3'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-5834927287111759670</id><published>2008-07-21T09:23:00.000-07:00</published><updated>2008-07-21T09:30:21.344-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS Tutorial'/><title type='text'>CASCADING STYLE SHEETS TUTORIAL PART 2 </title><content type='html'>In Part 1 we created a classic two-column layout with left side navigation using CSS and only a few types of HTML tags.&lt;br /&gt;&lt;br /&gt;Part 1 presented the code for the page and explained what HTML tags we were going to use. Now we will look at the actual HTML code used so far and the CSS.&lt;br /&gt;&lt;br /&gt;Our page so far is really very simple. As you may already know, all the content (text, images, Flash etc) that the user sees when viewing a web page is marked-up/coded with HTML in-between the  and tags*.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;In this case we have this: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="navigation"&gt;&lt;br /&gt;&lt;br /&gt;&lt;h2 style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;The Main navigation&lt;/span&gt;&lt;/h2&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div id="centerDoc"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;h1&gt;&lt;span style="font-size:85%;"&gt;The Main Heading&lt;/span&gt;&lt;/h1&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;p&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;Go to the Web Designers Killer Handbook home page and grab the practice HTML page that we will used as the starting template for this tutorial. You can find it under the heading: 'To create the practice HTML page do the following:'.&lt;br /&gt;&lt;br /&gt;Follow the instructions there and create your basic HTML page ... and do it now!&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above code we see that we have 2 main sections demarked by using &lt;/span&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt; tags. As you learned in part one of this tutorial, &lt;/span&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt; tags are designed to be used to create a 'division' in the document or in other words create a container. We have created two such containers and given them each of them a unique ID:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div id="navigation"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div id="centerDoc"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;You will notice that the entire contents of the page are contained in one of these two major page divisions. So the first questions are what are the rules of ID's in HTML pages and why do we use them and assign them to page elements like DIVs?&lt;br /&gt;&lt;br /&gt;1. First of all you can assign ID's to any HTML tag. So I could have assigned an ID to a &lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt; tag as well.&lt;br /&gt;&lt;br /&gt;2. An ID in a page should only be used once. That is to say that no two elements should have the same ID. ID's are meant to uniquely identify a page element. So in the above example we know that there is only one page element with an ID of 'navigation' and only page element with an ID of 'centerDoc'. I like to use ID names that talk to you, it is pretty clear what is going on in each division we created above.&lt;br /&gt;&lt;br /&gt;3. ID's on HTML page elements (tags) are used in CSS. We can target ID's in our CSS code to change the appearance, position and even behavior of that element by referencing the ID of the element.&lt;br /&gt;&lt;br /&gt;Inside the &lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-size:85%;"&gt; tags we use header tags (&lt;/span&gt;&lt;h1 style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; and &lt;/span&gt;&lt;/h1&gt;&lt;h2&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;) to set the headers. I speak to what header tags mean in part 1 of this tutorial.&lt;br /&gt;&lt;br /&gt;And finally I have some &lt;/span&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; tags, and of course I insert the text that makes up this simple page in-between them.&lt;br /&gt;&lt;br /&gt;Now I am going to jump to our CSS file that is attached to the HTML page. We attach the CSS document with this line of code in between the  tags:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;link href="myCSS.css" rel="stylesheet" type="text/css"&gt; &lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Like a normal page link we have an 'href' attribute this time pointing to a CSS document that has all our CSS code that will affect this page since it is linked to it. This is not the only way to associate CSS code to pages (there are a few other ways) but we will leave that to another article. So in the above link we name the CSS file name with this: 'href="myCSS.css"' and we tell the browser that the link is to a CSS page with this attribute: 'type="text/css"'. All that is important here is that the link point to a CSS file with the name: 'myCSS.css'&lt;br /&gt;&lt;br /&gt;So now that we got the style sheet linked to the document, lets look at some CSS code. This first snippet of code 'styles' the unique ID's we were talking about before:&lt;br /&gt;&lt;br /&gt;#navigation {&lt;br /&gt;&lt;br /&gt;position: absolute;&lt;br /&gt;&lt;br /&gt;width: 210px;&lt;br /&gt;&lt;br /&gt;height: 600px;&lt;br /&gt;&lt;br /&gt;margin: 0;&lt;br /&gt;&lt;br /&gt;margin-top: 0px;&lt;br /&gt;&lt;br /&gt;border-right: 1px solid #C6EC8C;&lt;br /&gt;&lt;br /&gt;font-weight: normal;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#centerDoc {&lt;br /&gt;&lt;br /&gt;position: absolute;&lt;br /&gt;&lt;br /&gt;padding: 0 0 20px 0; /*top right bottom left*/&lt;br /&gt;&lt;br /&gt;margin-top: 50px;&lt;br /&gt;&lt;br /&gt;margin-left: 235px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;There is a lot going on here so we will focus on just a few elements for now. In the above elements we have 2 selectors, one for each ID and each selectors are grouped/contained by using the curly brackets: { }. So here is the CSS selectors code with all their guts removed:&lt;br /&gt;&lt;br /&gt;#navigation {&lt;br /&gt;&lt;br /&gt;/*Look ma no CSS rules!*/&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#centerDoc {&lt;br /&gt;&lt;br /&gt;/*Look ma no CSS rules!*/&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I just inserted the text: '/*Look ma no CSS rules!*/' to show you where the CSS code would normally be. So now you can see that anything in between the curly brackets is part of one group or package that in CSS can generically be called a selector.&lt;br /&gt;&lt;br /&gt;In our above examples you can see that there is some text that appears before a curly bracket. That text gives a name to the selector. So in this case we have two selector names and thus to selectors: #centerDoc and #navigation. So why do we have the # symbol in front of the text? Why can't we call it simply 'centerDoc' and 'navigation'?&lt;br /&gt;&lt;br /&gt;Like HTML and programming certain text in certain places have special meaning that tells the system to do something particular. In this case whenever you have a # symbol in front of a name of a CSS selector we are saying that this selector is a special type of selector called an 'ID' selector. What is so special about an ID selector? That type of selector can only be applied to one element in the HTML page. Sounds familiar?&lt;br /&gt;&lt;br /&gt;So those of you not asleep at the computer, now see that we have a CSS ID selector for each of our HTML divs that have an ID, and they have the same corresponding names. So the CSS selector #centerDoc applies to the div: '&lt;/span&gt;&lt;/p&gt;&lt;div id="centerDoc"&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;' , you got it? Whatever CSS rules/styles we choose to code into our ID selector will change what appears inside the corresponding div. So for the div with the id of: 'navigation' we have these CSS rules:&lt;br /&gt;&lt;br /&gt;#navigation {&lt;br /&gt;&lt;br /&gt;position: absolute;&lt;br /&gt;&lt;br /&gt;width: 210px;&lt;br /&gt;&lt;br /&gt;height: 600px;&lt;br /&gt;&lt;br /&gt;margin: 0;&lt;br /&gt;&lt;br /&gt;margin-top: 0px;&lt;br /&gt;&lt;br /&gt;border-right: 1px solid #C6EC8C;&lt;br /&gt;&lt;br /&gt;font-weight: normal;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Notice at the bottom we say all text will have a font-weight of 'normal':&lt;br /&gt;&lt;br /&gt;font-weight: normal;&lt;br /&gt;&lt;br /&gt;We could just as easily have said that we want all the text to appear in the div (the div with the ID 'navigation') bold instead:&lt;br /&gt;&lt;br /&gt;font-weight: bold;&lt;br /&gt;&lt;br /&gt;But I digress, I already go into detail about CSS in a my previous article on CSS. This tutorial was about creating an easy to use page template so I will point out the 2 main elements that make this thing work.&lt;br /&gt;&lt;br /&gt;In our page the navigation div is sitting on the left and it has a border ... why? It has a nice light green 1 pixel border because I set this in my CSS:&lt;br /&gt;&lt;br /&gt;border-right: 1px solid #C6EC8C;&lt;br /&gt;&lt;br /&gt;Pretty self explanatory, no? I would suggest changing the color of the border and changing the pixel thickness of the border and see how it looks.&lt;br /&gt;&lt;br /&gt;Why is the navigation sitting on the left of the page while the centerDoc is to the right of it? Well first thing to look at is this line in the navigation selector:&lt;br /&gt;&lt;br /&gt;position: absolute;&lt;br /&gt;&lt;br /&gt;This tells the browser to just place this div on the page as is. This is oversimplifying the subject, but for our purposes this works for now.&lt;br /&gt;&lt;br /&gt;The real magic in this is the CSS code for centerDoc:&lt;br /&gt;&lt;br /&gt;#centerDoc {&lt;br /&gt;&lt;br /&gt;position: absolute;&lt;br /&gt;&lt;br /&gt;padding: 0 0 20px 0; /*top right bottom left*/&lt;br /&gt;&lt;br /&gt;margin-top: 50px;&lt;br /&gt;&lt;br /&gt;margin-left: 235x;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;The line :&lt;br /&gt;&lt;br /&gt;padding: 0 0 20px 0; /*top right bottom left*/&lt;br /&gt;&lt;br /&gt;Tells the browser to insert 20px (pixels) of padding to the bottom of the div with the ID 'centerDoc'.&lt;br /&gt;&lt;br /&gt;Let's back up here a second. We just used something called 'padding' and it is what it sounds like: Space that is wrapped around our element (tag).&lt;br /&gt;&lt;br /&gt;CSS has this feature and concept of a box model that essentially is a box that wraps around HTML elements. This box model consists of: padding, margins, borders and the actual content. This allows us to place a border around elements and space elements in relation to other elements. From the inside out it is ordered like so:&lt;br /&gt;&lt;br /&gt;content -&gt; padding -&gt; border -&gt; margin&lt;br /&gt;&lt;br /&gt;So in our case anything in between our &lt;/span&gt;&lt;div&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt; tags is the 'content'. Right after that comes the padding. Then there is a border and finally a margin. Margin and padding may seem like the same thing but if you think about it, you can see how being able to control the space before the border (padding) and after the border (margins) can really effect your layouts.&lt;br /&gt;&lt;br /&gt;In this example you notice that the navigation div sits higher up on the page than the centerDoc div. This is not because of the order that which they appear in the HTML, as they normally would without CSS, rather it is because of the margin settings I set for each selector; for centerDoc I set the top margin to 50px:&lt;br /&gt;&lt;br /&gt;margin-top: 50px;&lt;br /&gt;&lt;br /&gt;And for the navigation div I set it to:&lt;br /&gt;&lt;br /&gt;margin-top: 0px;&lt;br /&gt;&lt;br /&gt;This sets its top margin to 0 pixels so it will therefore be 50 pixels higher than the centerDoc div. I would suggest that you move the position of the navigation div under the center doc div in the HTML just to see if it changes anything, you will see that where the div appears in the actual HTML code has nothing to do with how it will appear to the user now that CSS positioning has been used. Another thing to try is to play with the CSS values and see what happens, change the padding, change the margins etc .&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/h2&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-5834927287111759670?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/5834927287111759670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=5834927287111759670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5834927287111759670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5834927287111759670'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/cascading-style-sheets-tutorial-part-2.html' title='CASCADING STYLE SHEETS TUTORIAL PART 2 '/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-118287967247100548</id><published>2008-07-21T09:21:00.000-07:00</published><updated>2008-07-21T09:28:57.909-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='css articles'/><title type='text'>CASCADING STYLE SHEETS TUTORIAL </title><content type='html'>&lt;p&gt;In this CSS tutorial I will not be able to show you everything there is about  CSS, but you will learn how to create nice looking CSS styled web pages. &lt;/p&gt; &lt;p&gt;After completing this tutorial, you should have enough information to explore  CSS and web design even further. &lt;/p&gt; &lt;ul style="margin-left: 20px; line-height: 150%;"&gt;&lt;li style="color: rgb(0, 153, 0);"&gt;You can download the CSS and HTML files we build in this tutorial: CSS files  &lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;You can check out what the page should look like here: CSS example page&lt;/span&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;div class="call-out"&gt; &lt;p&gt;&lt;strong&gt;THINGS TO REMEMBER ABOUT CSS:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Remember that CSS code is simply written instructions that tells Web browsers  (like FireFox and Internet Explorer) how to display things on a page. For  example:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;make text bold.  &lt;/li&gt;&lt;li&gt;position things a page.  &lt;/li&gt;&lt;li&gt;set the font style for a page or paragraph etc. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The sister language to CSS is HTML: code that tells the Web browser WHAT is  actually in the page.&lt;/p&gt; &lt;p&gt;... I know you knew that already, I just wanted to remind you!&lt;/p&gt;&lt;/div&gt; &lt;p&gt; &lt;/p&gt; &lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;CSS REDUCES THE NUMBER OF TAGS USED &lt;/strong&gt;&lt;/span&gt;&lt;/h2&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;Because of the power of CSS, we will be able to reduce the number of HTML  tags we use in a page big time, all the while still being able to layout great  looking pages using only 6 types (for lack of better words) of HTML tags. &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;The tags we will use to layout the content: &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;1. &lt;strong&gt;&lt;h&gt;&lt;/h&gt;&lt;/strong&gt; The Heading tags which range from  &lt;strong&gt;'' to ''&lt;/strong&gt;, are going  to be used to mark/tag headings in our pages. So the most important heading will  be wrapped in a &lt;/span&gt;&lt;/p&gt;&lt;h1 style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; tag and the least important in a  &lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h6 style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; tag. &lt;/span&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;An example of a heading: &lt;/span&gt;&lt;/p&gt; &lt;div class="codeSnippet" style="width: 60%;"&gt;&lt;h1&gt; &lt;span style="font-size:85%;"&gt;&lt;strong&gt;CSS Template Layout  &lt;/strong&gt;&lt;/span&gt;&lt;/h1&gt; &lt;/div&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;This tells the browsers and the search engines too, that this page is  primarily about: 'CSS Template Layout' &lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;span style="font-size:85%;"&gt;All browsers have a default size (for each&lt;strong&gt; &lt;h&gt;&lt;/h&gt;&lt;/strong&gt; tag) as  to how it renders text when placed between these tags. Many of these defaults  can be unusable (especially&lt;strong&gt; &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;/h6&gt;&lt;h1&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;) because they come out  too big. But never fear, CSS is here. We will use CSS to make the text sizes  more to our liking. &lt;/span&gt; &lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;2.&lt;strong&gt; &lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; The Paragraph tag is used to mark parts of the  pages as being 'paragraphs', simple enough. Paragraph tags are what they call a  'block element'; that means that it acts like a block where a space is  automatically inserted before and after each &lt;/span&gt;&lt;/p&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt; tag pair. You see it work  in the examples coming up. &lt;/span&gt;&lt;/p&gt; &lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;3. &lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt; and &lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;ol&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt; List tags will  used to create our menus. The tag &lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;ul&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt; is the 'un-ordered  list tag' that creates a list with bullets or other images/icons that do not  specify or denote an order; hence the term 'un-ordered'. The other list tag  mentioned (&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;ol&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;) is the 'ordered list tag' and it creates  a list that, instead of bullets, the list elements are marked with numbers or  letters. Code examples to follow. &lt;/span&gt; &lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;4. &lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt; We all know what the &lt;/span&gt;&lt;div&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt; tag is about  since we all read the previous article, right? We will use div's to create  containers for parts of our page. One div will be used to 'hold' our  navigational menu and another div to 'hold' the main page. &lt;/span&gt; &lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;5. &lt;strong&gt;&lt;/strong&gt;&lt;a&gt; The most important tag in HTML: the 'link  tag' or the 'hyperlink tag'. This makes text 'hyper' so that when we click on it  we can load another page or activate/call some JavaScript (otherwise known as  ECMA script). &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;6. &lt;strong&gt;&lt;img src="http://www.blogger.com/post-edit.g?blogID=7681105400300687252&amp;amp;postID=118287967247100548" /&gt;&lt;/strong&gt; This is the 'image tag', allows you to link  to images so that they show up in our pages. In HTML images are not embedded  into the actual page, instead the image tag (&lt;strong&gt;&lt;img src="http://www.blogger.com/post-edit.g?blogID=7681105400300687252&amp;amp;postID=118287967247100548" /&gt;&lt;/strong&gt;) only  points to where the image is and the browser will attempt to load that image  when a surfer loads your HTML page. &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;That covers the HTML tags we will use in our layout! No need for table tags,  &lt;strong&gt;&lt;br /&gt;&lt;/strong&gt; tags and nasty &lt;strong&gt;&lt;/strong&gt; tags.  &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;h2 style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;&lt;strong&gt;THE BASIC PAGE TEMPLATE&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;Go to the Web Designers Killer Handbook home page and grab the practice  HTML page that we will use as the starting template for this tutorial. You can  find it under the heading: 'To create the practice HTML page do the following:'  Follow the instructions there and create your basic HTML page. &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;Once you have created the template page, create a folder and name it  something like: 'myCSSwebsite' and then drop the HTML page into it. In that same  folder, create a new text document and call it: 'myCSS.css'. Once created open  that file and paste in this template CSS code and then save it: &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;div style="color: rgb(0, 153, 0); font-weight: normal;" class="codeSnippet"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;/* Generic Selectors */ &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;body { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-family: Georgia, "Times New Roman", Times, serif; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-size: 14px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #333333; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;background-color: #F9F9F9; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;p { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;width: 80%; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;li { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;list-style-type: none; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;line-height: 150%; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;list-style-image: url(../images/arrowSmall.gif); &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;h1 { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-family: Georgia, "Times New Roman", Times, serif; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-size: 18px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #000000; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;h2 { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-family: Georgia, "Times New Roman", Times, serif; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-size: 16px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #000000; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;border-bottom: 1px solid #C6EC8C; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;/**************** Pseudo classes ****************/ &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;a:link { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #00CC00; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;text-decoration: underline; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;li :link { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #00CC00; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;text-decoration: none; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;a:visited { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #00CC00; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;text-decoration: underline; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;li a:visited { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: #00CC00; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;text-decoration: none; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;a:hover { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: rgb(0, 96, 255); &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;padding-bottom: 5px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;text-decoration: underline; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;li a:hover { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;display: block; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: rgb(0, 96, 255); &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;padding-bottom: 5px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;border-bottom-width: 1px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;border-bottom-style: solid; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;border-bottom-color: #C6EC8C; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;a:active { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;color: rgb(255, 0, 102); &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: bold; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;/************************* ID's *************************/ &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;#navigation { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;position: absolute; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;width: 210px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;height: 600px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;margin: 0; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;margin-top: 50px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;border-right: 1px solid #C6EC8C; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;font-weight: normal; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;#centerDoc { &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;position: absolute; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;padding: 0 0 20px 0; /*top right bottom left*/ &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;margin-top: 50px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;margin-left: 235px; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;} &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="color: rgb(0, 153, 0); font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;Don't let the CSS freak you out, I will explain the important details and you  will soon see how easy it really is. One last thing for you to do before I  finish this part of the tutorial, we need to add some code to our HTML page.  &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="color: rgb(0, 153, 0); font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;In between the tags you will need to insert this  code: &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;div style="color: rgb(0, 153, 0); font-weight: normal;" class="codeSnippet"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;div id="navigation"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;h2&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;The Main navigation&lt;/a&gt;&lt;/span&gt;&lt;/h2&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;div id="centerDoc"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;h1&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;The Main Heading&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;Go to the Web Designers Killer Handbook home page and grab the practice HTML  page that we will used as the starting template for this tutorial. You can find  it under the heading: 'To create the practice HTML page do the following:'. &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;Follow the instructions there and create your basic HTML page ... and do it  now! &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-weight: normal;font-size:85%;" &gt;&lt;a&gt; &lt;/a&gt;&lt;/span&gt;&lt;p style="color: rgb(0, 153, 0); font-weight: normal;"&gt;&lt;span style="font-size:85%;"&gt;&lt;a&gt;And in between the  tags you will need to insert  this: &lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;a&gt; &lt;/a&gt;&lt;div style="color: rgb(0, 153, 0);" class="codeSnippet"&gt;&lt;a&gt; &lt;/a&gt;&lt;p&gt;&lt;title&gt;First CSS Tutorial&lt;/title&gt;&lt;a&gt; &lt;/a&gt;&lt;/p&gt;&lt;a&gt; &lt;/a&gt;&lt;p&gt;&lt;meta equiv="Content-Type" content="text/html;  charset=iso-8859-1"&gt;&lt;a&gt; &lt;/a&gt;&lt;/p&gt;&lt;a&gt; &lt;/a&gt;&lt;p&gt;&lt;link href="myCSS.css" rel="stylesheet" type="text/css"&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;/ul&gt;&lt;/h1&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-118287967247100548?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/118287967247100548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=118287967247100548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/118287967247100548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/118287967247100548'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/cascading-style-sheets-tutorial.html' title='CASCADING STYLE SHEETS TUTORIAL '/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-1414387015377579031</id><published>2008-07-21T09:17:00.000-07:00</published><updated>2008-07-21T09:19:32.729-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS Shortcuts'/><title type='text'>Top CSS Shortcuts</title><content type='html'>&lt;div class="storycontent"&gt; &lt;p&gt;&lt;span style="font-weight: bold;"&gt;Top CSS Shortcuts&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When writing your CSS, it is possible to write neater, more readable code by  making use of CSS shortcuts. A shortcut is a feature of CSS that allows the  developer to specify a number of related properties on a single line rather than  specify them all separately. Lets look at the following example:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header  {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-top:5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-right:10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-bottom:5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-left:10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;The code above is perfectly valid and will work fine, but we can save time  and make the code much neater using the following code:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding:5px 10px 5px 10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Using the code above we can specify all of the padding for the header div on  one line. It works by applying the first attribute (5px) to the top padding of  the div. The second (10px) applies to the right side padding, the 3rd (5px)  attribute means the padding on the bottom of the div, and the forth (10px)  attribute means the left side padding. The padding is always applied in this  order.&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;It is possible to shorten this code even further using the following  code:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding:5px 10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This works by taking the first (5px) attribute to mean the top and bottom, or  vertical padding, and the second (10px) attribute to mean the horizontal padding  (left and right).&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;The exact same principles can be used to declare the margin of your divs, so  what could have looked like this:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header  {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-top:5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-right:10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-bottom:5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;padding-left:10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;margin-top:5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;margin-right:10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;margin-bottom:5px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;margin-left:10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Can  now look much neater, and is obviously much quicker to write using the  following:&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;.header {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;padding:5px 10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;margin:5px  10px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;h3&gt;Background properties&lt;/h3&gt; &lt;p&gt;One of my favorite CSS shortcuts is the background property shortcut. This is  how a typical CSS file could look without shortcuts:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;.header  {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;background-image:url(images/image.jpg);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;background-position:top;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;background-repeat:repeat-x;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;background-color:#fff;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 102, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;However, with some nifty CSS it could look like this:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;background: #fff url(images/image.jpg) repeat-x  top;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;The above code is much quicker and more manageable. Take note though, that  all of the properties must be provided when using the background shortcut. If I  missed off the colour specification at the beginning for example, the code would  not work. &lt;/p&gt; &lt;h3&gt;Font shortcuts&lt;/h3&gt; &lt;p&gt;Another very useful shortcut is the font shortcut. The code below can be  shorted considerably:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;body {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;font-weight: bold;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;font-family: verdana,  sans-serif;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;font-size: 0.8em;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;line-height: 1.2em;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;H&lt;/span&gt;ere is the shortcut:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;body {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;font: bold 0.8em/1.2em verdana,  sans-serif;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;It is important to write the shortcut in the same order as above so that web  browsers don’t get confused!&lt;/p&gt; &lt;h3&gt;Borders&lt;/h3&gt; &lt;p&gt;This is my favorite shortcut of all. This saves me a great deal of time when  I am developing web sites because whenever I have a problem with a layout or an  element, the first thing I do is put a border around it so that I can see its  dimensions and work out what’s going on.&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;Here is some typical code:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;border-width: 1px;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;border-color:  #000;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;border-style: solid;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p style="font-weight: bold;"&gt;This can be shorted to the following:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;.header {&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;border:1px solid #000;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Then, whenever you are not sure why an element is not behaving properly, just  use the border shortcut above to debug your code and see what the dimensions of  the element are. &lt;/p&gt; &lt;h3&gt;Conclusion&lt;/h3&gt; &lt;p&gt;As you can see, you can make your code much shorter and neater using the CSS  shortcuts outlined here. Once you get into the habit of using them, I guarantee  that you will wonder why you ever did it differently in the past!&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-1414387015377579031?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/1414387015377579031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=1414387015377579031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1414387015377579031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1414387015377579031'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/top-css-shortcuts.html' title='Top CSS Shortcuts'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-4996998775615984031</id><published>2008-07-21T09:14:00.000-07:00</published><updated>2008-07-21T09:16:21.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS Shortcuts'/><title type='text'>CSS  Shortcuts Tutorial</title><content type='html'>&lt;h1 id="top"&gt;CSS Shortcuts&lt;/h1&gt; &lt;div class="slug"&gt;In CSS, there are a numerous ways to code the same style. In the  tutorial, I'll explain some of the most common shortcut structures that will  allow you to make your css styles as small and effcient as possible.&lt;/div&gt;&lt;br /&gt; &lt;div class="mid"&gt; &lt;div id="spon"&gt;  &lt;div align="center"&gt;&lt;a href="http://www.spoonohost.com/"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt; &lt;p&gt;&lt;b&gt;Fonts&lt;/b&gt;&lt;br /&gt;When defining fonts, you can combine 4 of the most used css  attributes into one. For instance, the old-school way of writing this font  style:&lt;/p&gt;&lt;pre style="color: rgb(0, 153, 0);"&gt;font-weight: bold;&lt;br /&gt;font-family: verdana, sans-serif;&lt;br /&gt;font-size: 11px;&lt;br /&gt;line-height: 16px;&lt;/pre&gt; &lt;p&gt;can be written using shortcut methods as:&lt;/p&gt;&lt;pre style="color: rgb(51, 204, 0);"&gt;font: bold 11px/16px verdana, sans-serif;&lt;/pre&gt; &lt;p&gt;The attributes must be arranged in the same order or web browsers will get  confused.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Hex-decimal Colors&lt;/b&gt;&lt;br /&gt;Color attributes for all kinds of CSS styles can  be written using defined using hex-decimal colors like &lt;span class="green"&gt;color:  #ff6600;&lt;/span&gt; for a shade of orange. Colors that are made up of pairs of  repeated digits can be simplified by using 3 digits instead of all six. For  instance, the orange hex-decimal code can be abbreviated as &lt;span class="green"&gt;color: #f60;&lt;/span&gt;. Each digit represents two digits in the full  hex-decimal code. So, if you what to use the color white in your code, don't use  &lt;span class="green"&gt;color: white;&lt;/span&gt; or &lt;span class="green"&gt;color:  #ffffff;&lt;/span&gt;. That's so 1997. Be cool and use &lt;span class="green"&gt;color:  #fff;&lt;/span&gt;. (And just like that you may have saved a character or  three...great stuff).&lt;/p&gt; &lt;p&gt;&lt;b&gt;Borders&lt;/b&gt;&lt;br /&gt;If you were to right out the long-hand version of border  code, it could take up some serious space. For example, just to define common  attributes for a top border of something you could end up writing:&lt;/p&gt;&lt;pre style="color: rgb(0, 153, 0);"&gt;border-top-width: 2px;&lt;br /&gt;border-top-style: dashed;&lt;br /&gt;border-top-color: #f00;&lt;/pre&gt; &lt;p&gt;That can be simplified to:&lt;/p&gt;&lt;pre style="color: rgb(0, 153, 0);"&gt;border-top: 2px dashed #f00;&lt;/pre&gt; &lt;p&gt;Additionally, if you are going to define all four borders you can just use  one border attribute like:&lt;/p&gt;&lt;pre style="color: rgb(51, 204, 0);"&gt;border: 2px dashed #f00;&lt;/pre&gt; &lt;p&gt;&lt;b&gt;Margins, Padding, and Borders&lt;/b&gt;&lt;br /&gt;Margins, padding, and borders all  have similar CSS coding, such as:&lt;/p&gt;&lt;pre style="color: rgb(0, 153, 0);"&gt;margin-top: 10px;&lt;br /&gt;margin-right: 5px;&lt;br /&gt;margin-bottom: 20px;&lt;br /&gt;margin-left: 15px;&lt;/pre&gt; &lt;p&gt;All four attributes can be defined in shortcut notation like this:&lt;/p&gt;&lt;pre&gt;margin: 10px 5px 20px 15px;&lt;/pre&gt; &lt;p&gt;Note that the attributes go around clock-wise starting from the top. Margin,  padding, and borders can be shorted further when some of the attributes are the  same. Here is a list all four combinations of shorcuts:&lt;/p&gt; &lt;p style="color: rgb(51, 204, 0);"&gt;4 Values: (&lt;span class="green"&gt;margin: 20px 15px 10px 5px;&lt;/span&gt;) first -  &lt;i&gt;top&lt;/i&gt;, second - &lt;i&gt;right&lt;/i&gt;, third - &lt;i&gt;bottom&lt;/i&gt;, fourth -  &lt;i&gt;left&lt;/i&gt;.&lt;br /&gt;3 Values: (&lt;span class="green"&gt;margin: 20px 15px 10px;&lt;/span&gt;)  first - &lt;i&gt;top&lt;/i&gt;, second - &lt;i&gt;left &amp;amp; right&lt;/i&gt;, third -  &lt;i&gt;bottom&lt;/i&gt;.&lt;br /&gt;2 Values: (&lt;span class="green"&gt;margin: 20px 15px;&lt;/span&gt;) first  - &lt;i&gt;top &amp;amp; bottom&lt;/i&gt;, second - &lt;i&gt;left &amp;amp; right&lt;/i&gt;.&lt;br /&gt;1 Value: (&lt;span class="green"&gt;margin: 10px;&lt;/span&gt;) first - &lt;i&gt;top, right, bottom, &amp;amp;  left&lt;/i&gt;&lt;/p&gt; &lt;p&gt;&lt;b&gt;Zeros&lt;/b&gt;&lt;br /&gt;While we're talking about shortcuts, it's probably good to  note that when defining any size attributes using px, em, pt, pc, in or what  ever other measuring increment you wish to use, you can always leave off the  measurement unit for values of 0 (ie: 0, 0px, 0em, and 0pt) are all the same.  The only caveat is when you are defining with percentages. For reasons beyond  our scope of knowlege, the powers that be at the W3C made it necessary to add  the % sign to 0%. In some browsers, it doesn't matter. But to be safe, use 0%  with combinations of other percentages.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-4996998775615984031?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/4996998775615984031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=4996998775615984031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4996998775615984031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4996998775615984031'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/css-shortcuts-tutorial.html' title='CSS  Shortcuts Tutorial'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-607093934935534081</id><published>2008-07-21T09:12:00.000-07:00</published><updated>2008-07-21T09:14:03.311-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS Shortcuts'/><title type='text'>CSS: Shortcuts tips</title><content type='html'>&lt;strong&gt;&lt;span style="color:#ff6600;"&gt;CSS: Shortcuts tips&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;(Still on old news for you CSS-pros. I’m wondering why YOU’RE not writing this blog. All the comments have been more helpful than my posts!! LOL!)&lt;br /&gt;&lt;strong&gt;Just wanted to jot these down so I could find them later:&lt;/strong&gt;&lt;br /&gt;&lt;span style="color:#009900;"&gt;font-weight: bold;font-size: 10px;font-family: Verdana,Arial,Helvetica,sans-serif;shortcut:font: bold 10px Verdana,Arial,Helvetica,sans-serif;&lt;br /&gt;margin/padding shortcuts:margin: top# right# bottom# left#ie. margin: 5px 0px 2px 10px;ormargin: top&amp;amp;bottom# left&amp;amp;right#ie. margin: 10px 5px;&lt;br /&gt;color shortcuts (websafe hex)color: #000000;shortcut: color: #000color: #FFCC00;shortcut: color: #FC0;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-607093934935534081?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/607093934935534081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=607093934935534081' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/607093934935534081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/607093934935534081'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/css-shortcuts-tips.html' title='CSS: Shortcuts tips'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-1705824926248248729</id><published>2008-07-21T09:10:00.000-07:00</published><updated>2008-07-21T09:12:17.680-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CSS Shortcuts'/><title type='text'>CSS Shortcuts</title><content type='html'>Shortcuts&lt;br /&gt;In CSS, there are a numerous ways to code the same style. In the tutorial, I'll explain some of the most common shortcut structures that will allow you to make your css styles as small and effcient as possible.&lt;br /&gt;Sponsors - Spoono Host&lt;br /&gt;&lt;a href="http://www.spoonohost.com/"&gt;&lt;/a&gt;&lt;br /&gt;FontsWhen defining fonts, you can combine 4 of the most used css attributes into one. For instance, the old-school way of writing this font style:&lt;br /&gt;font-weight: bold;&lt;br /&gt;font-family: verdana, sans-serif;&lt;br /&gt;font-size: 11px;&lt;br /&gt;line-height: 16px;&lt;br /&gt;can be written using shortcut methods as:font: bold 11px/16px verdana, sans-serif;&lt;br /&gt;The attributes must be arranged in the same order or web browsers will get confused.&lt;br /&gt;Hex-decimal ColorsColor attributes for all kinds of CSS styles can be written using defined using hex-decimal colors like color: #ff6600; for a shade of orange. Colors that are made up of pairs of repeated digits can be simplified by using 3 digits instead of all six. For instance, the orange hex-decimal code can be abbreviated as color: #f60;. Each digit represents two digits in the full hex-decimal code. So, if you what to use the color white in your code, don't use color: white; or color: #ffffff;. That's so 1997. Be cool and use color: #fff;. (And just like that you may have saved a character or three...great stuff).&lt;br /&gt;BordersIf you were to right out the long-hand version of border code, it could take up some serious space. For example, just to define common attributes for a top border of something you could end up writing:border-top-width: 2px;&lt;br /&gt;border-top-style: dashed;&lt;br /&gt;border-top-color: #f00;&lt;br /&gt;That can be simplified to:border-top: 2px dashed #f00;&lt;br /&gt;Additionally, if you are going to define all four borders you can just use one border attribute like:border: 2px dashed #f00;&lt;br /&gt;Margins, Padding, and BordersMargins, padding, and borders all have similar CSS coding, such as:margin-top: 10px;&lt;br /&gt;margin-right: 5px;&lt;br /&gt;margin-bottom: 20px;&lt;br /&gt;margin-left: 15px;&lt;br /&gt;All four attributes can be defined in shortcut notation like this:margin: 10px 5px 20px 15px;&lt;br /&gt;Note that the attributes go around clock-wise starting from the top. Margin, padding, and borders can be shorted further when some of the attributes are the same. Here is a list all four combinations of shorcuts:&lt;br /&gt;4 Values: (margin: 20px 15px 10px 5px;) first - top, second - right, third - bottom, fourth - left.3 Values: (margin: 20px 15px 10px;) first - top, second - left &amp;amp; right, third - bottom.2 Values: (margin: 20px 15px;) first - top &amp;amp; bottom, second - left &amp;amp; right.1 Value: (margin: 10px;) first - top, right, bottom, &amp;amp; left&lt;br /&gt;ZerosWhile we're talking about shortcuts, it's probably good to note that when defining any size attributes using px, em, pt, pc, in or what ever other measuring increment you wish to use, you can always leave off the measurement unit for values of 0 (ie: 0, 0px, 0em, and 0pt) are all the same. The only caveat is when you are defining with percentages. For reasons beyond our scope of knowlege, the powers that be at the W3C made it necessary to add the % sign to 0%. In some browsers, it doesn't matter. But to be safe, use 0% with combinations of other percentages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-1705824926248248729?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/1705824926248248729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=1705824926248248729' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1705824926248248729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1705824926248248729'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/07/css-shortcuts.html' title='CSS Shortcuts'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7681105400300687252.post-8421352530783940534</id><published>2008-06-27T12:10:00.000-07:00</published><updated>2008-06-27T12:19:29.326-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Arrow Bullet List Menu</title><content type='html'>&lt;p&gt;This CSS list menu features category headers with a two toned background, UL  elements that have their default margins and padding removed, and finally, LI  elements with custom bullet images. The result is something simple but elegant,  and resembling something you might have seen on this site already! &lt;b&gt;Note:  &lt;/b&gt;For a version of this menu that dynamically expands and hides its sub menus,  see &lt;a href="http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm"&gt;Accordion  Menu&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;&lt;b class="codetitle"&gt;Demo:&lt;/b&gt;&lt;/p&gt; &lt;div class="arrowlistmenu"&gt; &lt;h3 class="headerbar"&gt;CSS Library&lt;/h3&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/"&gt;Horizontal CSS  Menus&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C2/"&gt;Vertical  CSS Menus&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C4/"&gt;Image  CSS&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C6/"&gt;Form  CSS&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C5/"&gt;DIVs and  containers&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C7/"&gt;Links  &amp;amp; Buttons&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C8/"&gt;Other&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/all/"&gt;Browse All&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;h3 class="headerbar"&gt;CSS Drive&lt;/h3&gt; &lt;ul&gt;&lt;li&gt;&lt;a href="http://www.cssdrive.com/"&gt;CSS Gallery&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/menudesigns/"&gt;Menu Gallery&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/news/"&gt;Web Design News&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/examples/"&gt;CSS Examples&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/main/csscompressor/"&gt;CSS  Compressor&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://www.dynamicdrive.com/forums/forumdisplay.php?f=6"&gt;CSS  Forums&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt; &lt;p class="iepara"&gt;&lt;b class="codetitle"&gt;The two images used:&lt;/b&gt;&lt;/p&gt; &lt;p class="codeimages"&gt;&lt;img title="Dimensions- 6px by 40px" src="http://www.dynamicdrive.com/cssexamples/media/titlebar.png" height="40" width="10" /&gt; &lt;img title="Dimensions- 15px by 15px" src="http://www.dynamicdrive.com/cssexamples/media/arrowbullet.png" height="17" width="17" /&gt;&lt;/p&gt; &lt;p&gt;&lt;b class="codetitle"&gt;The CSS:&lt;/b&gt;&lt;/p&gt; &lt;form&gt; &lt;div&gt; &lt;div class="selectcode"&gt;&lt;a class="tabs" href="http://www.dynamicdrive.com/style/csslibrary/item/arrow_bullet_list_menu/#selectcode" rel="1"&gt;Select Code&lt;/a&gt; &lt;a class="tabs" href="http://www.dynamicdrive.com/style/csslibrary/item/arrow_bullet_list_menu/#expandcode" rev="154 defaultHeight" rel="1"&gt;Expand&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;textarea class="codecontainer" style="margin-top: 0px;" rows="10" cols="70"&gt;&lt;style type="text/css"&gt;  .arrowlistmenu{ width: 180px; /*width of menu*/ }  .arrowlistmenu .headerbar{ font: bold 14px Arial; color: white; background: black url(media/titlebar.png) repeat-x center left; margin-bottom: 10px; /*bottom spacing between header and rest of content*/ text-transform: uppercase; padding: 4px 0 4px 10px; /*header text is indented 10px*/ }  .arrowlistmenu ul{ list-style-type: none; margin: 0; padding: 0; margin-bottom: 8px; /*bottom spacing between each UL and rest of content*/ }  .arrowlistmenu ul li{ padding-bottom: 2px; /*bottom spacing between menu items*/ }  .arrowlistmenu ul li a{ color: #A70303; background: url(media/arrowbullet.png) no-repeat center left; /*custom bullet list image*/ display: block; padding: 2px 0; padding-left: 19px; /*link text is indented 19px*/ text-decoration: none; font-weight: bold; border-bottom: 1px solid #dadada; font-size: 90%; }  .arrowlistmenu ul li a:visited{ color: #A70303; }  .arrowlistmenu ul li a:hover{ /*hover state CSS*/ color: #A70303; background-color: #F3F3F3; }  &lt;/style&gt; &lt;/textarea&gt;  &lt;p&gt;&lt;b class="codetitle"&gt;The HTML:&lt;/b&gt;&lt;/p&gt; &lt;div&gt; &lt;div class="selectcode"&gt;&lt;a class="tabs" href="http://www.dynamicdrive.com/style/csslibrary/item/arrow_bullet_list_menu/#selectcode" rel="2"&gt;Select Code&lt;/a&gt; &lt;a class="tabs" href="http://www.dynamicdrive.com/style/csslibrary/item/arrow_bullet_list_menu/#expandcode" rev="154 defaultHeight" rel="2"&gt;Expand&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;textarea class="codecontainer" style="margin-top: 0px;" rows="10" cols="70"&gt;&lt;div class="arrowlistmenu"&gt;  &lt;h3 class="headerbar"&gt;CSS Library&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C1/"&gt;Horizontal CSS Menus&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C2/"&gt;Vertical CSS Menus&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C4/"&gt;Image CSS&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C6/"&gt;Form CSS&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C5/"&gt;DIVs and containers&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C7/"&gt;Links &amp;amp; Buttons&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/category/C8/"&gt;Other&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/style/csslibrary/all/"&gt;Browse All&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;h3 class="headerbar"&gt;CSS Drive&lt;/h3&gt; &lt;ul&gt; &lt;li&gt;&lt;a href="http://www.cssdrive.com"&gt;CSS Gallery&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/menudesigns/"&gt;Menu Gallery&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/news/"&gt;Web Design News&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/examples/"&gt;CSS Examples&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.cssdrive.com/index.php/main/csscompressor/"&gt;CSS Compressor&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="http://www.dynamicdrive.com/forums/forumdisplay.php?f=6"&gt;CSS Forums&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;/div&gt; &lt;/textarea&gt;&lt;/form&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-8421352530783940534?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/8421352530783940534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=8421352530783940534' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8421352530783940534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8421352530783940534'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/arrow-bullet-list-menu.html' title='Arrow Bullet List Menu'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7681105400300687252.post-4868912464656783321</id><published>2008-06-27T12:04:00.000-07:00</published><updated>2008-06-27T12:08:14.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>png transparency problems</title><content type='html'>&lt;p&gt;If you are CSS coder, you've probably ran in to png transparency problems  many times. Even Microsoft is having problems with it http://runonce.msn.com/runonce2.aspx open in IE6. So I'll tell  you few problems and solutions I've handled so far.&lt;/p&gt; &lt;p&gt;First one is if you need just simple transparent image, without some special  needs for example backgrounds etc. The solution would be png  fix. I've used it many times but it has lots of faults, for example with  padding, margins and absolute positioning. Sometimes i can mess up the rest of  your JavaScript files, but anyway very useful script. You can download it here  http://homepage.ntlworld.com/bobosola/pngfix.js and just  include it in your &lt;head&gt; tag&lt;/p&gt; &lt;p&gt;&lt;img class="mainslika" alt="PNG" src="http://stylizedweb.com/wp-content/themes/dejanc/images/png1.jpg" /&gt;&lt;/p&gt;&lt;pre class="javascript"&gt;&lt;!--&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 102);"&gt;if&lt;/span&gt; lt IE &lt;span style="color: rgb(204, 0, 0);"&gt;7&lt;/span&gt;.&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&gt;&lt;br /&gt;&lt;script type="&lt;span" style="color: rgb(51, 102, 204);"&gt;"text/javascript"&lt;/span&gt; src=&lt;span style="color: rgb(51, 102, 204);"&gt;"pngfix.js"&lt;/span&gt;&gt;&lt;/script&gt;&lt;br /&gt;&lt;!&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;endif&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;--&gt;&lt;/pre&gt; &lt;p&gt;The second one can partly handle issues from first and it's pure CSS  solution. I mostly use this for backgrounds, because if your path for a  background is from CSS file then png fix can't handle it.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;pre class="css"&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.someelement&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background-image&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;images/image&lt;span style="color: rgb(102, 102, 255);"&gt;.png&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;* html &lt;span style="color: rgb(102, 102, 255);"&gt;.someelemen&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background-color&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#&lt;span style="color: rgb(153, 51, 51);"&gt;333&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;back\ground-&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;color&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;transparent&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background-image&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;images/blank&lt;span style="color: rgb(102, 102, 255);"&gt;.gif&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;filter: progid&lt;span style="color: rgb(51, 51, 255);"&gt;:DXImageTransform&lt;/span&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.Microsoft&lt;/span&gt;.&lt;br /&gt;AlphaImageLoader&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;src=&lt;span style="color: rgb(255, 0, 0);"&gt;"images/image.png"&lt;/span&gt;, sizingMethod=&lt;span style="color: rgb(255, 0, 0);"&gt;"scale"&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;I found this very useful, and also when you add some hover effects for  example some color or other image. You can see live example here&lt;br /&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;  This simple hover is just example and it doesn't work in IE6&lt;/p&gt;&lt;pre class="css"&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.someelement&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;:hover&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#&lt;span style="color: rgb(153, 51, 51);"&gt;333&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.someelement&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;:hover&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background-image&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;images/image2&lt;span style="color: rgb(102, 102, 255);"&gt;.gif&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;Only problem I had with this was with &lt;a&gt; tag, link just don't work  (when it's in div with this kind of background) and i don't know why (talking  again for IE6). And only solution i could think of was to place another absolute  div over it for the links, content etc... Yes i know it's not elegant but it  works if content is not dynamic.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-4868912464656783321?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/4868912464656783321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=4868912464656783321' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4868912464656783321'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4868912464656783321'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/png-transparency-problems.html' title='png transparency problems'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7770494193329738990</id><published>2008-06-27T11:53:00.000-07:00</published><updated>2008-06-27T11:58:15.314-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='About CSS3'/><title type='text'>What it's all about...</title><content type='html'>&lt;blockquote cite="http://www.w3.org/Style/CSS/"&gt; &lt;p class="cite"&gt;Cascading Style Sheets (&lt;b&gt;CSS&lt;/b&gt;) is a simple mechanism for  adding style (e.g. fonts, colors, spacing) to Web documents.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;The above quote, taken from the W3C website, is one of the reasons for this  site. Whilst I agree that it is a mechanism for adding style to web documents, I  do not agree that it is a SIMPLE mechanism. It can be very complicated, as I  found out when I took my first steps down this path.&lt;/p&gt; &lt;p&gt;&lt;b class="css"&gt;CSS&lt;/b&gt;&lt;span class="play"&gt;&lt;i&gt;p&lt;/i&gt;lay&lt;/span&gt;, by the way, is now  listed on the &lt;a href="http://www.w3.org/Style/CSS/learning" rel="nofollow"&gt;w3c.org website&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;So I have created this site in the hope that it will help newcomers to CSS  and show old hands that it is more than just a mechanism for styling your  documents. It is oh so much more.&lt;/p&gt; &lt;p&gt;Because &lt;b class="css"&gt;CSS&lt;/b&gt;&lt;span class="play"&gt;play&lt;/span&gt; deals with  experimental CSS that is exactly what you get JUST CSS, no javascript or any  other programming language has been used in any of the demonstrations. For  javascript demonstrations please click the javascript link in the main  navigation bar which will take you to my other site which is dedicated to  demonstrations using CSS and minimal, unobtrusive, javascript.&lt;/p&gt; &lt;h3&gt;Use the correct DocType Definition (DTD)&lt;/h3&gt; &lt;p&gt;Please , please, please note that for most of my demonstrations to work,  especially in Internet Explorer, you MUST use a standards compliant !DOCTYPE,  and for Internet Explorer this MUST be the first line of your (x)html.&lt;br /&gt;Using  &lt;?xml version="1.0" encoding="UTF-8"?&gt; will switch IE into quirks  mode.&lt;/p&gt; &lt;p&gt;A list of the recommended DTDs can be found at the following link:&lt;br /&gt;&lt;a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" rel="nofollow"&gt;Recommended  DTDs to use in your Web document&lt;/a&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7770494193329738990?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7770494193329738990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7770494193329738990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7770494193329738990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7770494193329738990'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/what-its-all-about.html' title='What it&apos;s all about...'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3919435903378258459</id><published>2008-06-27T11:49:00.000-07:00</published><updated>2008-06-27T11:53:18.970-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Most used CSS Tricks</title><content type='html'>&lt;p&gt;Earlier before I have written an article about current best CSS hacks which  you can see &lt;a href="http://stylizedweb.com/2008/02/14/10-best-css-hacks/"&gt;here&lt;/a&gt; And now  here’s the list of today’s most used CSS tricks – tips. I have added image  examples for most of them because of critics on CSS hacks article. If you think  I have missed any please let me know&lt;/p&gt; &lt;h5&gt;1. Rounded corners without images&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;div id="&lt;span" style="color: rgb(255, 0, 0);"&gt;"container"&lt;/span&gt;&gt;&lt;br /&gt;&lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"rtop"&lt;/span&gt;&gt;&lt;br /&gt;&lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r1"&lt;/span&gt;&gt;&lt;/b&gt; &lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r2"&lt;/span&gt;&gt;&lt;/b&gt; &lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r3"&lt;/span&gt;&gt;&lt;/b&gt; &lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r4"&lt;/span&gt;&gt;&lt;/b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;!--&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;content&lt;/span&gt; goes here --&gt;&lt;br /&gt;&lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"rbottom"&lt;/span&gt;&gt;&lt;br /&gt;&lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r4"&lt;/span&gt;&gt;&lt;/b&gt; &lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r3"&lt;/span&gt;&gt;&lt;/b&gt; &lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r2"&lt;/span&gt;&gt;&lt;/b&gt; &lt;b class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"r1"&lt;/span&gt;&gt;&lt;/b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.rtop&lt;/span&gt;, &lt;span style="color: rgb(102, 102, 255);"&gt;.rbottom&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;display&lt;span style="color: rgb(51, 51, 255);"&gt;:block&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.rtop&lt;/span&gt; *, &lt;span style="color: rgb(102, 102, 255);"&gt;.rbottom&lt;/span&gt; *&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;block&lt;/span&gt;; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;1px&lt;/span&gt;; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;overflow&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;hidden&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.r1&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;margin&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;5px&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.r2&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;margin&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;3px&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.r3&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;margin&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;2px&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.r4&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;margin&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;1px&lt;/span&gt;; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;2px&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Rounded corners without images" src="http://stylizedweb.com/examples/rounded1.gif" /&gt;&lt;/p&gt; &lt;h5&gt;2. Style your order list&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;This is line one&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;Here is line two&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;br /&gt;&lt;br /&gt;And last line&lt;br /&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;ol &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;italic&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;1em&lt;/span&gt; Georgia, Times, &lt;span style="color: rgb(153, 51, 51);"&gt;serif&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;color&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#&lt;span style="color: rgb(153, 51, 51);"&gt;999999&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ol p &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;normal&lt;/span&gt; &lt;span style="color: rgb(102, 102, 255);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;.8em&lt;/span&gt;&lt;/span&gt; Arial, Helvetica, &lt;span style="color: rgb(153, 51, 51);"&gt;sans-serif&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;color&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#&lt;span style="color: rgb(153, 51, 51);"&gt;000000&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Style your order list" src="http://stylizedweb.com/examples/order.gif" /&gt;&lt;/p&gt; &lt;h5&gt;3. Tableless forms&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;form&gt;&lt;br /&gt;&lt;label for="&lt;span" style="color: rgb(255, 0, 0);"&gt;"name"&lt;/span&gt;&gt;Name&lt;/label&gt;&lt;br /&gt;&lt;input id="&lt;span" style="color: rgb(255, 0, 0);"&gt;"name"&lt;/span&gt; name=&lt;span style="color: rgb(255, 0, 0);"&gt;"name"&lt;/span&gt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;label for="&lt;span" style="color: rgb(255, 0, 0);"&gt;"address"&lt;/span&gt;&gt;Address&lt;/label&gt;&lt;br /&gt;&lt;input id="&lt;span" style="color: rgb(255, 0, 0);"&gt;"address"&lt;/span&gt; name=&lt;span style="color: rgb(255, 0, 0);"&gt;"address"&lt;/span&gt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;label for="&lt;span" style="color: rgb(255, 0, 0);"&gt;"city"&lt;/span&gt;&gt;City&lt;/label&gt;&lt;br /&gt;&lt;input id="&lt;span" style="color: rgb(255, 0, 0);"&gt;"city"&lt;/span&gt; name=&lt;span style="color: rgb(255, 0, 0);"&gt;"city"&lt;/span&gt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;br /&gt;label,input &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;block&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;150px&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;float&lt;/span&gt;: &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;left&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;margin-bottom&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;10px&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;label &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;text-align&lt;/span&gt;: &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;right&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;75px&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;padding-right&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;20px&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;br &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;clear&lt;/span&gt;: &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;left&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="CSS Tableless forms" src="http://stylizedweb.com/examples/form.gif" /&gt;&lt;/p&gt; &lt;h5&gt;4. Double blockquote&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;blockquote&lt;span style="color: rgb(51, 51, 255);"&gt;:first-letter&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;images/open-quote&lt;span style="color: rgb(102, 102, 255);"&gt;.gif&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;no-repeat&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;left&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;top&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;padding-left&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;18px&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;italic&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;.4em&lt;/span&gt;&lt;/span&gt; Georgia, &lt;span style="color: rgb(255, 0, 0);"&gt;"Times New Roman"&lt;/span&gt;, Times, &lt;span style="color: rgb(153, 51, 51);"&gt;serif&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Double blockquote" src="http://stylizedweb.com/examples/double.gif" /&gt;&lt;/p&gt; &lt;h5&gt;5. Gradient text effect&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;h1&gt;&lt;span&gt;&lt;/span&gt;CSS Gradient Text&lt;/h1&gt;&lt;br /&gt;&lt;br /&gt;h1 &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;bold&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;330&lt;/span&gt;%&lt;/span&gt;/&lt;span style="color: rgb(153, 51, 51);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;100&lt;/span&gt;%&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;"Lucida Grande"&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;position&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;relative&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;color&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#&lt;span style="color: rgb(153, 51, 51);"&gt;464646&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;h1 span &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;gradient&lt;span style="color: rgb(102, 102, 255);"&gt;.png&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;repeat-x&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;position&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;absolute&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;block&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;100&lt;/span&gt;%&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;31px&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;!--&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;if lt IE &lt;span style="color: rgb(153, 51, 51);"&gt;7&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&gt;&lt;br /&gt;&lt;style&gt;&lt;br /&gt;h1 span &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;none&lt;/span&gt;;&lt;br /&gt;filter: progid&lt;span style="color: rgb(51, 51, 255);"&gt;:DXImageTransform&lt;/span&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.Microsoft&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.AlphaImageLoader&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;src=&lt;span style="color: rgb(255, 0, 0);"&gt;'gradient.png'&lt;/span&gt;,&lt;br /&gt; sizingMethod=&lt;span style="color: rgb(255, 0, 0);"&gt;'scale'&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;!&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;endif&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;--&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Gradient text effect" src="http://stylizedweb.com/examples/gradient.gif" /&gt;&lt;/p&gt; &lt;h5&gt;6. Vertical centering with line-height&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;div&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;height&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;100px&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;div *&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;margin&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;div p&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;line-height&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;100px&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Content here&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Vertical centering with line-height" src="http://stylizedweb.com/examples/verticalcenter.gif" /&gt;&lt;/p&gt; &lt;h5&gt;7. Rounded corners with images&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;div class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"roundcont"&lt;/span&gt;&gt;&lt;br /&gt;&lt;div class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"roundtop"&lt;/span&gt;&gt;&lt;br /&gt;&lt;img src="&lt;span" style="color: rgb(255, 0, 0);" /&gt;"tl.gif"&lt;/span&gt; alt=&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"15"&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"15"&lt;/span&gt; class=&lt;span style="color: rgb(255, 0, 0);"&gt;"corner"&lt;/span&gt;&lt;br /&gt;style=&lt;span style="color: rgb(255, 0, 0);"&gt;"display: none"&lt;/span&gt; /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;CONTENT&lt;br /&gt;&lt;div class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"roundbottom"&lt;/span&gt;&gt;&lt;br /&gt;&lt;img src="&lt;span" style="color: rgb(255, 0, 0);" /&gt;"bl.gif"&lt;/span&gt; alt=&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"15"&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;=&lt;span style="color: rgb(255, 0, 0);"&gt;"15"&lt;/span&gt; class=&lt;span style="color: rgb(255, 0, 0);"&gt;"corner"&lt;/span&gt;&lt;br /&gt;style=&lt;span style="color: rgb(255, 0, 0);"&gt;"display: none"&lt;/span&gt; /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.roundcont&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;250px&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background-color&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#f90&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;color&lt;/span&gt;: &lt;span style="color: rgb(204, 0, 204);"&gt;#fff&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.roundcont&lt;/span&gt; p &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;margin&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;10px&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.roundtop&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;tr&lt;span style="color: rgb(102, 102, 255);"&gt;.gif&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;no-repeat&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;top&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;right&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.roundbottom&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;br&lt;span style="color: rgb(102, 102, 255);"&gt;.gif&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;no-repeat&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;top&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;right&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;img&lt;span style="color: rgb(102, 102, 255);"&gt;.corner&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;15px&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;15px&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;border&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;none&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;block&lt;/span&gt; !important;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Rounded corners with images" src="http://stylizedweb.com/examples/rounded2.gif" /&gt;&lt;/p&gt; &lt;h5&gt;8. Multiple class name&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;img src="&lt;span" style="color: rgb(255, 0, 0);" /&gt;"image.gif"&lt;/span&gt; class=&lt;span style="color: rgb(255, 0, 0);"&gt;"class1 class2"&lt;/span&gt; alt=&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt; /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.class1&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt; border&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;2px&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;solid&lt;/span&gt; &lt;span style="color: rgb(204, 0, 204);"&gt;#&lt;span style="color: rgb(153, 51, 51);"&gt;666&lt;/span&gt;&lt;/span&gt;; &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.class2&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;padding&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;2px&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt;:&lt;span style="color: rgb(204, 0, 204);"&gt;#ff0&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;9. Center horizontally&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;div id="&lt;span" style="color: rgb(255, 0, 0);"&gt;"container"&lt;/span&gt;&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 204);"&gt;#container&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;margin&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0px&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;auto&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="Center horizontally" src="http://stylizedweb.com/examples/horisontal.gif" /&gt;&lt;/p&gt; &lt;h5&gt;10. CSS Drop Caps&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;p class="&lt;span" style="color: rgb(255, 0, 0);"&gt;"introduction"&lt;/span&gt;&gt; This paragraph has the class&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"introduction"&lt;/span&gt;.&lt;br /&gt; If your browser supports the pseudo-class&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;"first-letter"&lt;/span&gt;, the first letter will be a drop-cap.&lt;br /&gt;&lt;br /&gt;p&lt;span style="color: rgb(102, 102, 255);"&gt;.introduction&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;:first-letter&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font-size&lt;/span&gt; : &lt;span style="color: rgb(153, 51, 51);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;300&lt;/span&gt;%&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font-weight&lt;/span&gt; : &lt;span style="color: rgb(153, 51, 51);"&gt;bold&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;float&lt;/span&gt; : &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;left&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;width&lt;/span&gt; : &lt;span style="color: rgb(153, 51, 51);"&gt;1em&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;p&gt;&lt;img class="mainslika" alt="CSS Drop Caps" src="http://stylizedweb.com/examples/drop.gif" /&gt;&lt;/p&gt; &lt;h5&gt;11. Prevent line breaks in links, oversized content to brake&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;a&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;white-space&lt;span style="color: rgb(51, 51, 255);"&gt;:nowrap&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 204);"&gt;#main&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;overflow&lt;span style="color: rgb(51, 51, 255);"&gt;:hidden&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;12. Show firefox scrollbar, remove textarea scrollbar in IE&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;html&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;overflow&lt;span style="color: rgb(51, 51, 255);"&gt;:-moz-scrollbars-vertical&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;textarea&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;overflow&lt;span style="color: rgb(51, 51, 255);"&gt;:auto&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-3919435903378258459?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3919435903378258459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3919435903378258459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3919435903378258459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3919435903378258459'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/most-used-css-tricks.html' title='Most used CSS Tricks'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2489539643154343097</id><published>2008-06-27T11:47:00.000-07:00</published><updated>2008-06-27T11:49:00.405-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS HACKS</title><content type='html'>&lt;p&gt;If you are front end coder you must know how important is to make cross  browses, valid CSS and xHTML code. And also you must know how much time we are  spending in all those hacks and fixes for various browsers. I've written about  some of them earlier on &lt;a title="PNG transparency issues" href="http://stylizedweb.com/2007/12/30/png-transparency-issues/"&gt;PNG  transparency issues&lt;/a&gt;, &lt;a title="Yellow fields in web form" href="http://stylizedweb.com/2008/01/02/yellow-fields-in-your-web-form/"&gt;Yellow  fields in web form&lt;/a&gt;, &lt;a title="Vertical align div" href="http://stylizedweb.com/2008/02/01/vertical-align-div/"&gt;Vertical align  div&lt;/a&gt; etc..&lt;/p&gt; &lt;p&gt;Here is the list of 10 hand picked CSS hacks and tricks which can help you in  your CSS code and also save some time.&lt;/p&gt; &lt;h5&gt;1. Vertical align div&lt;/h5&gt; &lt;p&gt;&lt;a href="http://stylizedweb.com/2008/02/01/vertical-align-div/"&gt;http://stylizedweb.com/2008/02/01/vertical-align-div/&lt;/a&gt;&lt;/p&gt; &lt;h5&gt;2. Min-Height&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;selector &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;min-height&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;500px&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;height&lt;span style="color: rgb(51, 51, 255);"&gt;:auto&lt;/span&gt;; !important&lt;br /&gt;height&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;500px&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;3. PNG transparency&lt;/h5&gt; &lt;p&gt;&lt;a href="http://stylizedweb.com/2007/12/30/png-transparency-issues/"&gt;http://stylizedweb.com/2007/12/30/png-transparency-issues/&lt;/a&gt;&lt;/p&gt; &lt;h5&gt;4. Autoclear&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.container&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;:after&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;content&lt;/span&gt;: &lt;span style="color: rgb(255, 0, 0);"&gt;"."&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;block&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;0&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;clear&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;both&lt;/span&gt;;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;visibility&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;hidden&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.container&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;inline-table&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* Hides from IE-mac \*/&lt;/span&gt;&lt;br /&gt;* html &lt;span style="color: rgb(102, 102, 255);"&gt;.container&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;height&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;1&lt;/span&gt;%&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 255);"&gt;.container&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;display&lt;/span&gt;: &lt;span style="color: rgb(153, 51, 51);"&gt;block&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* End hide from IE-mac */&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;5. Reset CSS&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;html, body, div, span,&lt;br /&gt; applet, object, iframe,&lt;br /&gt; h1, h2, h3, h4, h5, h6, p,&lt;br /&gt; blockquote, pre, a, abbr, acronym,&lt;br /&gt;address, big, cite, code, del, dfn, em,&lt;br /&gt; &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;font&lt;/span&gt;, img, ins, kbd, q, s, samp, small,&lt;br /&gt; strike, strong, sub, sup, tt, var, dl, dt,&lt;br /&gt; dd, ol, ul, li, fieldset, form, label, legend,&lt;br /&gt; table, caption, tbody, tfoot, thead, tr, th,&lt;br /&gt; td &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;border&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;none&lt;/span&gt;;&lt;br /&gt;font-family&lt;span style="color: rgb(51, 51, 255);"&gt;:inherit&lt;/span&gt;;&lt;br /&gt;font-size&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;100&lt;/span&gt;&lt;/span&gt;%;&lt;br /&gt;font-style&lt;span style="color: rgb(51, 51, 255);"&gt;:inherit&lt;/span&gt;;&lt;br /&gt;font-weight&lt;span style="color: rgb(51, 51, 255);"&gt;:inherit&lt;/span&gt;;&lt;br /&gt;margin&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;outline-color&lt;span style="color: rgb(51, 51, 255);"&gt;:invert&lt;/span&gt;;&lt;br /&gt;outline-style&lt;span style="color: rgb(51, 51, 255);"&gt;:none&lt;/span&gt;;&lt;br /&gt;outline-width&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;padding&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;vertical-align&lt;span style="color: rgb(51, 51, 255);"&gt;:baseline&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;table &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;border-collapse&lt;span style="color: rgb(51, 51, 255);"&gt;:separate&lt;/span&gt;;&lt;br /&gt;border-spacing&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;caption, th, td &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;font-weight&lt;span style="color: rgb(51, 51, 255);"&gt;:normal&lt;/span&gt;;&lt;br /&gt;text-align&lt;span style="color: rgb(51, 51, 255);"&gt;:left&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;blockquote&lt;span style="color: rgb(51, 51, 255);"&gt;:before&lt;/span&gt;, blockquote&lt;span style="color: rgb(51, 51, 255);"&gt;:after&lt;/span&gt;, q&lt;span style="color: rgb(51, 51, 255);"&gt;:before&lt;/span&gt;, q&lt;span style="color: rgb(51, 51, 255);"&gt;:after&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;content&lt;/span&gt;:&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;blockquote, q &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;quotes&lt;/span&gt;:&lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt; &lt;span style="color: rgb(255, 0, 0);"&gt;""&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;strong &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;font-weight&lt;span style="color: rgb(51, 51, 255);"&gt;:bold&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;em &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;font-style&lt;span style="color: rgb(51, 51, 255);"&gt;:italic&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;* &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;margin&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;padding&lt;span style="color: rgb(51, 51, 255);"&gt;:&lt;span style="color: rgb(153, 51, 51);"&gt;0pt&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;6. Scrolling Render IE&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;html &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;background&lt;/span&gt; : &lt;span style="color: rgb(153, 51, 51);"&gt;url&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(153, 51, 51);"&gt;null&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;fixed&lt;/span&gt; &lt;span style="color: rgb(153, 51, 51);"&gt;no-repeat&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;7. Opacity&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 204);"&gt;#transdiv&lt;/span&gt; &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;filter&lt;span style="color: rgb(51, 51, 255);"&gt;:alpha&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;(&lt;/span&gt;opacity=&lt;span style="color: rgb(153, 51, 51);"&gt;75&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;)&lt;/span&gt;;&lt;br /&gt;-moz-opacity:&lt;span style="color: rgb(102, 102, 255);"&gt;.&lt;span style="color: rgb(153, 51, 51);"&gt;75&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;opacity:&lt;span style="color: rgb(102, 102, 255);"&gt;.&lt;span style="color: rgb(153, 51, 51);"&gt;75&lt;/span&gt;&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;8. PRE Tag&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;pre &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;white-space&lt;/span&gt;: pre-wrap; &lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* css-3 */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;white-space&lt;/span&gt;: -moz-pre-wrap !important; &lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* Mozilla, since 1999 */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;white-space&lt;/span&gt;: -pre-wrap; &lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* Opera 4-6 */&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;white-space&lt;/span&gt;: -o-pre-wrap; &lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* Opera 7 */&lt;/span&gt;&lt;br /&gt;word-wrap: break-word; &lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* Internet Explorer 5.5+ */&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;9. Li Background Repeat IE&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;!--&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;if lt IE &lt;span style="color: rgb(153, 51, 51);"&gt;7&lt;/span&gt;&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;&gt;&lt;br /&gt;&lt;style&gt;&lt;br /&gt;&lt;span style="color: rgb(204, 0, 204);"&gt;#leftnav&lt;/span&gt; li &lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt; zoom: &lt;span style="color: rgb(153, 51, 51);"&gt;1&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* haslayout=true */&lt;/span&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;!&lt;span style="color: rgb(102, 204, 102);"&gt;[&lt;/span&gt;endif&lt;span style="color: rgb(102, 204, 102);"&gt;]&lt;/span&gt;--&gt;&lt;br /&gt; &lt;/pre&gt; &lt;h5&gt;10. Good to know&lt;/h5&gt;&lt;pre class="css"&gt;&lt;br /&gt;&lt;span style="color: rgb(161, 161, 0);"&gt;@charset "UTF-8";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* ----------------------------------------------------------------------&lt;br /&gt; WinIE7&lt;br /&gt;---------------------------------------------------------------------- */&lt;/span&gt;&lt;br /&gt;*&lt;span style="color: rgb(51, 51, 255);"&gt;:first-child&lt;/span&gt;+html selector&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;property&lt;span style="color: rgb(51, 51, 255);"&gt;:value&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* ----------------------------------------------------------------------&lt;br /&gt; WinIE6 &amp;amp; Mac IE&lt;br /&gt;---------------------------------------------------------------------- */&lt;/span&gt;&lt;br /&gt;* html selector&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;property&lt;span style="color: rgb(51, 51, 255);"&gt;:value&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* ----------------------------------------------------------------------&lt;br /&gt; WinIE6&lt;br /&gt;---------------------------------------------------------------------- */&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/*\*/&lt;/span&gt;&lt;br /&gt;* html selector&lt;span style="color: rgb(102, 204, 102);"&gt;{&lt;/span&gt;property&lt;span style="color: rgb(51, 51, 255);"&gt;:value&lt;/span&gt;;&lt;span style="color: rgb(102, 204, 102);"&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/**/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/* ----------------------------------------------------------------------&lt;br /&gt; MacIE&lt;br /&gt;---------------------------------------------------------------------- */&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/*\*/&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128); font-style: italic;"&gt;/*/&lt;br /&gt;selector{property:value;}&lt;br /&gt;/**/&lt;/span&gt;&lt;br /&gt; &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2489539643154343097?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2489539643154343097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2489539643154343097' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2489539643154343097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2489539643154343097'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/css-hacks.html' title='CSS HACKS'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2781342986327800145</id><published>2008-06-27T11:44:00.000-07:00</published><updated>2008-06-27T11:46:56.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS and Round Corners: Build Boxes with Curves</title><content type='html'>&lt;p&gt;&lt;strong&gt;One of the main reasons why designers use images on a Web page is to  create curves and round corners. It's currently impossible to create any kind of  curved shapes using pure &lt;a class="glossary" title="HTML stands for HyperText Markup Language." href="/glossary.php?q=H#term_75"&gt;HTML&lt;/a&gt;, so images need to be  applied.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The problem? Putting these images into an HTML document with a table layout  can create a large amount of superfluous code. In this tutorial, we'll use &lt;a class="glossary" title="CSS, or Cascading Style Sheets, comprise styling and formatting rules that are applied to Web documents." href="/glossary.php?q=C#term_8"&gt;CSS&lt;/a&gt; to create &lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners8.htm"&gt;this box  with round corners&lt;/a&gt;, without an &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/img"&gt;&lt;img&gt;&lt;/a&gt;&lt;/code&gt; tag in  sight!&lt;/p&gt; &lt;h5&gt;How it Works&lt;/h5&gt; &lt;p&gt;The above is basically a normal box that has an orange background colour,  over which four corner images are superimposed. All these images have been  called up through CSS commands.&lt;/p&gt; &lt;p&gt;So, we start off with the following snippet:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div class="bl"&gt;Lorem ipsum dolor sit amet consectetur  adipisicing elit&lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;We've used &lt;code&gt;class="bl"&lt;/code&gt; as we're going to assign our bottom right  corner to this &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt; through a  CSS command. As a rule, you can only assign one background image to an HTML tag  using CSS, so this is the only image we'll assign to this &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/1bl.gif"&gt;&lt;em&gt;1465_1bl (click to view  image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/1bl.gif" height="10" width="10" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;We'll use the above image, called bl.gif, which we'll place in the  bottom-left corner with the following CSS command:&lt;/p&gt; &lt;p&gt;&lt;code&gt;.bl {background: url(bl.gif) 0 100% no-repeat; width: 20em}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;The CSS background command is broken into three sections: the image URL, its  position, and a repeat command. We also inserted a width CSS command so that the  box doesn't cover the whole of the screen. Let's examine the three background  commands in turn:&lt;/p&gt; &lt;p&gt; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Image URL&lt;/strong&gt; - Remember, the image is being called through the  CSS, so the path to the image must be the path from the CSS document, not the  HTML document.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Image Position&lt;/strong&gt; - In this example, we've used the command  &lt;code&gt;0 100%&lt;/code&gt; in our CSS rule. The first number represents the distance  from the left edge of the &lt;code&gt;&lt;div&gt; ;&lt;/code&gt; the second number  identifies the distance from the top edge. In this instance &lt;code&gt;%&lt;/code&gt; was  used, but a different distance value, such as em or px, could just as easily  have been used instead. If this command was left out, the default value, &lt;code&gt;0  0&lt;/code&gt;, would be used, and the image would be placed in the top-left  corner.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Repeat Command&lt;/strong&gt; – Obviously, we don't want this image to  repeat, so we insert the &lt;code&gt;no-repeat&lt;/code&gt; CSS command. If we wanted to, we  could have used &lt;code&gt;repeat-x&lt;/code&gt;, to repeat the image horizontally,  &lt;code&gt;repeat-y&lt;/code&gt;, to repeat it vertically, and &lt;code&gt;repeat&lt;/code&gt; to  repeat it both horizontally and vertically. If this command was left out, the  default value, &lt;code&gt;repeat&lt;/code&gt;, would be used. &lt;/li&gt;&lt;/ol&gt;  &lt;p&gt;It doesn't matter in which order these three CSS background commands are  placed. &lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners3.htm"&gt;Our box  with curves now looks like this&lt;/a&gt;.&lt;/p&gt; &lt;h5&gt;Bottom-Right Curve&lt;/h5&gt; &lt;p&gt;Next, we'll stick in that bottom-right curve. As previously mentioned, we can  only assign one background image to each &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt; in the  CSS, so we'll need to insert a new &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt;:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div class="bl"&gt;&lt;div class="br"&gt;&lt;br /&gt;Lorem ipsum dolor sit  amet consectetur adipisicing elit&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Here's the image we'll use:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/1br.gif"&gt;&lt;em&gt;1465_1br (click to view  image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/1br.gif" height="10" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Naming this bottom-right image br.gif, we'll insert a new CSS rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;.br {background: url(br.gif) 100% 100% no-repeat}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This CSS rule is essentially the same as the last one, although now we've  changed the position from the left to 100%, where previously it was 0%. &lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners4.htm"&gt;The box  now looks like this&lt;/a&gt;.&lt;/p&gt; &lt;h5&gt;Top Curves&lt;/h5&gt; &lt;p&gt;To make our top curves, we'll need two new images:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/1tl.gif"&gt;&lt;em&gt;1465_1tl (click to view  image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/1tl.gif" height="10" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/1tr.gif"&gt;&lt;em&gt;1465_1tr (click to view  image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/1tr.gif" height="10" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We'll call these tl.gif and tr.gif. We'll need to create two new &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt;s for  them:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div class="bl"&gt;&lt;div class="br"&gt;&lt;div class="tl"&gt;&lt;div class="tr"&gt;&lt;br /&gt;Lorem ipsum dolor sit amet consectetur  adipisicing elit&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;The new CSS rules are as follows:&lt;/p&gt; &lt;p&gt;&lt;code&gt;.tl {background: url(tl.gif) 0 0 no-repeat}&lt;br /&gt;.tr {background:  url(tr.gif) 100% 0 no-repeat}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;These give us &lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners5.htm"&gt;this  display&lt;/a&gt;.&lt;/p&gt; &lt;h5&gt;Background Colour&lt;/h5&gt; &lt;p&gt;We'll now insert our orange background colour into the box, in order to  achieve the whole round corners effects.&lt;br /&gt;&lt;br /&gt;The background colour must  always be assigned to the very first CSS rule. This is because each CSS  background rule is essentially a layer on top of the previous one. So, in this  example, we have a layering order of br.gif, bl.gif, tl.gif and then tr.gif.  But, in this example, the images don't overlap, so we don't really notice this  layering effect.&lt;/p&gt; &lt;p&gt;By default, a background colour covers the entire &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt; and will  layer on top of any other previously assigned background images and/or colours.  Therefore, if we place the orange colour in any &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt; other than  the first, it will be placed on top of the preceding images and will essentially  cause them to disappear. Therefore, we must place our orange background colour  (#e68200) in the very first CSS rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;.bl {background: url(bl.gif) 0 100% no-repeat #e68200; width:  20em}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;As before, it doesn't matter where we place this colour command within the  CSS background rule. &lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners6.htm"&gt;Our box  now looks like this&lt;/a&gt;.&lt;/p&gt; &lt;h5&gt;Padding&lt;/h5&gt; &lt;p&gt;Padding is needed to prevent the text from overlapping on to the images,  which are 10px x 10px in size. Therefore, we need 10px-worth of padding on the  text. But to which &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt; should we  assign the padding CSS rule? Does it matter? Well, yes it does.&lt;/p&gt; &lt;p&gt;Whichever element we assign padding to, each of the elements inside it will  inherit that padding. If we were to assign padding to the very first &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt;,  &lt;code&gt;&lt;div class=""&gt;&lt;/code&gt;, &lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners7.htm"&gt;we'd get  this effect&lt;/a&gt;.&lt;/p&gt; &lt;p&gt;To get this padding to work properly, we need to assign it to the very last  &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt;,  &lt;code&gt;&lt;div class="bl"&gt;&lt;/code&gt;:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;.tr {background: url(tr.gif)  100% 0 no-repeat; padding:10px}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;a class="sublink" href="http://www.sitepoint.com/examples/roundcorners/box-corners8.htm"&gt;Here's  how it looks now&lt;/a&gt;.&lt;/p&gt; &lt;h5&gt;Internet Explorer Issues&lt;/h5&gt; &lt;p&gt;You may have noticed the bottom corners were called up before the top  corners. If we were to do things the other way round, that is, call the top  corners first, some parts of the orange background colour would sneak out under  the bottom curves, causing a rather unsightly effect. Switch the order of the  &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/div"&gt;&lt;div&gt;&lt;/a&gt;&lt;/code&gt;s around  and see for yourself.&lt;/p&gt; &lt;p&gt;Another issue in Internet Explorer is that the background colour of the box  sometimes overlaps on to the element below, again causing an unattractive  effect. This can be solved simply by placing a tiny placeholder beneath the box  with round corners. Immediately after the fourth closing  &lt;code&gt;&lt;/div&gt;&lt;/code&gt;, insert the following HTML:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div class="clear"&gt; &lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Now, assign it this CSS rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;.clear {font-size: 1px; height: 1px}&lt;/code&gt;&lt;/p&gt; &lt;h5&gt;The Final Code&lt;/h5&gt; &lt;p&gt;Our finished HTML now looks like this:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div class="bl"&gt;&lt;div class="br"&gt;&lt;div class="tl"&gt;&lt;div class="tr"&gt;&lt;br /&gt;Lorem ipsum dolor sit amet consectetur  adipisicing elit&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt; &lt;br /&gt;&lt;div class="clear"&gt; &lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Here's the CSS that makes it all happen:&lt;/p&gt; &lt;p&gt;&lt;code&gt;.bl {background: url(bl.gif) 0 100% no-repeat #e68200; width: 20em} &lt;br /&gt;.br {background: url(br.gif) 100% 100% no-repeat}&lt;br /&gt;.tl {background:  url(tl.gif) 0 0 no-repeat}&lt;br /&gt;.tr {background: url(tr.gif) 100% 0 no-repeat;  padding:10px}&lt;br /&gt;.clear {font-size: 1px; height: 1px}&lt;/code&gt;&lt;/p&gt; &lt;script src="http://ads.aws.sitepoint.com/adjs.php?region=79&amp;amp;did=adz&amp;amp;adtype=vertical" type="text/javascript"&gt;&lt;/script&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2781342986327800145?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2781342986327800145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2781342986327800145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2781342986327800145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2781342986327800145'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/css-and-round-corners-build-boxes-with.html' title='CSS and Round Corners: Build Boxes with Curves'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-9076191435287819776</id><published>2008-06-27T11:42:00.000-07:00</published><updated>2008-06-27T11:44:51.032-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS and Round Corners: Build Accessible Menu Tabs</title><content type='html'>&lt;p&gt;&lt;strong&gt;One of the best Websites out there, in terms of functionality, is &lt;a class="sublink" href="http://www.amazon.com/" rel="external"&gt;Amazon&lt;/a&gt;.  &lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In terms of &lt;a class="glossary" title="Accessibility deals with the issues of making online content available for experience, enjoyment, and use by all visitors, including those who do not fit the standard &amp;quot;Web user&amp;quot; mould." href="/glossary.php?q=A#term_61"&gt;accessibility&lt;/a&gt;, though, it's not great.&lt;/p&gt; &lt;h5&gt;The Problem&lt;/h5&gt; &lt;p&gt;Amazon's menu tabs, with their nice round corners, look good -- but they're  totally inaccessible. First of all, they're missing ALT tags. Additionally, the  &lt;a class="glossary" title="The World Wide Web Consortium (W3C) - A consortium of industry leaders for drafting Web standards." href="/glossary.php?q=W#term_49"&gt;W3C&lt;/a&gt; accessibility guideline 3.1 (priority  2) clearly states:&lt;/p&gt;&lt;q&gt;When an appropriate markup language exists, use markup  rather than images to convey information.&lt;/q&gt;  &lt;p&gt;This basically means that we shouldn't use images to display text. Users with  poor vision are unable to &lt;a class="sublink" href="http://www2.tec.govt.nz/home/accessibility.htm#text" rel="external"&gt;resize  text&lt;/a&gt; that's displayed through images. Similarly, users of &lt;a class="sublink" href="http://www.magnifiers.org/links/Download_Software/Screen_Magnifiers/" rel="external"&gt;screen magnifiers&lt;/a&gt; may be unable to read text embedded in  images, as it can appear blurry and pixelated to them.&lt;/p&gt; &lt;h5&gt;The Solution: &lt;a class="glossary" title="CSS, or Cascading Style Sheets, comprise styling and formatting rules that are applied to Web documents." href="/glossary.php?q=C#term_8"&gt;CSS&lt;/a&gt; Menu Tabs&lt;/h5&gt; &lt;p&gt;CSS, as usual, comes to our rescue. Look at this menu tab, created through &lt;a class="glossary" title="HTML stands for HyperText Markup Language." href="/glossary.php?q=H#term_75"&gt;HTML&lt;/a&gt; and CSS -- not an &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/img"&gt;&lt;img&gt;&lt;/a&gt;&lt;/code&gt; tag in  sight! &lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/home1.gif"&gt;&lt;em&gt;1388_home1 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/home1.gif" height="37" width="90" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Have a &lt;a class="sublink" href="http://www.sitepoint.com/examples/cssaccessiblenav/css-1.htm" rel="external"&gt;look at it in action&lt;/a&gt; -- when you do, adjust the text size in  your browser. Notice that the menu tab increased in size with the text: it all  fits perfectly. &lt;/p&gt; &lt;p&gt;Today, you're going to learn how to do this.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;How It's Done&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We start with a simple link:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div id="navigation"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;We'll assign it this CSS code:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a&lt;br /&gt;{&lt;br /&gt;color: #000;&lt;br /&gt;background: #fb0; &lt;br /&gt;text-decoration: none&lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This gives us the following  result:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/home2.gif"&gt;&lt;em&gt;1388_home2 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/home2.gif" height="43" width="77" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;It needs a bit of work, right? Let's do it.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;Add the Left Menu Tab Corner&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We need to make a small image with the same colour for the rounded left-hand  corner. Here's one I made earlier.&lt;br /&gt;&lt;br /&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/tab-orange-left2.gif"&gt;&lt;em&gt;1388_taborangeleft  (click to view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/tab-orange-left2.gif" height="16" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Let's call this image left-tab.gif and place it into the background of the  link using this CSS rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a&lt;br /&gt;{&lt;br /&gt;color: #000;&lt;br /&gt;background: #fb0  url("left-tab.gif") left top no-repeat;&lt;br /&gt;text-decoration: none &lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This new CSS rule says that the background image should be left-menu-tab.gif,  the image should be on the left at the top, and it shouldn't be repeated. The  result?&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/home3.gif"&gt;&lt;em&gt;1388_home3 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/home3.gif" height="38" width="73" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We're getting there, but we need to move the text over slightly as it's  overlapping the left rounded corner. It's pretty simple to reposition the text  with the addition of padding to our CSS rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a&lt;br /&gt;{&lt;br /&gt;color: #000;&lt;br /&gt;background: #fb0  url("left-tab.gif") left top no-repeat;&lt;br /&gt;text-decoration: none; &lt;br /&gt;&lt;strong&gt;padding-left: 10px&lt;/strong&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/home4.gif"&gt;&lt;em&gt;1388_home4 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/home4.gif" height="39" width="83" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;The Right Corner&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;We can only assign one background image to a CSS rule, so we need to make a  new CSS rule and assign the right corner image to that. We'll start by inserting  a &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/span"&gt;&lt;span&gt;&lt;/a&gt;&lt;/code&gt; tag into  the HTML code:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;div id="navigation"&gt;&lt;a href="/"&gt;&lt;strong&gt;&lt;span&gt;&lt;/strong&gt;Home&lt;strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/div&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Now we'll create a new CSS rule in which we'll assign the right menu tab  shown below (another one I made earlier) to the &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/span"&gt;&lt;span&gt;&lt;/a&gt;&lt;/code&gt;, and  we're ready to go! &lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/tab-orange-right2.gif"&gt;&lt;em&gt;1388_taborangeright  (click to view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/tab-orange-right2.gif" height="16" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We'll name this image right-tab.gif.&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a span&lt;br /&gt;{&lt;br /&gt;background: url("right-tab.gif") right top  no-repeat;&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This CSS rule means that every &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/span"&gt;&lt;span&gt;&lt;/a&gt;&lt;/code&gt; tag  within an &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/a"&gt;&lt;a&gt;&lt;/a&gt;&lt;/code&gt; tag will have  this image as its background. The final result looks like this:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/home5.gif"&gt;&lt;em&gt;1388_home5 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/home5.gif" height="39" width="81" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Perfect... No, wait a minute! Can you spot why it's not so perfect? We forgot  to assign some padding to that &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/span"&gt;&lt;span&gt;&lt;/a&gt;&lt;/code&gt; tag in  the CSS rule:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a span&lt;br /&gt;{&lt;br /&gt;background: url("right-tab.gif") right top  no-repeat;&lt;br /&gt;&lt;strong&gt;padding-right: 10px&lt;/strong&gt;&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This code gives us:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/home1.gif"&gt;&lt;em&gt;1388_home1 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/home1.gif" height="37" width="90" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now, that really is perfect! Have a &lt;a class="sublink" href="http://www.sitepoint.com/examples/cssaccessiblenav/css-1.htm" rel="external"&gt;look at the results here&lt;/a&gt; and resize the text to see how it  looks.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;The Final CSS Touches&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Let's assign this link a nice hover effect using a few final CSS rules. We'll  need a couple more background images:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/tab-blue-left2.gif"&gt;&lt;em&gt;1388_tabblueleft  (click to view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/tab-blue-left2.gif" height="16" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;We'll call this left-tab-hover.gif.&lt;br /&gt;&lt;br /&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/tab-blue-right2.gif"&gt;&lt;em&gt;1388_tabblueright  (click to view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/tab-blue-right2.gif" height="16" width="10" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;This one's named right-tab-hover.gif.&lt;/p&gt; &lt;p&gt;Now, we just insert the following CSS rules, and away we go!&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation &lt;strong&gt;a:hover&lt;/strong&gt; {&lt;br /&gt;color: #fff;&lt;br /&gt;background:  #fb0 url(&lt;strong&gt;"left-tab-hover.gif"&lt;/strong&gt;) left top no-repeat; &lt;br /&gt;text-decoration: none;&lt;br /&gt;padding-left: 10px&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;#navigation  &lt;strong&gt;a:hover&lt;/strong&gt; span&lt;br /&gt;{&lt;br /&gt;background:  url(&lt;strong&gt;"right-tab-hover.gif"&lt;/strong&gt;) right top no-repeat; &lt;br /&gt;padding-right: 10px&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;Have a &lt;a class="sublink" href="http://www.sitepoint.com/examples/cssaccessiblenav/css-2.htm" rel="external"&gt;look at this code in action&lt;/a&gt; -- be sure to mouse over it! &lt;/p&gt; &lt;h5&gt;Make a Tab Menu&lt;/h5&gt; &lt;p&gt;Now we've done all the hard work, we can make as many of these menu tabs as  we want:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/nav.gif"&gt;&lt;em&gt;1388_nav (click to view  image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/nav.gif" height="70" width="504" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;a class="sublink" href="http://www.sitepoint.com/examples/cssaccessiblenav/css-3.htm" rel="external"&gt;See the nav in action&lt;/a&gt; -- be sure to mouse over the nav items!  &lt;/p&gt; &lt;p&gt;Looks great, doesn't it? Note, though, that building your menu this way does  bring up a new accessibility problem: this navigation won't make sense to anyone  who has disabled CSS. Without CSS, the navigation looks like this:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/nocssnav.png"&gt;&lt;em&gt;1388_nocssnav (click  to view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/nocssnav.png" height="33" width="314" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;That's quite a problem. The solution? Let's put the tabs into a list! The  HTML will look like this:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;&lt;strong&gt;ul id="navigation"&lt;/strong&gt;&gt; &lt;br /&gt;&lt;&lt;strong&gt;li&lt;/strong&gt;&gt;&lt;a href="/"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;&lt;&lt;strong&gt;/li&lt;/strong&gt;&gt; &lt;br /&gt;&lt;&lt;strong&gt;li&lt;/strong&gt;&gt;&lt;a href="/"&gt;&lt;span&gt;Services&lt;/span&gt;&lt;/a&gt;&lt;&lt;strong&gt;/li&lt;/strong&gt;&gt; &lt;br /&gt;&lt;&lt;strong&gt;li&lt;/strong&gt;&gt;&lt;a href="/"&gt;&lt;span&gt;Take a  tour&lt;/span&gt;&lt;/a&gt;&lt;&lt;strong&gt;/li&lt;/strong&gt;&gt; &lt;br /&gt;&lt;&lt;strong&gt;li&lt;/strong&gt;&gt;&lt;a href="/"&gt;&lt;span&gt;About  us&lt;/span&gt;&lt;/a&gt;&lt;&lt;strong&gt;/li&lt;/strong&gt;&gt; &lt;br /&gt;&lt;&lt;strong&gt;li&lt;/strong&gt;&gt;&lt;a href="/"&gt;&lt;span&gt;Contact  us&lt;/span&gt;&lt;/a&gt;&lt;&lt;strong&gt;/li&lt;/strong&gt;&gt; &lt;br /&gt;&lt;&lt;strong&gt;/ul&lt;/strong&gt;&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now, let's create some CSS rules  for our list items, so that all the menu tabs display next to one other on the  same line:&lt;/p&gt;&lt;p&gt;&lt;code&gt;#navigation&lt;br /&gt;{&lt;br /&gt;list-style: none;&lt;br /&gt;padding: 0;&lt;br /&gt;margin: 0; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#navigation li&lt;br /&gt;{&lt;br /&gt;float: left;&lt;br /&gt;display: block; &lt;br /&gt;margin: 0;&lt;br /&gt;padding: 0;&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;To get rid of the bullets, we used the CSS command, &lt;code&gt;list-style:  none&lt;/code&gt;. To display our menu tabs inline, stacked next to each other, we  used &lt;code&gt;float: left&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;At this point, some of the more expert CSS coders may question the point of  keeping the &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/span"&gt;&lt;span&gt;&lt;/a&gt;&lt;/code&gt; tag,  especially those who've read &lt;a class="sublink" href="http://www.alistapart.com/articles/slidingdoors/" rel="external"&gt;Doug  Bowman's Sliding Doors article&lt;/a&gt;. The reason we leave in the &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/span"&gt;&lt;span&gt;&lt;/a&gt;&lt;/code&gt; tag is  to make the entire menu tab clickable. If we were to assign one of the corners  to &lt;code class="ref-term"&gt;&lt;a title=""&gt; tag in the SitePoint HTML Reference." href="http://reference.sitepoint.com/html/li"&gt;&lt;li&gt;&lt;/a&gt;&lt;/code&gt; as a  background image, that corner wouldn't be clickable.&lt;/p&gt; &lt;h5&gt;IE 5.x Problems&lt;/h5&gt; &lt;p&gt;Unfortunately, these tabs won't work on IE 5.0 on PC (and a couple of other  browsers), as the rounded edges of the tabs don't appear. As such, each menu tab  will be displayed as a rectangle, with sharp corners. There's an easy solution  to this, which is to insert &lt;code&gt;display: block&lt;/code&gt; into the  &lt;code&gt;#navigation a&lt;/code&gt; and &lt;code&gt;#navigation a span&lt;/code&gt; CSS commands.&lt;/p&gt; &lt;p&gt;Sounds easy, right? Unfortunately, it's not. By inserting these commands into  the CSS, IE 5 on Mac will stack the menu items on top of each other. To make  these display properly for IE 5 on Mac, we'll need to also insert the  &lt;code&gt;float:left&lt;/code&gt; command, but apply it only to this browser. But how do  we apply a CSS command to just one browser? Easy -- we use the commented  backslash hack:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a, #navigation a span&lt;br /&gt;{&lt;br /&gt;display: block; &lt;br /&gt;&lt;strong&gt;float: left&lt;/strong&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Commented backslash hack hides  rule from &lt;a class="glossary" title="Microsoft Internet Explorer is the leading Web browser on Microsoft Windows OS." href="/glossary.php?q=I#term_30"&gt;IE5&lt;/a&gt;-Mac \*/&lt;br /&gt;#navigation a, #navigation  a span&lt;br /&gt;{&lt;br /&gt;&lt;strong&gt;float: none&lt;/strong&gt;&lt;br /&gt;}&lt;br /&gt;/* End IE5-Mac hack */  &lt;/code&gt;&lt;/p&gt; &lt;p&gt;The first CSS command says to float the menu tab content to the left, and the  second CSS command cancels this out for every browser except IE 5 on Mac. When  two CSS commands are specified for the same selector, the second one always  takes precedence. However, IE 5 on Mac can't read the second command because of  the slashes and stars, so defaults to the first CSS command. (If you really want  to know how and why this works, read &lt;a class="sublink" href="http://www.sam-i-am.com/work/sandbox/css/mac_ie5_hack.html" rel="external"&gt;Commented Backslash MacIE5 CSS Hack by Sam Foster&lt;/a&gt;.)&lt;/p&gt; &lt;h5&gt;The Final Code&lt;/h5&gt; &lt;p&gt;The final HTML is:&lt;/p&gt; &lt;p&gt;&lt;code&gt;&lt;ul id="navigation"&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="/"&gt;&lt;span&gt;Home&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;br /&gt;&lt;li&gt;&lt;a href="/"&gt;&lt;span&gt;Services&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;br /&gt;&lt;li&gt;&lt;a href="/"&gt;&lt;span&gt;Take a  tour&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="/"&gt;&lt;span&gt;About us&lt;/span&gt;&lt;/a&gt;&lt;/li&gt; &lt;br /&gt;&lt;li&gt;&lt;a href="/"&gt;&lt;span&gt;Contact  us&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt; &lt;/code&gt;&lt;/p&gt; &lt;p&gt;And here's the entire CSS code:&lt;/p&gt; &lt;p&gt;&lt;code&gt;#navigation a&lt;br /&gt;{&lt;br /&gt;color: #000;&lt;br /&gt;background: #fb0  url("left-tab.gif") left top no-repeat;&lt;br /&gt;text-decoration: none; &lt;br /&gt;padding-left: 10px&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#navigation a span&lt;br /&gt;{&lt;br /&gt;background:  url("right-tab.gif") right top no-repeat;&lt;br /&gt;padding-right: 10px&lt;br /&gt;} &lt;br /&gt;&lt;br /&gt;#navigation a, #navigation a span&lt;br /&gt;{&lt;br /&gt;display: block;&lt;br /&gt;float:  left&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Commented backslash hack hides rule from IE5-Mac \*/ &lt;br /&gt;#navigation a, #navigation a span&lt;br /&gt;{&lt;br /&gt;float: none&lt;br /&gt;}&lt;br /&gt;/* End  IE5-Mac hack */&lt;br /&gt;&lt;br /&gt;#navigation a:hover&lt;br /&gt;{&lt;br /&gt;color: #fff; &lt;br /&gt;background: #26a url("left-tab-hover.gif") left top no-repeat; &lt;br /&gt;text-decoration: none;&lt;br /&gt;padding-left: 10px&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#navigation  a:hover span&lt;br /&gt;{&lt;br /&gt;background: url("right-tab-hover.gif") right top  no-repeat;&lt;br /&gt;padding-right: 10px&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#navigation&lt;br /&gt;{ &lt;br /&gt;list-style: none;&lt;br /&gt;padding: 0;&lt;br /&gt;margin: 0&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;#navigation li &lt;br /&gt;{&lt;br /&gt;float: left;&lt;br /&gt;display: block;&lt;br /&gt;margin: 0;&lt;br /&gt;padding: 0 &lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;h5&gt;The End Product... With and Without CSS&lt;/h5&gt; &lt;p&gt;Let's look at it one more time. First, the CSS version of the nav:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/nav.gif"&gt;&lt;em&gt;1388_nav (click to view  image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/nav.gif" height="70" width="504" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;When CSS is disabled, it looks like this:&lt;/p&gt; &lt;p&gt;&lt;a class="beatbox" href="http://sitepointstatic.com/graphics/navcssdisabled.png"&gt;&lt;em&gt;1388_navdisabled  (click to view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/navcssdisabled.png" height="108" width="125" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now, that really is &lt;a class="glossary" title="Accessibility deals with the issues of making online content available for experience, enjoyment, and use by all visitors, including those who do not fit the standard &amp;quot;Web user&amp;quot; mould." href="/glossary.php?q=A#term_61"&gt;accessible&lt;/a&gt;!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-9076191435287819776?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/9076191435287819776/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=9076191435287819776' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/9076191435287819776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/9076191435287819776'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/css-and-round-corners-build-accessible.html' title='CSS and Round Corners: Build Accessible Menu Tabs'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3996418950834008463</id><published>2008-06-27T11:40:00.000-07:00</published><updated>2008-06-27T11:42:14.884-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Style Web Forms Using CSS</title><content type='html'>&lt;p&gt;&lt;strong&gt;Whether your main business is Web design or backend development,  chances are you spend a fair amount of time creating forms for user input. So  you already know that the default appearance of forms isn't always appropriate  for the look and feel of your site.&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;In this article we'll look at how you can use &lt;span class="glossary"&gt;CSS&lt;/span&gt; to create attractive and usable  forms.&lt;/p&gt; &lt;h5&gt;Styling Form Elements&lt;/h5&gt; &lt;p&gt;It's possible to change the default look of form elements by styling their &lt;span class="glossary"&gt;html&lt;/span&gt; tags: &lt;code class="ref-term"&gt;input&lt;/code&gt;, &lt;code class="ref-term"&gt;select&lt;/code&gt; and &lt;code class="ref-term"&gt;textarea&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;The &lt;code class="ref-term"&gt;input&lt;/code&gt;  Tag&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Defining rules for the input tag will change any instance of that tag in your  document. For example, if I wish all elements to have a purple background, I  could define the following in my style sheet. &lt;/p&gt; &lt;p&gt;&lt;code&gt;input {&lt;br /&gt; background-color: #666699;&lt;br /&gt;}&lt;/code&gt;&lt;/p&gt; &lt;p&gt;This will add a purple background color to those elements that are marked up  using the input tag.&lt;br /&gt;&lt;br /&gt;&lt;span class="beatbox"&gt;&lt;em&gt;1166_image1 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/rimg1.jpg" height="202" width="185" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;The &lt;code class="ref-term"&gt;select&lt;/code&gt;  Tag&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The &lt;code class="ref-term"&gt;&lt;select&gt;&lt;/code&gt; tag  creates a list menu. You can create rules for select which will affect any list  menus in your document.&lt;/p&gt; &lt;p&gt;&lt;code&gt;select {&lt;br /&gt; background-color: #666699;&lt;br /&gt; color: #ffffff; &lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="beatbox"&gt;&lt;em&gt;1166_image2 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/rimg2.jpg" height="116" width="102" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;The &lt;code class="ref-term"&gt;textarea&lt;/code&gt;  Tag&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;The &lt;code class="ref-term"&gt;&lt;textarea&gt;&lt;/code&gt;  tag marks up multiple line text input fields. Once again, setting rules for  textarea will change the look of all of these elements in your document.&lt;/p&gt; &lt;p&gt;&lt;code&gt;textarea {&lt;br /&gt; background-color: #666699;&lt;br /&gt; color: #ffffff; &lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="beatbox"&gt;&lt;em&gt;1166_image3 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/rimg3.jpg" height="107" width="355" /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;em&gt;The &lt;code class="ref-term"&gt;form&lt;/code&gt;  Tag&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;You can also style the form tag itself, adding borders, background colors and  adjusting the margins and padding. Form is a block level element, so you can  change the way it displays in much the same way that you would style a  paragraph.&lt;/p&gt; &lt;p&gt;&lt;code&gt;form {&lt;br /&gt; border: 1px solid #666699;&lt;br /&gt; padding: 5px; &lt;br /&gt;}&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="beatbox"&gt;&lt;em&gt;1166_image4 (click to  view image)&lt;/em&gt;&lt;img alt="" src="http://sitepointstatic.com/graphics/rimg4.jpg" height="176" width="285" /&gt;&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/7681105400300687252-3996418950834008463?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3996418950834008463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3996418950834008463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3996418950834008463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3996418950834008463'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/style-web-forms-using-css_27.html' title='Style Web Forms Using CSS'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7137943330418896917</id><published>2008-06-27T11:36:00.000-07:00</published><updated>2008-06-27T11:38:24.388-07:00</updated><title type='text'>Style Web Forms Using CSS</title><content type='html'>We continue to review text and source editors for designers and web-developers. After a thorough consideration of WYSIWIG- and source code editors now it’s time to take a closer look at applications for advanced CSS-coding. Reason: while numerous HTML-editors offer more or less advanced CSS-support there are also allround-CSS-editors which offer a sophisticated integrated development environment for CSS-coding.&lt;br /&gt;&lt;br /&gt;Of course, real CSS ninjas accept nothing but a minimalistic Notepad or some sophisticated source code-editor. In fact, CSS-editors are often considered to be unnecessary and superflous — after all, you can do the same in your favourite text editor. And sometimes this is true — while there are some really bad HTML-editors there are also some even worse CSS-editors. Particularly code autocompletion tools are extremely good at bloating the code to extremes, making the resulting stylesheet unnecessary complex and hard to maintain. Why would someone purchase a CSS-editor to raise the maintenance costs afterwards?&lt;br /&gt;&lt;br /&gt;Yet CSS-editors can be helpful; furthermore, you can effectively use them in different settings by developers with different skills. Web professionals can use a CSS-editor to improve workflow and get all useful CSS-tools provided by one single application. Newbies can easier learn CSS by analzying stylesheets and using live-editing to understand how the design is built up and what is actually going on behind the scenes. In either case you should make sure you know what you are doing and not end up producing quick’n'dirty stylesheet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7137943330418896917?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7137943330418896917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7137943330418896917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7137943330418896917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7137943330418896917'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/style-web-forms-using-css.html' title='Style Web Forms Using CSS'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-28411657468806291</id><published>2008-06-27T11:33:00.000-07:00</published><updated>2008-06-27T11:36:08.947-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>70 Expert Ideas For Better CSS Coding</title><content type='html'>CSS isn’t always easy to deal with. Depending on your skills and your experience, CSS coding can sometimes become a nightmare, particularly if you aren’t sure which selectors are actually being applied to document elements. An easy way to minimize the complexity of the code is as useful as not-so-well-known CSS attributes and properties you can use to create a semantically correct markup.&lt;br /&gt;&lt;br /&gt;We’ve taken a close look at some of the most useful CSS tricks, tips, ideas, methods, techniques and coding solutions and listed them below. We also included some basic techniques you can probably use in every project you are developing, but which are hard to find once you need them.&lt;br /&gt;&lt;br /&gt;And what has come out of it is an overview of over 70 expert CSS ideas which can improve your efficiency of CSS coding. You might be willing to check out the list of references and related articles in the end of this post.&lt;br /&gt;&lt;br /&gt;We’d like to express sincere gratitude to all designers who shared their ideas, techniques, methods, knowledge and experience with their readers. Thank you, we, coders, designers, developers, information architects - you name it - really appreciate it.&lt;br /&gt;&lt;br /&gt;You might be interested in reading our article 53 CSS-Techniques You Couldn’t Live Without, which should provide you with a basic toolbox for CSS-based techniques you might use in your next projects.&lt;br /&gt;&lt;br /&gt;Update (29/05/2007): Brazilian-Portuguese translation of the article is also available. Thanks to Maurício Samy Silva.&lt;br /&gt;&lt;br /&gt;1.1. Workflow: Getting Started&lt;br /&gt;After you have a design, start with a blank page of content. “Include your headers, your navigation, a sample of the content, and your footer. Then start adding your html markup. Then start adding your CSS. It works out much better.” [CSSing] &lt;br /&gt;Use a master stylesheet. “One of the most common mistakes I see beginners and intermediates fall victim to when it comes to CSS is not removing the default browser styling. This leads to inconsistencies in the appearance of your design across browsers, and ultimately leaves a lot of designers blaming the browser. It is a misplaced blame, of course. Before you do anything else when coding a website, you should reset the styling.” [Master Stylesheet: The Most Useful CSS Technique], [Ryan Parr] &lt;br /&gt;master.css&lt;br /&gt;@import url(”reset.css”);&lt;br /&gt;@import url(”global.css”);&lt;br /&gt;&lt;br /&gt;@import url(”flash.css”);&lt;br /&gt;@import url(”structure.css”);&lt;br /&gt;&lt;style type="text/css" media="Screen"&gt;&lt;br /&gt;/**/@import url("css/master.css");/**/&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;Reset your CSS-styles first. “You can often eliminate the need to specify a value for a property by taking advantage of that property’s default value. Some people like doing a Global white space reset by zeroing both margin and padding for all elements at the top of their stylesheets. [Roger Johansson] &lt;br /&gt;Keep a library of helpful CSS classes. Useful for debugging, but should be avoided in the release version (separate markup and presentation). Since you can use multiple class names (i.e. &lt;p class="floatLeft alignLeft width75"&gt;...&lt;/p&gt;), make use of them debugging your markup. (updated) [Richard K. Miller] &lt;br /&gt;CSS:&lt;br /&gt;.width100 { width: 100%; }&lt;br /&gt;.width75 { width: 75%; }&lt;br /&gt;.width50 { width: 50%; }&lt;br /&gt;.floatLeft { float: left; }&lt;br /&gt;.floatRight { float: right; }&lt;br /&gt;.alignLeft { text-align: left; }&lt;br /&gt;.alignRight { text-align: right; }&lt;br /&gt;Eric Meyer’s Global Reset, Christian Montoya’s initial CSS file, Mike Rundle’s initial CSS file, Ping Mag’s initial CSS file. &lt;br /&gt;1.2. Organize your CSS-code&lt;br /&gt;Organize your CSS-styles, using master style sheets. “Organizing your CSS helps with future maintainability of the site. Start with a master style sheet. Within this style sheet import your reset.css, global.css, flash.css (if needed) and structure.css and on occasion a typography style sheet. Here is an example of a “master” style sheet and how it is embedded in the document:” &lt;br /&gt;h2 { }&lt;br /&gt;#snapshot_box h2 {&lt;br /&gt;	padding: 0 0 6px 0;&lt;br /&gt;	font: bold 14px/14px "Verdana", sans-serif; }&lt;br /&gt;#main_side h2 {&lt;br /&gt;	color: #444;&lt;br /&gt;	font: bold 14px/14px "Verdana", sans-serif; }&lt;br /&gt;.sidetagselection h2 {&lt;br /&gt;	color: #fff;&lt;br /&gt;	font: bold 14px/14px "Verdana", sans-serif; }&lt;br /&gt;Organize your CSS-styles, using flags. “Divide your stylesheet into specific sections: i.e. Global Styles – (body, paragraphs, lists, etc), Header, Page Structure, Headings, Text Styles, Navigation, Forms, Comments, Extras. [5 Tips for Organizing Your CSS] &lt;br /&gt;/* -----------------------------------*/&lt;br /&gt;/* ----------&gt;&gt;&gt; GLOBAL &lt;&lt;&lt;-----------*/&lt;br /&gt;/* -----------------------------------*/&lt;br /&gt;Organize your CSS-styles, making a table of contents. At the top of your CSS document, write out a table of contents. For example, you could outline the different areas that your CSS document is styling (header, main, footer etc). Then, use a large, obvious section break to separate the areas. [5 Steps to CSS Heaven] &lt;br /&gt;Organize your CSS-styles, ordering properties alphabetically. “I don’t know where I got the idea, but I have been alphabetizing my CSS properties for months now, and believe it or not, it makes specific properties much easier to find.” [Christian Montoya] &lt;br /&gt;body {&lt;br /&gt;	background: #fdfdfd;&lt;br /&gt;	color: #333;&lt;br /&gt;	font-size: 1em;&lt;br /&gt;	line-height: 1.4;&lt;br /&gt;	margin: 0;&lt;br /&gt;	padding: 0;&lt;br /&gt;}&lt;br /&gt;Separate code into blocks.. “This might be common sense to some of you but sometimes I look at CSS and it’s not broken down into “sections.” It’s easy to do an it makes working with code weeks, months, or years later much easier. You’ll have an easier time finding classes and elements that you need to change. Examples: /* Structure */, /* Typography */ etc.” [CSS Tips and Tricks] &lt;br /&gt;Hook, line, and sinker. Once you have your CSS and sections in place start considering where your selector “hooks” will live by using structural hooks in your mark up. This is your saving grace for future editing and maintenance of the site. This will also give you strength in your document.” [Ryan Parr] &lt;br /&gt;Break your style sheet in separate blocks. “I break down my style sheet into three separate blocks. The first is straight element declarations. Change the body, some links styles, some header styles, reset margins and padding on forms, and so on. […] After element declarations, I have my class declarations; things like classes for an error message or a callout would go here. [..] I start by declaring my main containers and then any styles for elements within those containers are indented. At a quick glance, I can see how my page is broken down and makes it easier to know where to look for things. I’ll also declare containers even if they don’t have any rules.” [Jonathan Snook] &lt;br /&gt;1.3. Workflow: Handling IDs, Classes, Selectors, Properties&lt;br /&gt;Keep containers to a minimum. “Save your document from structural bloat. New developers will use many div’s similar to table cells to achieve layout. Take advantage of the many structural elements to achieve layout. Do not add more div’s. Consider all options before adding additional wrappers (div’s) to achieve an effect when using a little nifty CSS can get you that same desired effect.” [Ryan Parr] &lt;br /&gt;Keep properties to a minimum. “Work smarter, not harder with CSS. Under this rule, there are a number of subrules: if there isn’t a point to adding a CSS property, don’t add it; if you’re not sure why you’re adding a CSS property, don’t add; and if you feel like you’ve added the same property in lots of places, figure out how to add it in only one place.” [CSSing] &lt;br /&gt;Keep selectors to a minimum. “Avoid unnecessary selectors. Using less selectors will mean less selectors will be needed to override any particular style — that means it’s easier to troubleshoot.” [Jonathan Snook] &lt;br /&gt;Keep CSS hacks to a minimum. “Don’t use hacks unless its a known and documented bug. This is an important point as I too often see hacks employed to fix things that aren’t really broken in the first place. If you find that you are looking for a hack to fix a certain issue in your design then first do some research (Google is your friend here) and try to identify the issue you are having problems with. [10 Quick Tips for an easier CSS life] &lt;br /&gt;Use CSS Constants for faster development. “The concept of constants – fixed values that can be used through your code [is useful]. [..] One way to get round the lack of constants in CSS is to create some definitions at the top of your CSS file in comments, to define ‘constants’. A common use for this is to create a ‘color glossary’. This means that you have a quick reference to the colors used in the site to avoid using alternates by mistake and, if you need to change the colors, you have a quick list to go down and do a search and replace.” [Rachel Andrew] &lt;br /&gt;# /*&lt;br /&gt;# Dark grey (text): #333333&lt;br /&gt;# Dark Blue (headings, links) #000066&lt;br /&gt;# Mid Blue (header) #333399&lt;br /&gt;# Light blue (top navigation) #CCCCFF&lt;br /&gt;# Mid grey: #666666&lt;br /&gt;# */&lt;br /&gt;Use a common naming system. Having a naming system for id’s and classes saves you a lot of time when looking for bugs, or updating your document. Especially in large CSS documents, things can get a big confusing quickly if your names are all different. I recommend using a parent_child pattern. [10 CSS Tips] &lt;br /&gt;Name your classes and IDs properly, according to their semantics. “We want to avoid names that imply presentational aspects. Otherwise, if we name something right-col, it’s entirely possible that the CSS would change and our “right-col” would end up actually being displayed on the left side of our page. That could lead to some confusion in the future, so it’s best that we avoid these types of presentational naming schemes. [Garrett Dimon] &lt;br /&gt;Group selectors with common CSS declarations. “Group selectors. When several element types, classes, or id:s share some properties, you can group the selectors to avoid specifying the same properties several times. This will save space – potentially lots of it.” [Roger Johansson] &lt;br /&gt;Isolate single properties that you are likely to reuse a lot. “If you find yourself using a single property a lot, isolate it to save yourself repeating it over and over again and also enabling you to change the display of all parts of the site that use it.” [5 Steps to CSS Heaven] &lt;br /&gt;Move ids and class naming as far up the document tree as you can. Leverage contextual selectors as much as possible. Don’t be afraid to be verbose in your selectors. Longer selectors can make css documents easier to read while also cutting down the chances of developing class- or divitis. [Chric Casciano] &lt;br /&gt;Learn to exploit the cascading nature of CSS. “Say you have two similar boxes on your website with only minor differences - you could write out CSS to style each box, or you could write CSS to style both at the same time, then add extra properties below to make one look different.” [5 Steps to CSS heaven] &lt;br /&gt;Use Your Utility Tags: &lt;small&gt;, &lt;em&gt; and &lt;strong&gt;. “Many times you’ll have a section in your design that calls for various typographical weights/looks all on the same line, or very close to each other. drop in random divs and classes because I feel they’re not semantic and defeat the purpose of your nice XHTML everywhere else.” Instead, use semantic tags. [Mike Rundle’s 5 CSS Tips] &lt;br /&gt;1.4. Workflow: Use shorthand notation&lt;br /&gt;Shorten hexadecimal colour notation. “In CSS, when you use hexadecimal colour notation and a colour is made up of three pairs of hexadecimal digits, you can write it in a more efficient way by omitting every second digit: #000 is the same as #000000, #369 is the same as #336699 [Roger Johansson] &lt;br /&gt;Define pseudo classes for links in the LoVe/HAte-order: Link, Visited, Hover, Active. “To ensure that you see your various link styles, you’re best off putting your styles in the order “link-visited-hover-active”, or “LVHA” for short. If you’re concerned about focus styles, they may go at the end– but wait until you’ve read this explanation before you decide.” [Eric Meyer] &lt;br /&gt;a:link { color: blue; }&lt;br /&gt;a:visited { color: purple; }&lt;br /&gt;a:hover { color: purple; }&lt;br /&gt;a:active { color: red; }&lt;br /&gt;Define element’s margin, padding or border in TRouBLed-order: Top, Right, Bottom, Left. “When using shorthand to specify an element’s margin, padding or border, do it clockwise from the top: Top, Right, Bottom, Left.” [Roger Johansson] &lt;br /&gt;You can use shorthand properties. “Using shorthand for margin, padding and border properties can save a lot of space. &lt;br /&gt;CSS:&lt;br /&gt;margin: top right bottom left;&lt;br /&gt;margin: 1em 0 2em 0.5em;&lt;br /&gt;(margin-top: 1em; margin-right: 0; margin-bottom: 2em; margin-left: 0.5em;)&lt;br /&gt;CSS:&lt;br /&gt;border: width style color;&lt;br /&gt;border: 1px solid #000;&lt;br /&gt;CSS:&lt;br /&gt;background: color image repeat attachment position;&lt;br /&gt;background: #f00 url(background.gif) no-repeat fixed 0 0;&lt;br /&gt;CSS:&lt;br /&gt;font: font-style (italic/normal) font-variant (small-caps) font-weight font-size/line-height font-family;&lt;br /&gt;font: italic small-caps bold 1em/140% “Lucida Grande”,sans-serif;&lt;br /&gt;1.5. Workflow: Setting Up Typography&lt;br /&gt;To work with EMs like with pxs, set font-size on the body-tag with 62.5%. Default-value of the font-size is 16px; applying the rule, you’ll get one Em standing for roughly ten pixels (16 x 62.5% = 10). “I tend to put a font-size on the body tag with value: 62.5%. This allows you to use EMs to specify sizes while thinking in PX terms, e.g. 1.3em is approximately 1.3px. ” [Jonathan Snook] &lt;br /&gt;Use universal character set for encoding. “[..] The answer is to use a single universal character set that’s able to cover most eventualities. Luckily one exists: UTF-8, which is based on Unicode. Unicode is an industry standard that’s designed to enable text and symbols from all languages to be consistently represented and manipulated by computers. UTF- 8 should be included in your web page’s head like this. [20 pro tips] &lt;br /&gt;&lt;meta http-equiv="content-type" content="text/ html;charset=utf-8" /&gt;&lt;br /&gt;You can change capitalisation using CSS. If you need something written in capitals, such as a headline, rather than rewriting the copy, let CSS do the donkey work. The following code will transform all text with an h1 attribute into all capitals, regardless of format”. [20 pro tips] &lt;br /&gt;h1 {&lt;br /&gt;	text-transform: uppercase;&lt;br /&gt;}&lt;br /&gt;You can display text in small-caps automatically. The font-variant property is used to display text in a small-caps font, which means that all the lower case letters are converted to uppercase letters, but all the letters in the small-caps font have a smaller font-size compared to the rest of the text. &lt;br /&gt;h1 {&lt;br /&gt;	font-variant: small-caps;&lt;br /&gt;}&lt;br /&gt;Cover all the bases - define generic font-families. “When we declare a specific font to be used within our design, we are doing so in the hope that the user will have that font installed on their system. If they don’t have the font on their system, then they won’t see it, simple as that. What we need to do is reference fonts that the user will likely have on their machine, such as the ones in the font-family property below. It is important that we finish the list with a generic font type. [Getting into good coding habits] &lt;br /&gt;p {&lt;br /&gt;	font-family: Arial, Verdana, Helvetica, sans-serif;&lt;br /&gt;}&lt;br /&gt;Use 1.4em - 1.6em for line-height. “line-height:1.4” for readable lines, reasonable line-lengths that avoid lines much longer than 10 words, and colors that provide contrast without being too far apart. For example, pure black on pure white is often too strong for bright CRT displays, so I try to go with an off-white (#fafafa is a good one) and a dark gray (#333333, another good one).” [Christian Montoya] &lt;br /&gt;Set 100.01% for the html-element. This odd 100.01% value for the font size compensates for several browser bugs. First, setting a default body font size in percent (instead of em) eliminates an IE/Win problem with growing or shrinking fonts out of proportion if they are later set in ems in other elements. Additionally, some versions of Opera will draw a default font-size of 100% too small compared to other browsers. Safari, on the other hand, has a problem with a font-size of 101%. The current “best” suggestion is to use the 100.01% value for this property.” [CSS: Getting into good habits] &lt;br /&gt;1.6. Workflow: Debugging&lt;br /&gt;Add borders to identify containers. “Use plenty of test styles like extra borders or background colors when building your documents or debugging layout issues. div { border:1px red dashed; } works like a charm. There are also bookmarklets that apply borders and do other things for you.” You can also use * { border: 1px solid #ff0000; }. [Chric Casciano]. Adding a border to specific elements can help identify overlap and extra white space that might not otherwise be obvious. [CSS Crib Sheet] &lt;br /&gt;* { border: 1px solid #f00; }&lt;br /&gt;Check for closed elements first when debugging. “If you ever get frustrated because it seemed like you changed one minor thing, only to have your beautiful holy-grail layout break, it might be because of an unclosed element. [10 CSS Tips] &lt;br /&gt;2.1. Technical Tips: IDs, Classes&lt;br /&gt;1 ID per page, many classes per page. “Check your IDs: Only one element in a document can have a certain value for the id attribute, while any number of elements can share the same class name. [..] Class and id names can only consist of the characters [A-Za-z0-9] and hyphen (-), and they cannot start with a hyphen or a digit (see CSS2 syntax and basic data types).” [Roger Johansson] &lt;br /&gt;Element names in selectors are case sensitive. “Remember case sensitivity. When CSS is used with XHTML, element names in selectors are case sensitive. To avoid getting caught by this I recommend always using lowercase for element names in CSS selectors. Values of the class and id attributes are case sensitive in both HTML and XHTML, so avoid mixed case for class and id names.” [Roger Johansson] &lt;br /&gt;CSS classes and IDs must be valid. “I.e. beginning with a letter, not a number or an underscore. IDs must be unique. Their names should be generic, describe functionality rather than appearance.” [CSS Best Practices] &lt;br /&gt;You can assign multiple class names to a given element. “You can assign multiple class names to an element. This allows you to write several rules that define different properties, and only apply them as needed.” [Roger Johansson] &lt;br /&gt;2.2. Technical Tips: Use the power of selectors&lt;br /&gt;Roger Johansson has written an extremely useful series of articles about CSS 2.1 Selectors. These articles are highly recommended to read - some useful aspects can be found in the list below. Note that selectors ‘&gt;’ and ‘+’ aren’t supported in IE6 and earlier versions of Internet Explorer (updated).&lt;br /&gt;&lt;br /&gt;You can use child selectors. “A child selector targets an immediate child of a certain element. A child selector consists of two or more selectors separated by a greater than sign, “&gt;”. The parent goes to the left of the “&gt;”, and whitespace is allowed around the combinator. This rule will affect all strong elements that are children of a div element. [Roger Johansson] &lt;br /&gt;div &gt; strong { color:#f00; }&lt;br /&gt;You can use adjacent sibling selectors. An adjacent sibling selector is made up of two simple selectors separated by a plus sign, “+”. Whitespace is allowed around the adjacent sibling combinator. The selector matches an element which is the next sibling to the first element. The elements must have the same parent and the first element must immediately precede the second element. [Roger Johansson] &lt;br /&gt;p + p { color:#f00; }&lt;br /&gt;You can use attribute selectors. Attribute selectors match elements based on the presence or value of attributes. There are four ways for an attribute selector to match: &lt;br /&gt;[att]&lt;br /&gt;Matches elements that have an att attribute, regardless of its value.&lt;br /&gt;[att=val]&lt;br /&gt;Matches elements that have an att attribute with a value of exactly “val”.&lt;br /&gt;[att~=val]&lt;br /&gt;Matches elements whose att attribute value is a space-separated list that contains “val”. In this case “val” cannot contain spaces.&lt;br /&gt;[att|=val]&lt;br /&gt;Matches elements whose att attribute value is a hyphen-separated list that begins with “val”. The main use for this is to match language subcodes specified by the lang attribute (xml:lang in XHTML), e.g. “en”, “en-us”, “en-gb”, etc.&lt;br /&gt;The selector in the following rule matches all p elements that have a title attribute, regardless of which value it has: &lt;br /&gt;p[title] { color:#f00; }&lt;br /&gt;The selector matches all div elements that have a class attribute with the value error: &lt;br /&gt;div[class=error] { color:#f00; }&lt;br /&gt;Multiple attribute selectors can be used in the same selector. This makes it possible to match against several different attributes for the same element. The following rule would apply to all blockquote elements that have a class attribute whose value is exactly “quote”, and a cite attribute (regardless of its value): &lt;br /&gt;blockquote[class=quote][cite] { color:#f00; }&lt;br /&gt;You should use descendant selectors. “Descendant selectors can help you eliminate many class attributes from your markup and make your CSS selectors much more efficient. ” [Roger Johansson] &lt;br /&gt;2.3. Technical Tips: Styling Links&lt;br /&gt;Be careful when styling links if you’re using anchors. “If you use a classic anchor in your code (&lt;a name="anchor"&gt;) you’ll notice it picks up :hover and :active pseudo-classes. To avoid this, you’ll need to either use id for anchors instead, or style with a slightly more arcane syntax: :link:hover, :link:active” [Dave Shea] &lt;br /&gt;Define relationships for links. “The rel attribute is supposed to indicate a semantic link relationship from one resource to another. &lt;br /&gt;a[rel~="nofollow"]::after {&lt;br /&gt;	content: "2620";&lt;br /&gt;	color: #933;&lt;br /&gt;	font-size: x-small;&lt;br /&gt;}&lt;br /&gt;a[rel~="tag"]::after {&lt;br /&gt;	content: url(http://www.technorati.com/favicon.ico);&lt;br /&gt;}&lt;br /&gt;“These make use of the attribute selector for space separated lists of values. Any a element with a relationship containing those values will be matched. Links with the nofollow relationship will be followed by a dark red skull and crossbones (?) and those with the tag relationship will be followed by the Technocrati icon.” [Handy CSS] &lt;br /&gt;You can mark external links automatically. Many people make use of the non-standard rel="external" relationship to indicate a link to an external site. However, adding that to each and every link is time consuming and and unnecessary. This style rule will place an north east arrow after any link on your site to an external site. [Handy CSS] &lt;br /&gt;a[href^="http://"]:not([href*="smashingmagazine.com"])::after {&lt;br /&gt;	content: "2197";&lt;br /&gt;}&lt;br /&gt;You can remove dotted links with outline: none;. To remove dotted links use outline: none; &lt;br /&gt;a:focus {&lt;br /&gt;	outline: none;&lt;br /&gt;}&lt;br /&gt;2.4. Technical Tips: CSS-Techniques&lt;br /&gt;You can specify body tag ID. “In most cases placing an ID in the body tag will allow you manipulate CSS presentational items and markup elements by page by page basis. Not only will you be able to organize your sections you will be able to create multiple CSS presentations without changing your markup from template to template or page to page.” [Ryan Parr, Invasion of Body Switchers] &lt;br /&gt;You can create columns with equal heights with CSS. Equal Height Technique: a method to make all columns appear to be the same height. But without the need for faux column style background images. Faux Columns: with background images. &lt;br /&gt;You can align vertically with CSS. “Say you have a navigation menu item whose height is assigned 2em. Solution: specify the line height to be the same as the height of the box itself in the CSS. In this instance, the box is 2em high, so we would insert line-height: 2em into the CSS rule and the text now floats in the middle of the box!” [Evolt.org] &lt;br /&gt;You can use pseudo-elements and classes to generate content dynamically. Pseudo-classes and pseudo-elements. Pseudo-classes and pseudo-elements can be used to format elements based on information that is not available in the document tree. For example, there is no element that refers to the first line of a paragraph or the first letter of an element’s text content. You can use :first-child, :hover, :active, :focus, :first-line, :first-letter, :before, :after and more. &lt;br /&gt;You can set &lt;hr&gt; to separate posts beautifully. “Restyling the horizontal rule (&lt;hr&gt;) with an image can be a beautiful addition to a web page. [CSS: Best Practices] &lt;br /&gt;You can use the same navigation (X)HTML-code on every page. “Most websites highlight the navigation item of the user’s location in the website. But it can be a pain as you’ll need to tweak the HTML code behind the navigation for each and every page. So can we have the best of both worlds?” [Ten More CSS Tricks you may not know] &lt;br /&gt;XHTML:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=”#” class=”home”&gt;Home&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=”#” class=”about”&gt;About us&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href=”#” class=”contact”&gt;Contact us&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Insert an id into the &lt;body&gt; tag. The id should be representative of where users are in the site and should change when users move to a different site section. &lt;br /&gt;CSS:&lt;br /&gt;#home .home, #about .about, #contact .contact&lt;br /&gt;{&lt;br /&gt;	commands for highlighted navigation go here&lt;br /&gt;}&lt;br /&gt;You can use margin: 0 auto; to horizontally centre the layout. “To horizontally centre an element with CSS, you need to specify the element’s width and horizontal margins.” [Roger Johansson] &lt;br /&gt;XHTML:&lt;br /&gt;&lt;div id=”wrap”&gt;&lt;br /&gt;&lt;!– Your layout goes here –&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;CSS:&lt;br /&gt;#wrap {&lt;br /&gt;width:760px; /* Change this to the width of your layout */&lt;br /&gt;&lt;br /&gt;margin:0 auto;&lt;br /&gt;}&lt;br /&gt;You can add CSS-styling to RSS-feeds. “You can do a lot more with an XSL stylesheet (turn links into clickable links, etc), but CSS can make your feed look much less scary for the non-technical crowd. [Pete Freitag] &lt;br /&gt;&lt;?xml version="1.0" ?&gt;&lt;br /&gt;&lt;?xml-stylesheet type="text/css" href="http://you.com/rss.css" ?&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;You can hide CSS from older browsers. “A common way of hiding CSS files from old browsers is to use the @import trick. [Roger Johansson] &lt;br /&gt;@import "main.css";&lt;br /&gt;Always declare margin and padding in block-level elements. [10 CSS Tips] &lt;br /&gt;Set a width OR margin and padding. “My rule of thumb is, if I set a width, I don’t set margin or padding. Likewise, if I’m setting a margin or padding, I don’t set a width. Dealing with the box model can be such a pain, especially if you’re dealing with percentages. Therefore, I set the width on the containers and then set margin and padding on the elements within them. Everything usually turns out swimmingly.” [Jonathan Snook] &lt;br /&gt;Avoid applying padding/borders and a fixed width to an element. “IE5 gets the box model wrong, which really makes a mess of things. There are ways around this, but it’s best to side-step the issue by applying the padding to the parent element instead of the child that gets a fixed-width. [CSS Crib Sheet] &lt;br /&gt;Provide print styles. “You can add a print stylesheet in exactly the same way that you would add a regular stylesheet to your page: &lt;br /&gt;&lt;link rel="stylesheet" type="text/css" href="print.css" media="print"&gt;&lt;br /&gt;or&lt;br /&gt;&lt;style type=”text/css” media=”print”&gt; @import url(print.css); &lt;/style&gt;&lt;br /&gt;This ensures that the CSS will only apply to printed output and not affect how the page looks on screen. With your new printed stylesheet you can ensure you have solid black text on a white background and remove extraneous features to maximise readability. More about CSS-based print-Layouts. [20 pro tips] &lt;br /&gt;2.5. Technical Tips: IE Tweaks&lt;br /&gt;You can force IE to apply transparence to PNGs. “In theory, PNG files do support varied levels of transparency; however, an Internet Explorer 6 bug prevents this from working cross-browser.” [CSS Tips, Outer-Court.com] &lt;br /&gt;#regular_logo&lt;br /&gt;{&lt;br /&gt;	background: url('test.png'); width:150px; height:55px;&lt;br /&gt;}&lt;br /&gt;/*  */&lt;br /&gt;* html #regular_logo&lt;br /&gt;{&lt;br /&gt;	background:none;&lt;br /&gt;	float:left;&lt;br /&gt;	width:150px;&lt;br /&gt;	filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='test.png', sizingMethod='scale');&lt;br /&gt;}&lt;br /&gt;/* */&lt;br /&gt;You can define min-width and max-width in IE. You can use Microsoft’s dynamic expressions to do that. [Ten More CSS Trick you may not know] &lt;br /&gt;#container&lt;br /&gt;{&lt;br /&gt;	min-width: 600px;&lt;br /&gt;	max-width: 1200px;&lt;br /&gt;	width:expression(document.body.clientWidth &lt; 600? "600px" : document.body.clientWidth &gt; 1200? "1200px" : "auto");&lt;br /&gt;}&lt;br /&gt;You can use Conditional Comments for IE. “The safest way of taking care of IE/Win is to use conditional comments. It feels more future-proof than CSS hacks – is to use Microsoft’s proprietary conditional comments. You can use this to give IE/Win a separate stylesheet that contains all the rules that are needed to make it behave properly. ” [Roger Johansson] &lt;br /&gt;&lt;!--[if IE]&gt;&lt;br /&gt;&lt;link rel="stylesheet" type="text/css" href="ie.css" /&gt;&lt;br /&gt;&lt;![endif]--&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-28411657468806291?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/28411657468806291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=28411657468806291' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/28411657468806291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/28411657468806291'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/70-expert-ideas-for-better-css-coding.html' title='70 Expert Ideas For Better CSS Coding'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-6888832320531696172</id><published>2008-06-27T11:19:00.000-07:00</published><updated>2008-06-27T11:29:10.060-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Top CSS Tips</title><content type='html'>&lt;p&gt;I thought I'd share some of my habits when it comes to doing CSS work and let  me warn you, some of what I have to say is probably a little controversial. But  what's life without living it on the edge. (Yeah, I live an exciting life when  CSS is considered 'the edge'.)&lt;/p&gt; &lt;h2&gt;px for font sizes&lt;/h2&gt; &lt;p&gt;Sacrilege, I know. There are perfectly good ways to get consistent font  sizing and I really should use them but Internet Explorer is the only browser  that I can think of that doesn't resize text. If the majority of your audience  uses IE, then be nice to them and don't use pixels. Otherwise, I figure with IE7  supporting it, pixels are the new ems. &lt;/p&gt; &lt;p&gt;When using pixel sizes, I also get to be sparing in my usage. I specify it on  the body and any headers that need it. Inheritance is less of an issue (how many  sites have you seen list items inexplicably smaller than the rest of the content  like it was less important).&lt;/p&gt; &lt;h2&gt;CSS declarations on one line&lt;/h2&gt; &lt;p&gt;I've always put my entire declaration on one line. Here's an example to  explain what I mean:&lt;/p&gt;&lt;pre&gt;&lt;code&gt;h2 {font-size:18px; border:1px solid blue; color:#000; background-color:#FFF;}&lt;br /&gt;&lt;br /&gt;h2 {&lt;br /&gt;  font-size:18px;&lt;br /&gt;  border:1px solid blue;&lt;br /&gt;  color:#000;&lt;br /&gt;  background-color:#FFF;&lt;br /&gt;  }&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;The second one may look prettier but it sure doesn't help me find anything.  When looking for something in a style sheet, the most important thing is the  ruleset (that's the part before the { and } ). I'm looking for an element, an id  or a class. Having everything on one line makes scanning the document much  quicker as you simply see more on a page. Once I've found the ruleset I was  looking for, find the property I want is usually straightforward enough as there  are rarely that many.&lt;/p&gt; &lt;h2&gt;Blocking the Styles&lt;/h2&gt; &lt;p&gt;I break down my style sheet into three separate blocks. The first is straight  element declarations. Change the body, some links styles, some header styles,  reset margins and padding on forms, and so on. This is usually a small block as  I only like to redefine what I need to. No global margin and padding reset for  me. I clear the body and form and maybe adjust paragraph if the design really  needs it. Otherwise, let the browser handle it. I find the more you try to  override what the browser does, the more styles you have to put in, which simply  adds to the time to track down bugs and maintain the code.&lt;/p&gt; &lt;p&gt;After element declarations, I have my class declarations; things like classes  for an error message or a callout would go hear. I usually only have a couple of  these. &lt;/p&gt; &lt;p&gt;Finally, the meat. I start by declaring my main containers and then any  styles for elements within those containers are indented. At a quick glance, I  can see how my page is broken down and makes it easier to know where to look for  things. I'll also declare containers even if they don't have any rules.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;#content {float:left;}&lt;br /&gt;  #content p { ... }&lt;br /&gt;&lt;br /&gt;#sidebar {float:left;}&lt;br /&gt;  #sidebar p { ... }&lt;br /&gt;&lt;br /&gt;#footer {clear:both;}&lt;br /&gt;  #sidebar p { ... }&lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Browser Support&lt;/h2&gt; &lt;p&gt;Support only the latest browsers. That means dropping support for IE5 and  IE5.5. Lots of time and effort to be saved here. No box model hacks needed for  IE6. In fact, in supporting just the most recent versions of browsers, I end up  using very few hacks. Along with using very few hacks means I can avoid  shovelling different style sheets to separate browsers. I have one sheet, and  that's it. Any hacks I do use are normally commented as such. Similar to the use  of pixel measurements, you have to consider your audience before dropping  browser support.&lt;/p&gt; &lt;p&gt;The biggest thing for me is still triggering hasLayout in IE to do float  containment and I've been using &lt;code&gt;zoom:1&lt;/code&gt; for that. I like it because  it's innocuous and shouldn't mess with anything else. &lt;/p&gt; &lt;h2&gt;Containing Floats&lt;/h2&gt; &lt;p&gt;I just touched on float containment so let's expand on that. My current  approach to containing floats is using &lt;code&gt;overflow:hidden&lt;/code&gt; (with  possibly &lt;code&gt;zoom:1&lt;/code&gt; for Internet Explorer). No clearing div or use of  &lt;code&gt;:after&lt;/code&gt;. Only worry about containing your floats if you have a  background you are trying to set on your container. The overflow should be set  on the container.&lt;/p&gt; &lt;p&gt;Keep in mind that the content within the container should be designed to stay  within the container. Anything too big and it'll get clipped. Shifting things  using negative margins outside the container will also get clipped.&lt;/p&gt; &lt;h2&gt;Understand Overflow&lt;/h2&gt; &lt;p&gt;Overflow is usually where people get bit by IE. If you've got two floated  elements and the content from the left container overflows then, in IE, the  container grows and inevitably pushes the right container below it. This is  usually a sign that you've messed up your margins, widths, or padding on one of  these containers but Firefox (et al) won't reveal this. Using something like  overflow:hidden or overflow:scroll on a container can help prevent IE from  allowing the content to push the width of the container but you're better off  trying to fix the issue in the design.&lt;/p&gt; &lt;h2&gt;Allow Block Elements to Fill Their Space Naturally&lt;/h2&gt; &lt;p&gt;My rule of thumb is, if I set a width, I don't set margin or padding.  Likewise, if I'm setting a margin or padding, I don't set a width. Dealing with  the box model can be such a pain, especially if you're dealing with percentages.  Therefore, I set the width on the containers and then set margin and padding on  the elements within them. Everything usually turns out swimmingly.&lt;/p&gt; &lt;h2&gt;Use CSS Shorthand&lt;/h2&gt; &lt;p&gt;This might seem like beating a dead horse but I still see people doing really  verbose statements where they're setting margin-top, margin-right, margin-bottom  and margin-left. My general rule of thumb is, you can use the long form only if  you're setting one side. Once you have to set more than one side, it'll take  less bytes to use shorthand. &lt;/p&gt; &lt;p&gt;In shorthand, remember that the properties start at the top and work  clockwise. &lt;code&gt;margin: &lt;i&gt;top right bottom left&lt;/i&gt;;&lt;/code&gt; It's also handy to  know the shorter forms if you have equal values for top and bottom or left and  right. &lt;/p&gt;&lt;pre&gt;&lt;code&gt;margin: 5px 10px 20px; /* top left/right bottom */&lt;br /&gt;margin: 10px 20px; /* top/bottom left/right */&lt;br /&gt;margin: 0; /* all sides */&lt;/code&gt;&lt;/pre&gt; &lt;p&gt;For border, if you only have to set more than one side differently then use  two declarations. The first to set all sides, and then a second to change the  values for one of the properties.&lt;/p&gt;&lt;pre&gt;&lt;code&gt;/* 1px blue border on the left and bottom */&lt;br /&gt;border:1px solid blue; border-width: 0 0 1px 1px; &lt;/code&gt;&lt;/pre&gt; &lt;h2&gt;Avoid Unnecessary Selectors&lt;/h2&gt; &lt;p&gt;Just specify the minimum number of selectors necessary for the style. If you  find yourself doing &lt;code&gt;ul li {...}&lt;/code&gt; or &lt;code&gt;table tr td {...}&lt;/code&gt;  then you're being more verbose than you need. LI's will inevitably be in UL's  (okay, I suppose they could find themselves in OL's, in which case, be more  specific for those styles) and a TD will inevitably be in a TR and a TABLE.&lt;/p&gt; &lt;p&gt;Or putting the element name in front of an ID selector (Example:  div#navigation). I used to do this because it'd help me "remember" which element  the ID is on. As it turns out, I tend to use similar class names from project to  project and they inevitably appear on the same elements. I also tend to just do  a search to find where something is. So, these days, I just leave it at  &lt;code&gt;#navigation&lt;/code&gt;.&lt;/p&gt; &lt;p&gt;Using less selectors will mean less selectors will be needed to override any  particular style — that means it's easier to troubleshoot.&lt;/p&gt; &lt;h2&gt;Keep it Simple&lt;/h2&gt; &lt;p&gt;If it hasn't been evident throughout this post, only add when you need to,  and that includes hacks. No need to get any more complicated than you need to.  &lt;/p&gt; &lt;p&gt;Now, I'd love to hear some of your tips.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-6888832320531696172?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/6888832320531696172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=6888832320531696172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6888832320531696172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6888832320531696172'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/06/top-css-tips.html' title='Top CSS Tips'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7625731787209363806</id><published>2008-03-14T11:53:00.002-07:00</published><updated>2008-03-14T11:55:27.604-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Lists: the 'list-style-type', 'list-style-image', 'list-style-position', and 'list-style' properties</title><content type='html'>&lt;p&gt;The &lt;a name="x36"&gt;&lt;span class="index-def" title="list properties"&gt;&lt;dfn&gt;list  properties&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt; allow basic visual formatting of lists. As with more  general markers, a element with 'display: list-item' generates a &lt;a href="visuren.html#principal-box"&gt;principal box&lt;/a&gt; for the element's content  and an optional marker box. The other list properties allow authors to specify  the marker type (image, glyph, or number) and its position with respect to the  principal box (outside it or within it before content). They do not allow  authors to specify distinct style (colors, fonts, alignment, etc.) for the list  marker or adjust its position with respect to the principal box.  &lt;/p&gt;&lt;p&gt;Furthermore, when a marker M (created with 'display: marker') is used with a  list item created by the list properties, M replaces the standard list item  marker.  &lt;/p&gt;&lt;p&gt;With the list properties, the &lt;a href="colors.html#background-properties"&gt;background properties&lt;/a&gt; apply to the  principal box only; an 'outside' marker box is transparent. Markers offer more  control over marker box style.  &lt;/p&gt;&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'list-style-type'"&gt;&lt;a class="propdef-title" name="propdef-list-style-type"&gt;&lt;strong&gt;'list-style-type'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;disc | circle | square | decimal | decimal-leading-zero | lower-roman |  upper-roman | lower-greek | lower-alpha | lower-latin | upper-alpha |  upper-latin | hebrew | armenian | georgian | cjk-ideographic | hiragana |  katakana | hiragana-iroha | katakana-iroha | none | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;disc  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;elements with 'display: list-item'  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies appearance of the list item marker if &lt;a class="noxref" href="generate.html#propdef-list-style-image"&gt;&lt;span class="propinst-list-style-image"&gt;'list-style-image'&lt;/span&gt;&lt;/a&gt; has the value  'none' or if the image pointed to by the URI cannot be displayed. The value  'none' specifies no marker, otherwise there are three types of marker: glyphs,  numbering systems, and alphabetic systems. &lt;strong&gt;Note.&lt;/strong&gt; Numbered lists  improve document accessibility by making lists easier to navigate.  &lt;/p&gt;&lt;p&gt;Glyphs are specified with &lt;strong&gt;&lt;span class="index-def" title="disc"&gt;&lt;a class="value-def" name="value-def-disc"&gt;disc&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;, &lt;strong&gt;&lt;span class="index-def" title="circle"&gt;&lt;a class="value-def" name="value-def-circle"&gt;circle&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;, and &lt;strong&gt;&lt;span class="index-def" title="square"&gt;&lt;a class="value-def" name="value-def-square"&gt;square&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;. Their exact rendering depends  on the user agent.  &lt;/p&gt;&lt;p&gt;Numbering systems are specified with:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="decimal"&gt;&lt;a class="value-def" name="value-def-decimal"&gt;&lt;strong&gt;decimal&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;Decimal numbers, beginning with 1.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="decimal-leading-zero"&gt;&lt;a class="value-def" name="value-def-decimal-leading-zero"&gt;decimal-leading-zero&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Decimal numbers padded by initial zeros (e.g., 01, 02, 03, ..., 98, 99).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="lower-roman"&gt;&lt;a class="value-def" name="value-def-lower-roman"&gt;lower-roman&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Lowercase roman numerals (i, ii, iii, iv, v, etc.).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="upper-roman"&gt;&lt;a class="value-def" name="value-def-upper-roman"&gt;upper-roman&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Uppercase roman numerals (I, II, III, IV, V, etc.).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="hebrew"&gt;&lt;a class="value-def" name="value-def-hebrew"&gt;hebrew&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Traditional Hebrew numbering.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="georgian"&gt;&lt;a class="value-def" name="value-def-georgian"&gt;georgian&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Traditional Georgian numbering (an, ban, gan, ..., he, tan, in, in-an, ...).   &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="armenian"&gt;&lt;a class="value-def" name="value-def-armenian"&gt;armenian&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Traditional Armenian numbering.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="cjk-ideographic"&gt;&lt;a class="value-def" name="value-def-cjk-ideographic"&gt;cjk-ideographic&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Plain ideographic numbers  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="hiragana"&gt;&lt;a class="value-def" name="value-def-hiragana"&gt;hiragana&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;a, i, u, e, o, ka, ki, ...  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="katakana"&gt;&lt;a class="value-def" name="value-def-katakana"&gt;katakana&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;A, I, U, E, O, KA, KI, ...  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="hiragana-iroha"&gt;&lt;a class="value-def" name="value-def-hiragana-iroha"&gt;hiragana-iroha&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;i, ro, ha, ni, ho, he, to, ...  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="katakana-iroha"&gt;&lt;a class="value-def" name="value-def-katakana-iroha"&gt;katakana-iroha&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;I, RO, HA, NI, HO, HE, TO, ... &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;A user agent that does not recognize a numbering system should use 'decimal'.   &lt;/p&gt;&lt;div class="note"&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; This document does not specify the exact mechanism  of each numbering system (e.g., how roman numerals are calculated). A future W3C  Note may provide further clarifications. &lt;/em&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;Alphabetic systems are specified with:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="lower-latin"&gt;&lt;a class="value-def" name="value-def-lower-latin"&gt;lower-latin&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt; or  &lt;strong&gt;lower-alpha&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Lowercase ascii letters (a, b, c, ... z).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="upper-latin"&gt;&lt;a class="value-def" name="value-def-upper-latin"&gt;upper-latin&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt; or  &lt;strong&gt;upper-alpha&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Uppercase ascii letters (A, B, C, ... Z).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;&lt;span class="index-def" title="lower-greek"&gt;&lt;a class="value-def" name="value-def-lower-greek"&gt;lower-greek&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Lowercase classical Greek alpha, beta, gamma, ... (έ, ή, ί, ...) &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;This specification does not define how alphabetic systems wrap at the end of  the alphabet. For instance, after 26 list items, 'lower-latin' rendering is  undefined. Therefore, for long lists, we recommend that authors specify true  numbers.  &lt;/p&gt;&lt;div class="html-example"&gt; &lt;p&gt;For example, the following HTML document: &lt;/p&gt;&lt;pre&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;  &lt;head&gt;&lt;br /&gt;    &lt;title&gt;Lowercase latin numbering&lt;/title&gt;&lt;br /&gt;    &lt;style type="text/css"&gt;&lt;br /&gt;         OL { list-style-type: lower-roman }  &lt;br /&gt;    &lt;/style&gt;&lt;br /&gt; &lt;/head&gt;&lt;br /&gt; &lt;body&gt;&lt;br /&gt;   &lt;ol&gt;&lt;br /&gt;     &lt;li&gt; This is the first item.&lt;br /&gt;     &lt;li&gt; This is the second item.&lt;br /&gt;     &lt;li&gt; This is the third item.&lt;br /&gt;   &lt;/ol&gt;&lt;br /&gt; &lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;might produce something like this: &lt;/p&gt;&lt;pre&gt;  i This is the first item.&lt;br /&gt;ii This is the second item.&lt;br /&gt;iii This is the third item.&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Note that the list marker alignment (here, right justified) depends on the  user agent. &lt;/p&gt;&lt;/div&gt; &lt;div class="note"&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; Future versions of CSS may provide more complete  mechanisms for international numbering styles. &lt;/em&gt;&lt;/p&gt;&lt;/div&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'list-style-image'"&gt;&lt;a class="propdef-title" name="propdef-list-style-image"&gt;&lt;strong&gt;'list-style-image'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="syndata.html#value-def-uri"&gt;&lt;span class="value-inst-uri"&gt;&lt;uri&gt;&lt;/span&gt;&lt;/a&gt; | none | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;elements with 'display: list-item'  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property sets the image that will be used as the list item marker. When  the image is available, it will replace the marker set with the &lt;a class="noxref" href="generate.html#propdef-list-style-type"&gt;&lt;span class="propinst-list-style-type"&gt;'list-style-type'&lt;/span&gt;&lt;/a&gt; marker.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The following example sets the marker at the beginning of each list item to  be the image "ellipse.png". &lt;/p&gt;&lt;pre&gt;UL { list-style-image: url("http://png.com/ellipse.png") }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'list-style-position'"&gt;&lt;a class="propdef-title" name="propdef-list-style-position"&gt;&lt;strong&gt;'list-style-position'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;   &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;inside | outside | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;outside  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;elements with 'display: list-item'  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies the position of the marker box in the principal block  box. Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;outside&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The marker box is outside the principal block box. &lt;strong&gt;Note.&lt;/strong&gt;  CSS1 did not specify the precise location of the marker box and for reasons of  compatibility, CSS2 remains equally ambiguous. For more precise control of  marker boxes, please use markers.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;inside&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The marker box is the first inline box in the principal block box, after  which the element's content flows. &lt;/dd&gt;&lt;/dl&gt; &lt;div class="html-example"&gt; &lt;p&gt;For example: &lt;/p&gt;&lt;pre&gt;&lt;html&gt;&lt;br /&gt; &lt;head&gt;&lt;br /&gt;   &lt;title&gt;Comparison of inside/outside position&lt;/title&gt;&lt;br /&gt;   &lt;style type="text/css"&gt;&lt;br /&gt;     UL         { list-style: outside }&lt;br /&gt;     UL.compact { list-style: inside }&lt;br /&gt;   &lt;/style&gt;&lt;br /&gt; &lt;/head&gt;&lt;br /&gt; &lt;body&gt;&lt;br /&gt;   &lt;ul&gt;&lt;br /&gt;     &lt;li&gt;first list item comes first&lt;br /&gt;     &lt;li&gt;second list item comes second&lt;br /&gt;   &lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;   &lt;ul class="compact"&gt;&lt;br /&gt;     &lt;li&gt;first list item comes first&lt;br /&gt;     &lt;li&gt;second list item comes second&lt;br /&gt;   &lt;/ul&gt;&lt;br /&gt; &lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The above example may be formatted as:&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7625731787209363806?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7625731787209363806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7625731787209363806' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7625731787209363806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7625731787209363806'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/lists-list-style-type-list-style-image.html' title='Lists: the &apos;list-style-type&apos;, &apos;list-style-image&apos;, &apos;list-style-position&apos;, and &apos;list-style&apos; properties'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3386398547598278161</id><published>2008-03-14T11:53:00.001-07:00</published><updated>2008-03-14T11:53:54.877-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Markers and lists</title><content type='html'>Most block-level elements in CSS generate one principal block box. In this section, we discuss two CSS mechanisms that cause an element to generate two boxes: one principal block box (for the element's content) and one separate marker box (for decoration such as a bullet, image, or number). The marker box may be positioned inside or outside the principal box. Unlike :before and :after content, the marker box does not affect the position of the principal box, whatever the positioning scheme. &lt;br /&gt;&lt;br /&gt;The more general of the two mechanisms is new in CSS2 and is called markers. The more limited mechanism involves the list properties of CSS1. The list properties give authors quick results for many common ordered and unordered list scenarios. However, markers give authors precise control over marker content and position. Markers may be used with counters to create new list styles, to number margin notes, and much more. &lt;br /&gt;&lt;br /&gt;For instance, the following example illustrates how markers may be used to add periods after each numbered list item. This HTML program and style sheet:&lt;br /&gt;&lt;br /&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;&lt;br /&gt;&lt;HTML&gt;&lt;br /&gt;   &lt;HEAD&gt;&lt;br /&gt;     &lt;TITLE&gt;Creating a list with markers&lt;/TITLE&gt;&lt;br /&gt;     &lt;STYLE type="text/css"&gt;&lt;br /&gt;	  LI:before { &lt;br /&gt;	      display: marker;&lt;br /&gt;	      content: counter(mycounter, lower-roman) ".";&lt;br /&gt;	      counter-increment: mycounter;&lt;br /&gt;	  }   &lt;br /&gt;     &lt;/STYLE&gt;&lt;br /&gt;  &lt;/HEAD&gt;&lt;br /&gt;  &lt;BODY&gt;&lt;br /&gt;    &lt;OL&gt;&lt;br /&gt;      &lt;LI&gt; This is the first item.&lt;br /&gt;      &lt;LI&gt; This is the second item.&lt;br /&gt;      &lt;LI&gt; This is the third item.&lt;br /&gt;    &lt;/OL&gt;&lt;br /&gt;  &lt;/BODY&gt;&lt;br /&gt;&lt;/HTML&gt;&lt;br /&gt;&lt;br /&gt;should produce something like this: &lt;br /&gt;&lt;br /&gt;   i. This is the first item.&lt;br /&gt;  ii. This is the second item.&lt;br /&gt; iii. This is the third item.&lt;br /&gt;&lt;br /&gt;With descendant selectors and child selectors, it's possible to specify different marker types depending on the depth of embedded lists. &lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-3386398547598278161?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3386398547598278161/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3386398547598278161' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3386398547598278161'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3386398547598278161'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/markers-and-lists.html' title='Markers and lists'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2244845219420134415</id><published>2008-03-14T11:52:00.000-07:00</published><updated>2008-03-14T11:53:01.030-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Counters in elements with 'display: none'</title><content type='html'>An element that is not displayed ('display' set to 'none') cannot increment or reset a counter. &lt;br /&gt;&lt;br /&gt;Example(s):&lt;br /&gt;&lt;br /&gt;For example, with the following style sheet, H2s with class "secret" do not increment 'count2'. &lt;br /&gt;&lt;br /&gt;H2.secret {counter-increment: count2; display: none}&lt;br /&gt;&lt;br /&gt;Elements with 'visibility' set to 'hidden', on the other hand, do increment counters.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2244845219420134415?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2244845219420134415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2244845219420134415' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2244845219420134415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2244845219420134415'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/counters-in-elements-with-display-none.html' title='Counters in elements with &apos;display: none&apos;'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3156114691490574447</id><published>2008-03-14T11:51:00.004-07:00</published><updated>2008-03-14T11:52:31.298-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>css Counter styles</title><content type='html'>By default, counters are formatted with decimal numbers, but all the styles available for the 'list-style-type' property are also available for counters. The notation is:&lt;br /&gt;&lt;br /&gt;counter(name)&lt;br /&gt;&lt;br /&gt;for the default style, or:&lt;br /&gt;&lt;br /&gt;counter(name, 'list-style-type')&lt;br /&gt;&lt;br /&gt;All the styles are allowed, including 'disc', 'circle', 'square', and 'none'. &lt;br /&gt;&lt;br /&gt;Example(s):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;H1:before        { content: counter(chno, upper-latin) ". " }&lt;br /&gt;H2:before        { content: counter(section, upper-roman) " - " }&lt;br /&gt;BLOCKQUOTE:after { content: " [" counter(bq, hebrew) "]" }&lt;br /&gt;DIV.note:before  { content: counter(notecntr, disc) " " }&lt;br /&gt;P:before         { content: counter(p, none) }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-3156114691490574447?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3156114691490574447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3156114691490574447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3156114691490574447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3156114691490574447'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css-counter-styles.html' title='css Counter styles'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-6366036999512912656</id><published>2008-03-14T11:51:00.003-07:00</published><updated>2008-03-14T11:51:57.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Nested counters and scope</title><content type='html'>Counters are "self-nesting", in the sense that re-using a counter in a child element automatically creates a new instance of the counter. This is important for situations like lists in HTML, where elements can be nested inside themselves to arbitrary depth. It would be impossible to define uniquely named counters for each level. &lt;br /&gt;&lt;br /&gt;Example(s):&lt;br /&gt;&lt;br /&gt;Thus, the following suffices to number nested list items. The result is very similar to that of setting 'display:list-item' and 'list-style: inside' on the LI element: &lt;br /&gt;&lt;br /&gt;OL { counter-reset: item }&lt;br /&gt;LI { display: block }&lt;br /&gt;LI:before { content: counter(item) ". "; counter-increment: item }&lt;br /&gt;&lt;br /&gt;The self-nesting is based on the principle that every element that has a 'counter-reset' for a counter X, creates a fresh counter X, the scope of which is the element, its preceding siblings, and all the descendants of the element and its preceding siblings. &lt;br /&gt;&lt;br /&gt;In the example above, an OL will create a counter, and all children of the OL will refer to that counter. &lt;br /&gt;&lt;br /&gt;If we denote by item[n] the nth instance of the "item" counter, and by "(" and ")" the beginning and end of a scope, then the following HTML fragment will use the indicated counters. (We assume the style sheet as given in the example above). &lt;br /&gt;&lt;br /&gt;&lt;OL&gt;               &lt;!-- (set item[0] to 0          --&gt;&lt;br /&gt;  &lt;LI&gt;item         &lt;!--  increment item[0] (= 1)   --&gt;&lt;br /&gt;  &lt;LI&gt;item         &lt;!--  increment item[0] (= 2)   --&gt;&lt;br /&gt;    &lt;OL&gt;           &lt;!--  (set item[1] to 0         --&gt;&lt;br /&gt;      &lt;LI&gt;item     &lt;!--   increment item[1] (= 1)  --&gt;&lt;br /&gt;      &lt;LI&gt;item     &lt;!--   increment item[1] (= 2)  --&gt;&lt;br /&gt;      &lt;LI&gt;item     &lt;!--   increment item[1] (= 3)  --&gt;&lt;br /&gt;        &lt;OL&gt;       &lt;!--   (set item[2] to 0        --&gt;&lt;br /&gt;          &lt;LI&gt;item &lt;!--    increment item[2] (= 1) --&gt;&lt;br /&gt;        &lt;/OL&gt;      &lt;!--   )                        --&gt;&lt;br /&gt;        &lt;OL&gt;       &lt;!--   (set item[3] to 0        --&gt;&lt;br /&gt;          &lt;LI&gt;     &lt;!--    increment item[3] (= 1) --&gt;&lt;br /&gt;        &lt;/OL&gt;      &lt;!--   )                        --&gt;&lt;br /&gt;      &lt;LI&gt;item     &lt;!--   increment item[1] (= 4)  --&gt;&lt;br /&gt;    &lt;/OL&gt;          &lt;!--  )                         --&gt;&lt;br /&gt;  &lt;LI&gt;item         &lt;!--  increment item[0] (= 3)   --&gt;&lt;br /&gt;  &lt;LI&gt;item         &lt;!--  increment item[0] (= 4)   --&gt;&lt;br /&gt;&lt;/OL&gt;              &lt;!-- )                          --&gt;&lt;br /&gt;&lt;OL&gt;               &lt;!-- (reset item[4] to 0        --&gt;&lt;br /&gt;  &lt;LI&gt;item         &lt;!--  increment item[4] (= 1)   --&gt;&lt;br /&gt;  &lt;LI&gt;item         &lt;!--  increment item[4] (= 2)   --&gt;&lt;br /&gt;&lt;/OL&gt;              &lt;!-- )                          --&gt;&lt;br /&gt;&lt;br /&gt;The 'counters()' function generates a string composed of the values of all counters with the same name, separated by a given string. &lt;br /&gt;&lt;br /&gt;Example(s):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The following style sheet numbers nested list items as "1", "1.1", "1.1.1", etc. &lt;br /&gt;&lt;br /&gt;OL { counter-reset: item }&lt;br /&gt;LI { display: block }&lt;br /&gt;LI:before { content: counters(item, "."); counter-increment: item }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-6366036999512912656?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/6366036999512912656/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=6366036999512912656' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6366036999512912656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6366036999512912656'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/nested-counters-and-scope.html' title='Nested counters and scope'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-4483785848446242067</id><published>2008-03-14T11:51:00.001-07:00</published><updated>2008-03-14T11:51:29.418-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS Text'/><title type='text'>Automatic counters and numbering</title><content type='html'>Automatic numbering in CSS2 is controlled with two properties, 'counter-increment' and 'counter-reset'. The counters defined by these properties are used with the counter() and counters() functions of the the 'content' property. &lt;br /&gt;&lt;br /&gt;'counter-reset' &lt;br /&gt;Value:   [ &lt;identifier&gt; &lt;integer&gt;? ]+ | none | inherit  &lt;br /&gt;Initial:   none  &lt;br /&gt;Applies to:   all elements  &lt;br /&gt;Inherited:   no  &lt;br /&gt;Percentages:   N/A  &lt;br /&gt;Media:   all  &lt;br /&gt;&lt;br /&gt;'counter-increment' &lt;br /&gt;Value:   [ &lt;identifier&gt; &lt;integer&gt;? ]+ | none | inherit  &lt;br /&gt;Initial:   none  &lt;br /&gt;Applies to:   all elements  &lt;br /&gt;Inherited:   no  &lt;br /&gt;Percentages:   N/A  &lt;br /&gt;Media:   all  &lt;br /&gt;&lt;br /&gt;The 'counter-increment' property accepts one or more names of counters (identifiers), each one optionally followed by an integer. The integer indicates by how much the counter is incremented for every occurrence of the element. The default increment is 1. Zero and negative integers are allowed. &lt;br /&gt;&lt;br /&gt;The 'counter-reset' property also contains a list of one or more names of counters, each one optionally followed by an integer. The integer gives the value that the counter is set to on each occurrence of the element. The default is 0. &lt;br /&gt;&lt;br /&gt;If 'counter-increment' refers to a counter that is not in the scope (see below) of any 'counter-reset', the counter is assumed to have been reset to 0 by the root element. &lt;br /&gt;&lt;br /&gt;Example(s):&lt;br /&gt;&lt;br /&gt;This example shows a way to number chapters and sections with "Chapter 1", "1.1", "1.2", etc. &lt;br /&gt;&lt;br /&gt;H1:before {&lt;br /&gt;    content: "Chapter " counter(chapter) ". ";&lt;br /&gt;    counter-increment: chapter;  /* Add 1 to chapter */&lt;br /&gt;    counter-reset: section;      /* Set section to 0 */&lt;br /&gt;}&lt;br /&gt;H2:before {&lt;br /&gt;    content: counter(chapter) "." counter(section) " ";&lt;br /&gt;    counter-increment: section;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If an element increments/resets a counter and also uses it (in the 'content' property of its :before or :after pseudo-element), the counter is used after being incremented/reset. &lt;br /&gt;&lt;br /&gt;If an element both resets and increments a counter, the counter is reset first and then incremented. &lt;br /&gt;&lt;br /&gt;The 'counter-reset' property follows the cascading rules. Thus, due to cascading, the following style sheet:&lt;br /&gt;&lt;br /&gt;H1 { counter-reset: section -1 }&lt;br /&gt;H1 { counter-reset: imagenum 99 }&lt;br /&gt;&lt;br /&gt;will only reset 'imagenum'. To reset both counters, they have to be specified together:&lt;br /&gt;&lt;br /&gt;H1 { counter-reset: section -1 imagenum 99 }&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-4483785848446242067?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/4483785848446242067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=4483785848446242067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4483785848446242067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4483785848446242067'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/automatic-counters-and-numbering.html' title='Automatic counters and numbering'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2345893496374686095</id><published>2008-03-14T11:50:00.001-07:00</published><updated>2008-03-14T11:50:59.204-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>The 'content' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'content'"&gt;&lt;a class="propdef-title" name="propdef-content"&gt;&lt;strong&gt;'content'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;[ &lt;a class="noxref" href="syndata.html#value-def-string"&gt;&lt;span class="value-inst-string"&gt;&lt;string&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="syndata.html#value-def-uri"&gt;&lt;span class="value-inst-uri"&gt;&lt;uri&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="syndata.html#value-def-counter"&gt;&lt;span class="value-inst-counter"&gt;&lt;counter&gt;&lt;/span&gt;&lt;/a&gt; | attr(X) | open-quote |  close-quote | no-open-quote | no-close-quote ]+ | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;empty string  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;:before and :after pseudo-elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;no  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#all-media-group"&gt;all&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property is used with the :before and :after pseudo-elements to generate  content in a document. Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-string" name="x9"&gt;&lt;span class="value-inst-string"&gt;&lt;strong&gt;&lt;string&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;Text content (see the section on &lt;a href="syndata.html#strings"&gt;strings&lt;/a&gt;).  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-uri" name="x10"&gt;&lt;span class="value-inst-uri"&gt;&lt;strong&gt;&lt;uri&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;The value is a URI that designates an external resource. If a user agent  cannot support the resource because of the &lt;a href="media.html"&gt;media types&lt;/a&gt;  it supports, it must ignore the resource. &lt;strong&gt;Note.&lt;/strong&gt; CSS2 offers no  mechanism to change the size of the embedded object, or to provide a textual  description, like the "alt" or "longdesc" attributes do for images in HTML. This  may change in future levels of CSS.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-counter" name="x11"&gt;&lt;span class="value-inst-counter"&gt;&lt;strong&gt;&lt;counter&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;&lt;a href="syndata.html#counter"&gt;Counters&lt;/a&gt; may be specified with two  different functions: 'counter()' or 'counters()'. The former has two forms:  'counter(&lt;var&gt;name&lt;/var&gt;)' or 'counter(&lt;var&gt;name&lt;/var&gt;, &lt;var&gt;style&lt;/var&gt;)'. The  generated text is the value of the named counter at this point in the formatting  structure; it is formatted in the indicated &lt;a href="#counter-styles"&gt;style&lt;/a&gt;  ('decimal' by default). The latter function also has two forms:  'counter(&lt;var&gt;name&lt;/var&gt;, &lt;var&gt;string&lt;/var&gt;)' or 'counter(&lt;var&gt;name&lt;/var&gt;,  &lt;var&gt;string&lt;/var&gt;, &lt;var&gt;style&lt;/var&gt;)'. The generated text is the value of all  counters with the given name at this point in the formatting structure,  separated by the specified string. The counters are rendered in the indicated &lt;a href="#counter-styles"&gt;style&lt;/a&gt; ('decimal' by default). See the section on &lt;a href="#counters"&gt;automatic counters and numbering&lt;/a&gt; for more information.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title="open-quote"&gt;&lt;a class="noxref" href="generate.html#value-def-open-quote" name="x12"&gt;&lt;span class="value-inst-open-quote"&gt;&lt;strong&gt;open-quote&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; and  &lt;span class="index-inst" title="close-quote"&gt;&lt;a class="noxref" href="generate.html#value-def-close-quote" name="x13"&gt;&lt;span class="value-inst-close-quote"&gt;&lt;strong&gt;close-quote&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;These values are replaced by the appropriate string from the &lt;a class="noxref" href="generate.html#propdef-quotes"&gt;&lt;span class="propinst-quotes"&gt;&lt;strong&gt;'quotes'&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt; property.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title="no-open-quote"&gt;&lt;a class="noxref" href="generate.html#value-def-no-open-quote" name="x14"&gt;&lt;span class="value-inst-no-open-quote"&gt;&lt;strong&gt;no-open-quote&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  and &lt;span class="index-inst" title="no-close-quote"&gt;&lt;a class="noxref" href="generate.html#value-def-no-close-quote" name="x15"&gt;&lt;span class="value-inst-no-close-quote"&gt;&lt;strong&gt;no-close-quote&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;   &lt;/dt&gt;&lt;dd&gt;Inserts nothing (the empty string), but increments (decrements) the level of  nesting for quotes.  &lt;/dd&gt;&lt;dt&gt;&lt;a name="x16"&gt;&lt;span class="index-def" title="attr()"&gt;&lt;strong&gt;attr(X)&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;  &lt;/dt&gt;&lt;dd&gt;This function returns as a string the value of attribute X for the subject  of the selector. The string is not parsed by the CSS processor. If the subject  of the selector doesn't have an attribute X, an empty string is returned. The  case-sensitivity of attribute names depends on the document language.  &lt;strong&gt;Note.&lt;/strong&gt; In CSS2, it is not possible to refer to attribute values  for other elements of the selector. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; property controls whether the  content is placed in a block, inline, or marker box.  &lt;/p&gt;&lt;p&gt;Authors should put &lt;a class="noxref" href="generate.html#propdef-content"&gt;&lt;span class="propinst-content"&gt;'content'&lt;/span&gt;&lt;/a&gt; declarations in &lt;span class="index-inst" title="@media"&gt;&lt;a href="media.html#at-media-rule" name="x17"&gt;@media&lt;/a&gt;&lt;/span&gt; rules when the content is media-sensitive. For  instance, literal text may be used for any media group, but images only apply to  the visual + bitmap media groups, and sound files only apply to the aural media  group.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The following rule causes a sound file to be played at the end of a quotation  (see the section on &lt;a href="aural.html"&gt;aural style sheets&lt;/a&gt; for additional  mechanisms):&lt;/p&gt;&lt;pre&gt;@media aural {&lt;br /&gt;  BLOCKQUOTE:after { content: url("beautiful-music.wav") }&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The next rule inserts the text of the HTML "alt" attribute before the image.  If the image is not displayed, the reader will still see the "alt" text. &lt;/p&gt;&lt;pre&gt;IMG:before { content: attr(alt) }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Authors may include newlines in the generated content by writing the "\A"  escape sequence in one of the strings after the &lt;a class="noxref" href="generate.html#propdef-content"&gt;&lt;span class="propinst-content"&gt;'content'&lt;/span&gt;&lt;/a&gt; property. This inserts a &lt;a name="x18"&gt;&lt;span class="index-def" title="forced line break"&gt;&lt;dfn&gt;forced line  break&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt;, similar to the BR element in HTML. See &lt;a href="syndata.html#strings"&gt;"Strings"&lt;/a&gt; and &lt;a href="syndata.html#escaped-characters"&gt;"Characters and case"&lt;/a&gt; for more  information on the "\A" escape sequence.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;pre&gt;H1:before {&lt;br /&gt;   display: block;&lt;br /&gt;   text-align: center;&lt;br /&gt;   content: "chapter\A hoofdstuk\A chapitre"&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Generated content does not alter the document tree. In particular, it is not  fed back to the document language processor (e.g., for reparsing).  &lt;/p&gt;&lt;div class="note"&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; In future levels of CSS, the &lt;a class="noxref" href="generate.html#propdef-content"&gt;&lt;span class="propinst-content"&gt;'content'&lt;/span&gt;&lt;/a&gt; property may accept additional  values, allowing it to vary the style of pieces of the generated content, but in  CSS2, all the content of the :before or :after pseudo-element has the same  style. &lt;/em&gt;&lt;/p&gt;&lt;/div&gt; &lt;h2&gt;12.3 &lt;a name="compact-run-in-gen"&gt;Interaction&lt;/a&gt; of :before and :after with  &lt;span class="index-inst" title="compact"&gt;&lt;a class="noxref" href="visuren.html#value-def-compact" name="x19"&gt;&lt;span class="value-inst-compact"&gt;'compact'&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; and &lt;span class="index-inst" title="run-in"&gt;&lt;a class="noxref" href="visuren.html#value-def-run-in" name="x20"&gt;&lt;span class="value-inst-run-in"&gt;'run-in'&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; elements&lt;/h2&gt; &lt;p&gt;The following cases can occur:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;&lt;strong&gt;A 'run-in' or 'compact' element has a :before pseudo-element of type  'inline':&lt;/strong&gt; the pseudo-element is taken into account when the size of the  element's box is computed (for 'compact') and is rendered inside the same block  box as the element.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;A 'run-in' or 'compact' element has an :after pseudo-element of type  'inline':&lt;/strong&gt; The rules of the previous point apply.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;A 'run-in' or 'compact' element has a :before pseudo-element of type  'block':&lt;/strong&gt; the pseudo-element is formatted as a block above the element,  and does not take part in the computation of the element's size (for 'compact').   &lt;/li&gt;&lt;li&gt;&lt;strong&gt;A 'run-in' or 'compact' element has an :after pseudo-element of type  'block':&lt;/strong&gt; both the element and its :after pseudo-element are formatted  as block boxes. The element is &lt;em&gt;not&lt;/em&gt; formatted as an inline box in its  own :after pseudo-element.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;The element following a 'run-in' or 'compact' element has a :before  of type 'block':&lt;/strong&gt; the decision how to format the 'run-in'/'compact'  element is made with respect to the block box resulting from the :before  pseudo-element.  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;The element following a 'run-in' or 'compact' element has an :before  of type 'inline':&lt;/strong&gt; the decision how to format the 'run-in'/'compact'  element depends on the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; value of the element to which the  :before is attached. &lt;/li&gt;&lt;/ol&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;Here is an example of a 'run-in' header with an :after pseudo-element,  followed by a paragraph with a :before pseudo-element. All pseudo-elements are  inline (the default) in this example. When the style sheet:&lt;/p&gt;&lt;pre&gt;H3 { display: run-in }&lt;br /&gt;H3:after { content: ": " }&lt;br /&gt;P:before { content: "... " }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;is applied to this source document:&lt;/p&gt;&lt;pre class="html-example"&gt;&lt;h3&gt;Centaurs&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;have hoofs&lt;br /&gt;&lt;p&gt;have a tail&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The visual formatting will resemble:&lt;/p&gt;&lt;pre class="none"&gt;Centaurs: ... have hoofs&lt;br /&gt;... have a tail&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;h2&gt;12.4 &lt;a name="quotes"&gt;Quotation marks&lt;/a&gt;&lt;/h2&gt; &lt;p&gt;In CSS2, authors may specify, in a style-sensitive and context-dependent  manner, how user agents should render quotation marks. The &lt;a class="noxref" href="generate.html#propdef-quotes"&gt;&lt;span class="propinst-quotes"&gt;'quotes'&lt;/span&gt;&lt;/a&gt; property specifies pairs of quotation  marks for each level of embedded quotation. The &lt;a class="noxref" href="generate.html#propdef-content"&gt;&lt;span class="propinst-content"&gt;'content'&lt;/span&gt;&lt;/a&gt; property gives access to those  quotation marks and causes them to be inserted before and after a quotation.  &lt;/p&gt;&lt;h3&gt;12.4.1 &lt;a name="quotes-specify"&gt;Specifying quotes&lt;/a&gt; with the &lt;a class="noxref" href="generate.html#propdef-quotes"&gt;&lt;span class="propinst-quotes"&gt;'quotes'&lt;/span&gt;&lt;/a&gt; property&lt;/h3&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'quotes'"&gt;&lt;a class="propdef-title" name="propdef-quotes"&gt;&lt;strong&gt;'quotes'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;[&lt;a class="noxref" href="syndata.html#value-def-string"&gt;&lt;span class="value-inst-string"&gt;&lt;string&gt;&lt;/span&gt;&lt;/a&gt; &lt;a class="noxref" href="syndata.html#value-def-string"&gt;&lt;span class="value-inst-string"&gt;&lt;string&gt;&lt;/span&gt;&lt;/a&gt;]+ | none | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;depends on user agent  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies quotation marks for any number of embedded  quotations. Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;none&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The 'open-quote' and 'close-quote' values of the &lt;a class="noxref" href="generate.html#propdef-content"&gt;&lt;span class="propinst-content"&gt;'content'&lt;/span&gt;&lt;/a&gt; property produce no quotations  marks.  &lt;/dd&gt;&lt;dt&gt;[&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-string" name="x22"&gt;&lt;span class="value-inst-string"&gt;&lt;strong&gt;&lt;string&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-string" name="x23"&gt;&lt;span class="value-inst-string"&gt;&lt;strong&gt;&lt;string&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;]+  &lt;/dt&gt;&lt;dd&gt;Values for the 'open-quote' and 'close-quote' values of the &lt;a class="noxref" href="generate.html#propdef-content"&gt;&lt;span class="propinst-content"&gt;'content'&lt;/span&gt;&lt;/a&gt; property are taken from this list of  pairs of quotation marks (opening and closing). The first (leftmost) pair  represents the outermost level of quotation, the second pair the first level of  embedding, etc. The user agent must apply the appropriate pair of quotation  marks according to the level of embedding. &lt;/dd&gt;&lt;/dl&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;For example, applying the following style sheet:&lt;/p&gt;&lt;pre class="example"&gt;/* Specify pairs of quotes for two levels in two languages */&lt;br /&gt;Q:lang(en) { quotes: '"' '"' "'" "'" }&lt;br /&gt;Q:lang(no) { quotes: "«" "»" "&lt;" "&gt;" }&lt;br /&gt;&lt;br /&gt;/* Insert quotes before and after Q element content */&lt;br /&gt;Q:before { content: open-quote }&lt;br /&gt;Q:after  { content: close-quote }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;to the following HTML fragment:&lt;/p&gt;&lt;pre class="html-example"&gt;&lt;html lang="en"&gt;&lt;br /&gt; &lt;head&gt;&lt;br /&gt; &lt;title&gt;Quotes&lt;/title&gt;&lt;br /&gt; &lt;/head&gt;&lt;br /&gt; &lt;body&gt;&lt;br /&gt;   &lt;p&gt;&lt;q&gt;Quote me!&lt;/q&gt;&lt;br /&gt; &lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;would allow a user agent to produce:&lt;/p&gt;&lt;pre class="ascii-art"&gt;"Quote me!"&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;while this HTML fragment:&lt;/p&gt;&lt;pre class="html-example"&gt;&lt;html lang="no"&gt;&lt;br /&gt; &lt;head&gt;&lt;br /&gt; &lt;title&gt;Quotes&lt;/title&gt;&lt;br /&gt; &lt;/head&gt;&lt;br /&gt; &lt;body&gt;&lt;br /&gt;   &lt;p&gt;&lt;q&gt;Trøndere gråter når &lt;q&gt;Vinsjan på kaia&lt;/q&gt; blir deklamert.&lt;/q&gt;&lt;br /&gt; &lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;would produce:&lt;/p&gt;&lt;pre class="ascii-art"&gt;«Trøndere gråter når &lt;vinsjan&gt; blir deklamert.»&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2345893496374686095?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2345893496374686095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2345893496374686095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2345893496374686095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2345893496374686095'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/content-property.html' title='The &apos;content&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-146185175050138628</id><published>2008-03-14T11:49:00.001-07:00</published><updated>2008-03-14T11:49:34.017-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>The :before and :after pseudo-elements</title><content type='html'>&lt;div class="example"&gt;&lt;p&gt;For example, the following rule inserts the string "Note: " before the  content of every P element whose "class" attribute has the value "note":&lt;/p&gt;&lt;pre&gt;P.note:before { content: "Note: " }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;The formatting objects (e.g., boxes) generated by an element include  generated content. So, for example, changing the above style sheet to:&lt;/p&gt;&lt;pre class="example"&gt;P.note:before { content: "Note: " }&lt;br /&gt;P.note        { border: solid green }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;would cause a solid green border to be rendered around the entire paragraph,  including the initial string.  &lt;/p&gt;&lt;p&gt;The :before and :after pseudo-elements &lt;a href="cascade.html#inheritance"&gt;inherit&lt;/a&gt; any inheritable properties from the  element in the document tree to which they are attached.&lt;/p&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;For example, the following rules insert an open quote mark before every Q  element. The color of the quote mark will be red, but the font will be the same  as the font of the rest of the Q element:&lt;/p&gt;&lt;pre&gt;Q:before {&lt;br /&gt; content: open-quote;&lt;br /&gt; color: red&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;In a :before or :after pseudo-element declaration, non-inherited properties  take their &lt;a href="cascade.html#initial-value"&gt;initial values&lt;/a&gt;.&lt;/p&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;So, for example, because the initial value of the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; property is 'inline', the quote in  the previous example is inserted as an inline box (i.e., on the same line as the  element's initial text content). The next example explicitly sets the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; property to 'block', so that the  inserted text becomes a block:&lt;/p&gt;&lt;pre&gt;BODY:after {&lt;br /&gt;   content: "The End";&lt;br /&gt;   display: block;&lt;br /&gt;   margin-top: 2em;&lt;br /&gt;   text-align: center;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Note that an audio user agent would speak the words "The End" after rendering  the rest of the BODY content. &lt;/p&gt;&lt;/div&gt; &lt;p&gt;User agents must ignore the following properties with :before and :after  pseudo-elements: &lt;a class="noxref" href="visuren.html#propdef-position"&gt;&lt;span class="propinst-position"&gt;'position'&lt;/span&gt;&lt;/a&gt;, &lt;a class="noxref" href="visuren.html#propdef-float"&gt;&lt;span class="propinst-float"&gt;'float'&lt;/span&gt;&lt;/a&gt;,  &lt;a href="#lists"&gt;list&lt;/a&gt; properties, and &lt;a href="tables.html"&gt;table&lt;/a&gt;  properties.  &lt;/p&gt;&lt;p&gt;The :before and :after pseudo-elements elements allow values of the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; property as follows:  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;If the &lt;a href="selector.html#subject"&gt;subject&lt;/a&gt; of the selector is a &lt;a href="visuren.html#block-level"&gt;block-level&lt;/a&gt; element, allowed values are  'none', 'inline', 'block', and 'marker'. If the value of the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; has any other value, the  pseudo-element will behave as if the value were 'block'.  &lt;/li&gt;&lt;li&gt;If the &lt;a href="selector.html#subject"&gt;subject&lt;/a&gt; of the selector is an &lt;a href="visuren.html#inline-level"&gt;inline-level&lt;/a&gt; element, allowed values are  'none' and 'inline'. If the value of the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; has any other value, the  pseudo-element will behave as if the value were 'inline'. &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/7681105400300687252-146185175050138628?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/146185175050138628/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=146185175050138628' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/146185175050138628'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/146185175050138628'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/before-and-after-pseudo-elements.html' title='The :before and :after pseudo-elements'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7635816090073014322</id><published>2008-03-14T11:48:00.001-07:00</published><updated>2008-03-14T11:48:46.107-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS - border-color</title><content type='html'>&lt;h2&gt;Description:&lt;/h2&gt; &lt;p&gt;The border-color property allows you to change the color of the border  surrounding an element. You can individually change the color of the bottom,  left, top and right sides of an element's border using the properties:&lt;/p&gt; &lt;ul&gt;&lt;li&gt; &lt;p&gt;&lt;b&gt;border-bottom-color &lt;/b&gt;changes the color of bottom border.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;b&gt;border-top-color &lt;/b&gt;changes the color of top border.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;b&gt;border-left-color &lt;/b&gt;changes the color of left border.&lt;/p&gt; &lt;/li&gt;&lt;li&gt; &lt;p&gt;&lt;b&gt;border-right-color &lt;/b&gt;changes the color of right border.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Possible Values:&lt;/h2&gt; &lt;ul&gt;&lt;li&gt;&lt;b&gt;color:&lt;/b&gt; Any valid color value.  &lt;/li&gt;&lt;li&gt;&lt;b&gt;transparent:&lt;/b&gt; Sets the border to be invisible. &lt;/li&gt;&lt;/ul&gt; &lt;h2&gt;Applies to:&lt;/h2&gt; &lt;p&gt;All the HTML elements.&lt;/p&gt; &lt;h2&gt;DOM Syntax:&lt;/h2&gt; &lt;table class="src" cellpadding="5"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;object.style.borderColor="red"; &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;h2&gt;Example:&lt;/h2&gt; &lt;p&gt;Here is the example which shows effect of all these properties:&lt;/p&gt; &lt;table class="src" cellpadding="5"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;pre&gt;&lt;style type="text/css"&gt;&lt;br /&gt;p.example1{&lt;br /&gt;  border:1px solid;&lt;br /&gt;  border-bottom-color:#009900; /* Green */&lt;br /&gt;  border-top-color:#FF0000;    /* Red */&lt;br /&gt;  border-left-color:#330000;   /* Black */&lt;br /&gt;  border-right-color:#0000CC;  /* Blue */&lt;br /&gt;}&lt;br /&gt;p.example2{&lt;br /&gt;  border:1px solid;&lt;br /&gt;  border-color:#009900;        /* Green */&lt;br /&gt;}&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;p class="example1"&gt;&lt;br /&gt;This example is showing all borders in different colors.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="example2"&gt;&lt;br /&gt;&lt;br /&gt;This example is showing all borders in green color only.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;    &lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;p&gt;This will produce following result:&lt;/p&gt; &lt;table class="src" cellpadding="5"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;p class="example1"&gt;This example is showing all borders in different colors. &lt;/p&gt; &lt;p class="example2"&gt;This example is showing all borders in green color only. &lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7635816090073014322?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7635816090073014322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7635816090073014322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7635816090073014322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7635816090073014322'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css-border-color.html' title='CSS - border-color'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7312631914860140645</id><published>2008-03-14T11:47:00.001-07:00</published><updated>2008-03-14T11:47:55.818-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS Generated Content Reference Guide</title><content type='html'>&lt;p&gt;This is a complete reference guide for web developers where haved we listed  all the CSS properties related to generated content defined in the World Wide  Web Consortium's Recommended Specification for Cascading Style Sheets, Level  2&lt;/p&gt; &lt;p&gt;Click any property to see its description with examples:&lt;/p&gt; &lt;table border="1" cellpadding="3" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th&gt;Property&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="css_content.html"&gt;content&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Inserts generated content around an element. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="css_counter-increment.html"&gt;counter-increment&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Increments a counter by 1; value is a list of counter names, with each name  optionally followed by a value by which it is incremented. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="css_counter-reset.html"&gt;counter-reset&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Resets a counter to zero; value is a list of counter names, with each name  optionally followed by a value to which it is reset. &lt;/td&gt;&lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;a href="css_quotes.html"&gt;quotes&lt;/a&gt;&lt;/td&gt; &lt;td&gt;Sets the quote symbols used to quote text &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7312631914860140645?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7312631914860140645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7312631914860140645' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7312631914860140645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7312631914860140645'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css-generated-content-reference-guide.html' title='CSS Generated Content Reference Guide'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-5852074703979706937</id><published>2008-03-14T11:45:00.001-07:00</published><updated>2008-03-14T11:45:36.606-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Whitespace: the 'white-space' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'white-space'"&gt;&lt;a class="propdef-title" name="propdef-white-space"&gt;&lt;strong&gt;'white-space'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | pre | nowrap | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;block-level elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property declares how &lt;a href="syndata.html#whitespace"&gt;whitespace&lt;/a&gt;  inside the element is handled. Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;normal&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;This value directs user agents to collapse sequences of whitespace, and  break lines as necessary to fill line boxes. Additional line breaks may be  created by occurrences of "\A" in generated content (e.g., for the BR element in  HTML).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;pre&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;This value prevents user agents from collapsing sequences of whitespace.  Lines are only broken at newlines in the source, or at occurrences of "\A" in  generated content.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;nowrap&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;This value collapses whitespace as for 'normal', but suppresses line breaks  within text except for those created by "\A" in generated content (e.g., for the  BR element in HTML). &lt;/dd&gt;&lt;/dl&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The following examples show what &lt;a href="syndata.html#whitespace"&gt;whitespace&lt;/a&gt; behavior is expected from the PRE  and P elements, and the "nowrap" attribute in HTML. &lt;/p&gt;&lt;pre&gt;PRE        { white-space: pre }&lt;br /&gt;P          { white-space: normal }&lt;br /&gt;TD[nowrap] { white-space: nowrap }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-5852074703979706937?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/5852074703979706937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=5852074703979706937' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5852074703979706937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5852074703979706937'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/whitespace-white-space-property.html' title='Whitespace: the &apos;white-space&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-8872830619475788730</id><published>2008-03-14T11:44:00.001-07:00</published><updated>2008-03-14T11:44:56.053-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS Text'/><title type='text'>Capitalization: the 'text-transform' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'text-transform'"&gt;&lt;a class="propdef-title" name="propdef-text-transform"&gt;&lt;strong&gt;'text-transform'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;capitalize | uppercase | lowercase | none | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property controls capitalization effects of an element's text. Values  have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;capitalize&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Puts the first character of each word in uppercase.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;uppercase&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Puts all characters of each word in uppercase.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;lowercase&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Puts all characters of each word in lowercase.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;none&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;No capitalization effects. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The actual transformation in each case is written language dependent. See RFC  2070 (&lt;a class="noxref" href="refs.html#ref-RFC2070" rel="biblioentry"&gt;&lt;span class="normref"&gt;[RFC2070]&lt;/span&gt;&lt;/a&gt;) for ways to find the language of an element.   &lt;/p&gt;&lt;p&gt;&lt;span class="index-inst" title="conformance"&gt;&lt;a href="conform.html#conformance" name="x17"&gt;Conforming user agents&lt;/a&gt;&lt;/span&gt; may consider the value of &lt;a class="noxref" href="text.html#propdef-text-transform"&gt;&lt;span class="propinst-text-transform"&gt;'text-transform'&lt;/span&gt;&lt;/a&gt; to be 'none' for  characters that are not from the Latin-1 repertoire and for elements in  languages for which the transformation is different from that specified by the  case-conversion tables of ISO 10646 (&lt;a class="noxref" href="refs.html#ref-ISO10646" rel="biblioentry"&gt;&lt;span class="normref"&gt;[ISO10646]&lt;/span&gt;&lt;/a&gt;).  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;In this example, all text in an H1 element is transformed to uppercase text. &lt;/p&gt;&lt;pre&gt;H1 { text-transform: uppercase }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-8872830619475788730?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/8872830619475788730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=8872830619475788730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8872830619475788730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8872830619475788730'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/capitalization-text-transform-property.html' title='Capitalization: the &apos;text-transform&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-5433519021640487949</id><published>2008-03-14T11:43:00.002-07:00</published><updated>2008-03-14T11:44:17.511-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Letter and word spacing: the 'letter-spacing' and 'word-spacing' properties</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'letter-spacing'"&gt;&lt;a class="propdef-title" name="propdef-letter-spacing"&gt;&lt;strong&gt;'letter-spacing'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies spacing behavior between text characters. Values have  the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;normal&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The spacing is the normal spacing for the current font. This value allows  the user agent to alter the space between characters in order to justify text.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-length" name="x10"&gt;&lt;span class="value-inst-length"&gt;&lt;strong&gt;&lt;length&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;This value indicates inter-character space &lt;em&gt;in addition to&lt;/em&gt; the  default space between characters. Values may be negative, but there may be  implementation-specific limits. User agents may not further increase or decrease  the inter-character space in order to justify text. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Character spacing algorithms are user agent-dependent. Character spacing may  also be influenced by justification (see the &lt;a class="noxref" href="text.html#propdef-text-align"&gt;&lt;span class="propinst-text-align"&gt;'text-align'&lt;/span&gt;&lt;/a&gt; property).  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;In this example, the space between characters in BLOCKQUOTE elements is  increased by '0.1em'. &lt;/p&gt;&lt;pre&gt;BLOCKQUOTE { letter-spacing: 0.1em }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;In the following example, the user agent is not permitted to alter  inter-character space:&lt;/p&gt;&lt;pre&gt;BLOCKQUOTE { letter-spacing: 0cm }   /* Same as '0' */&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;When the resultant space between two characters is not the same as the  default space, user agents should not use &lt;a name="x11"&gt;&lt;span class="index-inst" title="ligatures"&gt;ligatures.&lt;/span&gt;&lt;/a&gt;  &lt;/p&gt;&lt;p&gt;&lt;span class="index-inst" title="conformance"&gt;&lt;a href="conform.html#conformance" name="x12"&gt;Conforming user agents&lt;/a&gt;&lt;/span&gt; may consider the value of the &lt;a class="noxref" href="text.html#propdef-letter-spacing"&gt;&lt;span class="propinst-letter-spacing"&gt;'letter-spacing'&lt;/span&gt;&lt;/a&gt; property to be  'normal'.  &lt;/p&gt;&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'word-spacing'"&gt;&lt;a class="propdef-title" name="propdef-word-spacing"&gt;&lt;strong&gt;'word-spacing'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies spacing behavior between words. Values have the  following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;normal&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The normal inter-word space, as defined by the current font and/or the UA.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-length" name="x14"&gt;&lt;span class="value-inst-length"&gt;&lt;strong&gt;&lt;length&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;This value indicates inter-word space &lt;em&gt;in addition to&lt;/em&gt; the default  space between words. Values may be negative, but there may be  implementation-specific limits. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Word spacing algorithms are user agent-dependent. Word spacing is also  influenced by justification (see the &lt;a class="noxref" href="text.html#propdef-text-align"&gt;&lt;span class="propinst-text-align"&gt;'text-align'&lt;/span&gt;&lt;/a&gt; property).  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;In this example, the word-spacing between each word in H1 elements is  increased by '1em'. &lt;/p&gt;&lt;pre&gt;H1 { word-spacing: 1em }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;&lt;span class="index-inst" title="conformance"&gt;&lt;a href="conform.html#conformance" name="x15"&gt;Conforming user agents&lt;/a&gt;&lt;/span&gt; may consider the value of the &lt;a class="noxref" href="text.html#propdef-word-spacing"&gt;&lt;span class="propinst-word-spacing"&gt;'word-spacing'&lt;/span&gt;&lt;/a&gt; property to be 'normal'.  &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-5433519021640487949?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/5433519021640487949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=5433519021640487949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5433519021640487949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5433519021640487949'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/letter-and-word-spacing-letter-spacing.html' title='Letter and word spacing: the &apos;letter-spacing&apos; and &apos;word-spacing&apos; properties'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-5624313327351385219</id><published>2008-03-14T11:43:00.001-07:00</published><updated>2008-03-14T11:43:42.434-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Text shadows: the 'text-shadow' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'text-shadow'"&gt;&lt;a class="propdef-title" name="propdef-text-shadow"&gt;&lt;strong&gt;'text-shadow'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none | [&lt;a class="noxref" href="syndata.html#value-def-color"&gt;&lt;span class="value-inst-color"&gt;&lt;color&gt;&lt;/span&gt;&lt;/a&gt; || &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt;? ,]* [&lt;a class="noxref" href="syndata.html#value-def-color"&gt;&lt;span class="value-inst-color"&gt;&lt;color&gt;&lt;/span&gt;&lt;/a&gt; || &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt;?] | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;no (see prose)  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property accepts a comma-separated list of shadow effects to be applied  to the text of the element. The shadow effects are applied in the order  specified and may thus overlay each other, but they will never overlay the text  itself. Shadow effects do not alter the size of a box, but may extend beyond its  boundaries. The &lt;a href="visuren.html#stack-level"&gt;stack level&lt;/a&gt; of the shadow  effects is the same as for the element itself.  &lt;/p&gt;&lt;p&gt;Each shadow effect must specify a shadow offset and may optionally specify a  blur radius and a shadow color.  &lt;/p&gt;&lt;p&gt;A shadow offset is specified with two &lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-length" name="x8"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt; values  that indicate the distance from the text. The first length value specifies the  horizontal distance to the right of the text. A negative horizontal length value  places the shadow to the left of the text. The second length value specifies the  vertical distance below the text. A negative vertical length value places the  shadow above the text.  &lt;/p&gt;&lt;p&gt;A blur radius may optionally be specified after the shadow offset. The blur  radius is a length value that indicates the boundaries of the blur effect. The  exact algorithm for computing the blur effect is not specified.  &lt;/p&gt;&lt;p&gt;A color value may optionally be specified before or after the length values  of the shadow effect. The color value will be used as the basis for the shadow  effect. If no color is specified, the value of the &lt;a class="noxref" href="colors.html#propdef-color"&gt;&lt;span class="propinst-color"&gt;'color'&lt;/span&gt;&lt;/a&gt;  property will be used instead.  &lt;/p&gt;&lt;p&gt;Text shadows may be used with the &lt;a href="selector.html#first-letter"&gt;:first-letter&lt;/a&gt; and &lt;a href="selector.html#first-line"&gt;:first-line&lt;/a&gt; pseudo-elements.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The example below will set a text shadow to the right and below the element's  text. Since no color has been specified, the shadow will have the same color as  the element itself, and since no blur radius is specified, the text shadow will  not be blurred:&lt;/p&gt;&lt;pre&gt;H1 { text-shadow: 0.2em 0.2em }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The next example will place a shadow to the right and below the element's  text. The shadow will have a 5px blur radius and will be red. &lt;/p&gt;&lt;pre&gt;H2 { text-shadow: 3px 3px 5px red }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The next example specifies a list of shadow effects. The first shadow will be  to the right and below the element's text and will be red with no blurring. The  second shadow will overlay the first shadow effect, and it will be yellow,  blurred, and placed to the left and below the text. The third shadow effect will  be placed to the right and above the text. Since no shadow color is specified  for the third shadow effect, the value of the element's &lt;a class="noxref" href="colors.html#propdef-color"&gt;&lt;span class="propinst-color"&gt;'color'&lt;/span&gt;&lt;/a&gt;  property will be used:&lt;/p&gt;&lt;pre&gt;H2 { text-shadow: 3px 3px red, yellow -3px 3px 2px, 3px -3px }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;Consider this example: &lt;/p&gt;&lt;pre&gt;SPAN.glow {&lt;br /&gt;   background: white;&lt;br /&gt;   color: white;&lt;br /&gt;   text-shadow: black 0px 0px 5px;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Here, the &lt;a class="noxref" href="colors.html#propdef-background"&gt;&lt;span class="propinst-background"&gt;'background'&lt;/span&gt;&lt;/a&gt; and &lt;a class="noxref" href="colors.html#propdef-color"&gt;&lt;span class="propinst-color"&gt;'color'&lt;/span&gt;&lt;/a&gt;  properties have the same value and the &lt;a class="noxref" href="text.html#propdef-text-shadow"&gt;&lt;span class="propinst-text-shadow"&gt;'text-shadow'&lt;/span&gt;&lt;/a&gt; property is used to create a  "solar eclipse" effect:&lt;/p&gt; &lt;p&gt;&lt;img alt="Solar eclipse effect" src="images/eclipse-outline.gif" /&gt;&lt;span class="dlink"&gt;   &lt;a title="Long description of text shadow example" href="images/longdesc/eclipse-outline-desc.html" name="img-eclipse-outline"&gt;[D]&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;div class="note"&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; This property is not defined in CSS1. Some shadow  effects (such as the one in the last example) may render text invisible in UAs  that only support CSS1. &lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-5624313327351385219?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/5624313327351385219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=5624313327351385219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5624313327351385219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5624313327351385219'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/text-shadows-text-shadow-property.html' title='Text shadows: the &apos;text-shadow&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-6448174629134255227</id><published>2008-03-14T11:42:00.000-07:00</published><updated>2008-03-14T11:43:06.077-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS3 Decoration</title><content type='html'>&lt;h3&gt;16.3.1 &lt;a name="lining-striking-props"&gt;Underlining, overlining, striking, and  blinking&lt;/a&gt;: the &lt;a class="noxref" href="text.html#propdef-text-decoration"&gt;&lt;span class="propinst-text-decoration"&gt;'text-decoration'&lt;/span&gt;&lt;/a&gt; property&lt;/h3&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'text-decoration'"&gt;&lt;a class="propdef-title" name="propdef-text-decoration"&gt;&lt;strong&gt;'text-decoration'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none | [ underline || overline || line-through || blink ] | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;no (see prose)  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property describes decorations that are added to the text of an element.  If the property is specified for a &lt;a href="visuren.html#block-level"&gt;block-level&lt;/a&gt; element, it affects all  inline-level descendants of the element. If it is specified for (or affects) an  &lt;a href="visuren.html#inline-level"&gt;inline-level&lt;/a&gt; element, it affects all  boxes generated by the element. If the element has no content or no text content  (e.g., the IMG element in HTML), user agents must &lt;a href="syndata.html#ignore"&gt;ignore&lt;/a&gt; this property.  &lt;/p&gt;&lt;p&gt;Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;none&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Produces no text decoration.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;underline&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Each line of text is underlined.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;overline&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Each line of text has a line above it.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;line-through&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Each line of text has a line through the middle  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;blink&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text blinks (alternates between visible and invisible). &lt;a href="conform.html#conformance"&gt;Conforming user agents&lt;/a&gt; are not required to  support this value. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The color(s) required for the text decoration should be derived from the &lt;a class="noxref" href="colors.html#propdef-color"&gt;&lt;span class="propinst-color"&gt;'color'&lt;/span&gt;&lt;/a&gt; property value.  &lt;/p&gt;&lt;p&gt;This property is not inherited, but descendant boxes of a block box should be  formatted with the same decoration (e.g., they should all be underlined). The  color of decorations should remain the same even if descendant elements have  different &lt;a class="noxref" href="colors.html#propdef-color"&gt;&lt;span class="propinst-color"&gt;'color'&lt;/span&gt;&lt;/a&gt; values.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;In the following example for HTML, the text content of all A elements acting  as hyperlinks will be underlined:&lt;/p&gt;&lt;pre&gt;A[href] { text-decoration: underline }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-6448174629134255227?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/6448174629134255227/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=6448174629134255227' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6448174629134255227'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6448174629134255227'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css3-decoration.html' title='CSS3 Decoration'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-5615203625139765452</id><published>2008-03-14T11:41:00.002-07:00</published><updated>2008-03-14T11:42:21.487-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Alignment: the 'text-align' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'text-align'"&gt;&lt;a class="propdef-title" name="propdef-text-align"&gt;&lt;strong&gt;'text-align'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;left | right | center | justify | &lt;a class="noxref" href="syndata.html#value-def-string"&gt;&lt;span class="value-inst-string"&gt;&lt;string&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;depends on user agent and writing direction  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;block-level elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property describes how inline content of a block is aligned. Values have  the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;left&lt;/strong&gt;, &lt;strong&gt;right&lt;/strong&gt;, &lt;strong&gt;center&lt;/strong&gt;, and  &lt;strong&gt;justify&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Left, right, center, and double justify text, respectively.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-string" name="x4"&gt;&lt;span class="value-inst-string"&gt;&lt;strong&gt;&lt;string&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies a string on which cells in a table column will align (see the  section on &lt;a href="tables.html#column-alignment"&gt;horizontal alignment in a  column&lt;/a&gt; for details and an example). This value applies &lt;em&gt;only&lt;/em&gt; to &lt;a href="tables.html"&gt;table&lt;/a&gt; cells. If set on other elements, it will be treated  as 'left' or 'right', depending on whether &lt;a class="noxref" href="visuren.html#propdef-direction"&gt;&lt;span class="propinst-direction"&gt;'direction'&lt;/span&gt;&lt;/a&gt; is 'ltr', or 'rtl',  respectively. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;A block of text is a stack of &lt;a href="visuren.html#line-box"&gt;line boxes&lt;/a&gt;.  In the case of 'left', 'right' and 'center', this property specifies how the  inline boxes within each line box align with respect to the line box's left and  right sides; alignment is not with respect to the &lt;a href="visuren.html#viewport"&gt;viewport&lt;/a&gt;. In the case of 'justify', the UA may  stretch the inline boxes in addition to adjusting their positions. (See also &lt;a class="noxref" href="text.html#propdef-letter-spacing"&gt;&lt;span class="propinst-letter-spacing"&gt;'letter-spacing'&lt;/span&gt;&lt;/a&gt; and &lt;a class="noxref" href="text.html#propdef-word-spacing"&gt;&lt;span class="propinst-word-spacing"&gt;'word-spacing'&lt;/span&gt;&lt;/a&gt;.)  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;In this example, note that since &lt;a class="noxref" href="text.html#propdef-text-align"&gt;&lt;span class="propinst-text-align"&gt;'text-align'&lt;/span&gt;&lt;/a&gt; is inherited, all block-level  elements inside the DIV element with 'class=center' will have their inline  content centered. &lt;/p&gt;&lt;pre&gt;DIV.center { text-align: center }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="note"&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; The actual justification algorithm used is  user-agent and written language dependent.&lt;/em&gt;  &lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span class="index-inst" title="conformance"&gt;&lt;a href="conform.html#conformance" name="x5"&gt;Conforming user agents&lt;/a&gt;&lt;/span&gt; may  interpret the value 'justify' as 'left' or 'right', depending on whether the  element's default writing direction is left-to-right or right-to-left,  respectively.&lt;/em&gt; &lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-5615203625139765452?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/5615203625139765452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=5615203625139765452' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5615203625139765452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5615203625139765452'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/alignment-text-align-property.html' title='Alignment: the &apos;text-align&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7616256661524667288</id><published>2008-03-14T11:41:00.001-07:00</published><updated>2008-03-14T11:41:40.017-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Indentation: the 'text-indent' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'text-indent'"&gt;&lt;a class="propdef-title" name="propdef-text-indent"&gt;&lt;strong&gt;'text-indent'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="syndata.html#value-def-percentage"&gt;&lt;span class="value-inst-percentage"&gt;&lt;percentage&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;0  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;block-level elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;refer to width of containing block  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies the indentation of the first line of text in a block.  More precisely, it specifies the indentation of the first box that flows into  the block's first &lt;a href="visuren.html#line-box"&gt;line box&lt;/a&gt;. The box is  indented with respect to the left (or right, for right-to-left layout) edge of  the line box. User agents should render this indentation as blank space.  &lt;/p&gt;&lt;p&gt;Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-length" name="x1"&gt;&lt;span class="value-inst-length"&gt;&lt;strong&gt;&lt;length&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;The indentation is a fixed length.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-percentage" name="x2"&gt;&lt;span class="value-inst-percentage"&gt;&lt;strong&gt;&lt;percentage&gt;&lt;/strong&gt;  &lt;/span&gt;&lt;/a&gt;&lt;/span&gt; &lt;/dt&gt;&lt;dd&gt;The indentation is a percentage of the containing block width. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The value of &lt;a class="noxref" href="text.html#propdef-text-indent"&gt;&lt;span class="propinst-text-indent"&gt;'text-indent'&lt;/span&gt;&lt;/a&gt; may be negative, but there  may be implementation-specific limits.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The following example causes a '3em' text indent. &lt;/p&gt;&lt;pre&gt;  P { text-indent: 3em }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7616256661524667288?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7616256661524667288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7616256661524667288' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7616256661524667288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7616256661524667288'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/indentation-text-indent-property.html' title='Indentation: the &apos;text-indent&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3272719612531395285</id><published>2008-03-14T11:40:00.001-07:00</published><updated>2008-03-14T11:40:51.295-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Semantic changes from CSS1</title><content type='html'>&lt;p&gt;While all CSS1 style sheets are valid CSS2 style sheets, there are a few  cases where the CSS1 style sheet will have a different meaning when interpreted  as a CSS2 style sheet. Most changes are due to implementation experience feeding  back into the specification, but there are also some error corrections.  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;The meaning of "!important" has been changed. In CSS1, "!important" in an  author's style sheet took precedence over one in a user style sheet. This has  been reversed in CSS2.  &lt;/li&gt;&lt;li&gt;In CSS2 &lt;a href="syndata.html#color-units"&gt;color values&lt;/a&gt; are clipped with  regard to the device gamut, not with regard to the sRGB gamut as in CSS1.  &lt;/li&gt;&lt;li&gt;CSS1 simply said that 'margin-right' was ignored if the both 'margin-left'  and 'width' were set. In CSS2 the choice between relaxing 'margin-right' or  'margin-left' depends on the writing direction.  &lt;/li&gt;&lt;li&gt;In CSS1, several properties (e.g., 'padding') had values referring to the  width of the parent element. This was an error; the value should always refer to  the width of a block-level element and this specification reflects this by  introducing the term "containing block".  &lt;/li&gt;&lt;li&gt;The initial value of 'display' is 'inline' in CSS2, not 'block' as in CSS1.  &lt;/li&gt;&lt;li&gt;In CSS1, the 'clear' property applied to all elements. This was an error,  and the property only applies to block-level elements in CSS2.  &lt;/li&gt;&lt;li&gt;In CSS1, &lt;a name="x0"&gt;&lt;span class="index-inst" title="pseudo-classes:::link|:link|link (pseudo-class)"&gt;':link'&lt;/span&gt;&lt;/a&gt;,  &lt;a name="x3"&gt;&lt;span class="index-inst" title="pseudo-classes:::visited|:visited|visited (pseudo-class)"&gt;':visited'&lt;/span&gt;&lt;/a&gt;  and &lt;a name="x6"&gt;&lt;span class="index-inst" title="pseudo-classes:::active|:active|active (pseudo-class)"&gt;':active'&lt;/span&gt;&lt;/a&gt;  were mutually exclusive; in CSS2, &lt;a href="selector.html#dynamic-pseudo-classes"&gt;':active'&lt;/a&gt; can occur together  with &lt;a href="selector.html#link-pseudo-classes"&gt;':link' or ':visited'&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;The suggested scaling factor between adjacent &lt;a class="noxref" href="fonts.html#propdef-font-size"&gt;&lt;span class="propinst-font-size"&gt;'font-size'&lt;/span&gt;&lt;/a&gt; indexes in the table of font  sizes has been reduced from 1.5 to 1.2.  &lt;/li&gt;&lt;li&gt;The computed value, not the actual value, of &lt;a class="noxref" href="fonts.html#propdef-font-size"&gt;&lt;span class="propinst-font-size"&gt;'font-size'&lt;/span&gt;&lt;/a&gt; is inherited.  &lt;/li&gt;&lt;li&gt;The CSS1 description of 'inside' (for &lt;a class="noxref" href="generate.html#propdef-list-style-position"&gt;&lt;span class="propinst-list-style-position"&gt;'list-style-position'&lt;/span&gt;&lt;/a&gt;) allowed the  interpretation that the left margin of the text was affected, rather than the  position of the bullet. In CSS2 that interpretation is ruled out.  &lt;/li&gt;&lt;li&gt;Please also consult the &lt;em&gt;normative&lt;/em&gt; section on the &lt;a href="grammar.html#tokenizer-diffs"&gt;differences between the CSS1 and CSS2  tokenizer&lt;/a&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/7681105400300687252-3272719612531395285?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3272719612531395285/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3272719612531395285' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3272719612531395285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3272719612531395285'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/semantic-changes-from-css1.html' title='Semantic changes from CSS1'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3869191724395270624</id><published>2008-03-14T11:39:00.002-07:00</published><updated>2008-03-14T11:40:24.122-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS3 New functionality</title><content type='html'>&lt;p&gt;In addition to the functionality of CSS1, CSS2 supports:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;The concept of &lt;a href="media.html"&gt;media types&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;The &lt;a href="cascade.html#value-def-inherit"&gt;'inherit'&lt;/a&gt; value for all  properties.  &lt;/li&gt;&lt;li&gt;&lt;a href="page.html"&gt;Paged media&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="aural.html"&gt;Aural style sheets&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;Several internationalization features, including &lt;a href="generate.html#lists"&gt;list numbering styles&lt;/a&gt;, support for &lt;a href="visuren.html#direction"&gt;bidirectional text&lt;/a&gt;, and support for  language-sensitive &lt;a href="generate.html#quotes"&gt;quotation marks&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;&lt;a href="fonts.html#font-selection"&gt;An extended font selection&lt;/a&gt;  mechanism, including intelligent matching, synthesis, and downloadable fonts.  Also, the concept of system fonts has been is introduced, and a new property, &lt;a class="noxref" href="fonts.html#propdef-font-size-adjust"&gt;&lt;span class="propinst-font-size-adjust"&gt;'font-size-adjust'&lt;/span&gt;&lt;/a&gt;, has been added.  &lt;/li&gt;&lt;li&gt;&lt;a href="tables.html"&gt;Tables&lt;/a&gt;, including new values on &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; and &lt;a class="noxref" href="visudet.html#propdef-vertical-align"&gt;&lt;span class="propinst-vertical-align"&gt;'vertical-align'&lt;/span&gt;&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;&lt;a href="visuren.html#relative-positioning"&gt;Relative&lt;/a&gt; and &lt;a href="visuren.html#absolute-positioning"&gt;absolute positioning&lt;/a&gt;, including &lt;a href="visuren.html#fixed-positioning"&gt;fixed positioning&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;New box types (along with block and inline): &lt;a href="visuren.html#compact"&gt;compact&lt;/a&gt; and &lt;a href="visuren.html#run-in"&gt;run-in&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;The ability to control content &lt;a href="visufx.html#overflow"&gt;overflow&lt;/a&gt;,  &lt;a href="visufx.html#clipping"&gt;clipping&lt;/a&gt;, and &lt;a href="visufx.html#visibility"&gt;visibility&lt;/a&gt; in the visual formatting model.  &lt;/li&gt;&lt;li&gt;The ability to specify minimum and maximum &lt;a href="visudet.html#min-max-widths"&gt;widths&lt;/a&gt; and &lt;a href="visudet.html#min-max-heights"&gt;heights&lt;/a&gt; in the visual formatting model.  &lt;/li&gt;&lt;li&gt;An extended &lt;a href="selector.html"&gt;selector&lt;/a&gt; mechanism, including child  selectors, adjacent selectors, and attribute selectors.  &lt;/li&gt;&lt;li&gt;&lt;a href="generate.html#generated-text"&gt;Generated content&lt;/a&gt;, &lt;a href="generate.html#counters"&gt;counters and automatic numbering&lt;/a&gt;, and &lt;a href="generate.html#markers"&gt;markers&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;Text shadows, through the new &lt;a class="noxref" href="text.html#propdef-text-shadow"&gt;&lt;span class="propinst-text-shadow"&gt;'text-shadow'&lt;/span&gt;&lt;/a&gt; property.  &lt;/li&gt;&lt;li&gt;Several new &lt;a href="selector.html#pseudo-classes"&gt;pseudo-classes&lt;/a&gt;,  :first-child, :hover, :focus, :lang.  &lt;/li&gt;&lt;li&gt;System &lt;a href="ui.html#system-colors"&gt;colors&lt;/a&gt; and &lt;a href="ui.html#system-fonts"&gt;fonts&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;&lt;a href="ui.html#cursor-props"&gt;Cursors&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;&lt;a href="ui.html#dynamic-outlines"&gt;Dynamic outlines&lt;/a&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/7681105400300687252-3869191724395270624?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3869191724395270624/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3869191724395270624' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3869191724395270624'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3869191724395270624'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css3-new-functionality.html' title='CSS3 New functionality'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-1404083558561825305</id><published>2008-03-14T11:39:00.001-07:00</published><updated>2008-03-14T11:39:34.643-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='css articles'/><title type='text'>Comparison of tokenization in CSS2 and CSS1</title><content type='html'>&lt;p&gt;There are some differences in the syntax specified in the CSS1 recommendation  (&lt;a class="noxref" href="refs.html#ref-CSS1" rel="biblioentry"&gt;&lt;span class="informref"&gt;[CSS1]&lt;/span&gt;&lt;/a&gt;), and the one above. Most of these are due to  new tokens in CSS2 that didn't exist in CSS1. Others are because the grammar has  been rewritten to be more readable. However, there are some incompatible  changes, that were felt to be errors in the CSS1 syntax. They are explained  below.  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;CSS1 style sheets could only be in 1-byte-per-character encodings, such as  ASCII and ISO-8859-1. CSS2 has no such limitation. In practice, there was little  difficulty in extrapolating the CSS1 tokenizer, and some UAs have accepted  2-byte encodings.  &lt;/li&gt;&lt;li&gt;CSS1 only allowed four hex-digits after the backslash (\) to refer to  Unicode characters, CSS2 &lt;a href="syndata.html#escaped-characters"&gt;allows  six&lt;/a&gt;. Furthermore, CSS2 allows a whitespace character to delimit the escape  sequence. E.g., according to CSS1, the string "\abcdef" has 3 letters (\abcd, e,  and f), according to CSS2 it has only one (\abcdef).  &lt;/li&gt;&lt;li&gt;The tab character (ASCII 9) was not allowed in strings. However, since  strings in CSS1 were only used for font names and for URLs, the only way this  can lead to incompatibility between CSS1 and CSS2 is if a style sheet contains a  font family that has a tab in its name.  &lt;/li&gt;&lt;li&gt;Similarly, newlines (&lt;a href="syndata.html#strings"&gt;escaped with a  backslash&lt;/a&gt;) were not allowed in strings in CSS1.  &lt;/li&gt;&lt;li&gt;CSS2 parses a number immediately followed by an identifier as a DIMEN token  (i.e., an unknown unit), CSS1 parsed it as a number and an identifier. That  means that in CSS1, the declaration 'font: 10pt/1.2serif' was correct, as was  'font: 10pt/12pt serif'; in CSS2, a space is required before "serif". (Some UAs  accepted the first example, but not the second.)  &lt;/li&gt;&lt;li&gt;In CSS1, a class name could start with a digit (".55ft"), unless it was a  dimension (".55in"). In CSS2, such classes are parsed as unknown dimensions (to  allow for future additions of new units). To make ".55ft" a valid class, CSS2  requires the first digit to be escaped (".\55ft") &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/7681105400300687252-1404083558561825305?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/1404083558561825305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=1404083558561825305' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1404083558561825305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1404083558561825305'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/comparison-of-tokenization-in-css2-and.html' title='Comparison of tokenization in CSS2 and CSS1'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3184171548640125469</id><published>2008-03-14T11:38:00.002-07:00</published><updated>2008-03-14T11:39:15.315-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS3 Lexical scanner</title><content type='html'>&lt;p&gt;The following is the &lt;a name="x3"&gt;&lt;span class="index-def" title="tokenizer"&gt;tokenizer&lt;/span&gt;&lt;/a&gt;, written in Flex (see &lt;a class="noxref" href="refs.html#ref-FLEX" rel="biblioentry"&gt;&lt;span class="normref"&gt;[FLEX]&lt;/span&gt;&lt;/a&gt;)  notation. The tokenizer is case-insensitive.  &lt;/p&gt;&lt;p&gt;The two occurrences of "\377" represent the highest character number that  current versions of Flex can deal with (decimal 255). They should be read as  "\4177777" (decimal 1114111), which is the highest possible code point in &lt;a name="x4"&gt;&lt;span class="index-inst" title="unicode"&gt;Unicode&lt;/span&gt;&lt;/a&gt;/&lt;a name="x5"&gt;&lt;span class="index-inst" title="iso-10646"&gt;ISO-10646&lt;/span&gt;&lt;/a&gt;. &lt;/p&gt;&lt;pre&gt;%option case-insensitive&lt;br /&gt;&lt;br /&gt;h  [0-9a-f]&lt;br /&gt;nonascii [\200-\377]&lt;br /&gt;unicode  \\{h}{1,6}[ \t\r\n\f]?&lt;br /&gt;escape  {unicode}|\\[ -~\200-\377]&lt;br /&gt;nmstart  [a-z]|{nonascii}|{escape}&lt;br /&gt;nmchar  [a-z0-9-]|{nonascii}|{escape}&lt;br /&gt;string1  \"([\t !#$%&amp;amp;(-~]|\\{nl}|\'|{nonascii}|{escape})*\"&lt;br /&gt;string2  \'([\t !#$%&amp;amp;(-~]|\\{nl}|\"|{nonascii}|{escape})*\'&lt;br /&gt;&lt;br /&gt;ident  {nmstart}{nmchar}*&lt;br /&gt;name  {nmchar}+&lt;br /&gt;num  [0-9]+|[0-9]*"."[0-9]+&lt;br /&gt;string  {string1}|{string2}&lt;br /&gt;url  ([!#$%&amp;amp;*-~]|{nonascii}|{escape})*&lt;br /&gt;w  [ \t\r\n\f]*&lt;br /&gt;nl  \n|\r\n|\r|\f&lt;br /&gt;range  \?{1,6}|{h}(\?{0,5}|{h}(\?{0,4}|{h}(\?{0,3}|{h}(\?{0,2}|{h}(\??|{h})))))&lt;br /&gt;&lt;br /&gt;%%&lt;br /&gt;&lt;br /&gt;[ \t\r\n\f]+  {return S;}&lt;br /&gt;&lt;br /&gt;\/\*[^*]*\*+([^/][^*]*\*+)*\/ /* ignore comments */&lt;br /&gt;&lt;br /&gt;"&lt;!--"   {return CDO;}&lt;br /&gt;"--&gt;"   {return CDC;}&lt;br /&gt;"~="   {return INCLUDES;}&lt;br /&gt;"|="   {return DASHMATCH;}&lt;br /&gt;&lt;br /&gt;{string}  {return STRING;}&lt;br /&gt;&lt;br /&gt;{ident}   {return IDENT;}&lt;br /&gt;&lt;br /&gt;"#"{name}  {return HASH;}&lt;br /&gt;&lt;br /&gt;"@import"  {return IMPORT_SYM;}&lt;br /&gt;"@page"   {return PAGE_SYM;}&lt;br /&gt;"@media"  {return MEDIA_SYM;}&lt;br /&gt;"@font-face"  {return FONT_FACE_SYM;}&lt;br /&gt;"@charset"  {return CHARSET_SYM;}&lt;br /&gt;"@"{ident}  {return ATKEYWORD;}&lt;br /&gt;&lt;br /&gt;"!{w}important"  {return IMPORTANT_SYM;}&lt;br /&gt;&lt;br /&gt;{num}em   {return EMS;}&lt;br /&gt;{num}ex   {return EXS;}&lt;br /&gt;{num}px   {return LENGTH;}&lt;br /&gt;{num}cm   {return LENGTH;}&lt;br /&gt;{num}mm   {return LENGTH;}&lt;br /&gt;{num}in   {return LENGTH;}&lt;br /&gt;{num}pt   {return LENGTH;}&lt;br /&gt;{num}pc   {return LENGTH;}&lt;br /&gt;{num}deg  {return ANGLE;}&lt;br /&gt;{num}rad  {return ANGLE;}&lt;br /&gt;{num}grad  {return ANGLE;}&lt;br /&gt;{num}ms   {return TIME;}&lt;br /&gt;{num}s   {return TIME;}&lt;br /&gt;{num}Hz   {return FREQ;}&lt;br /&gt;{num}kHz  {return FREQ;}&lt;br /&gt;{num}{ident}  {return DIMEN;}&lt;br /&gt;{num}%   {return PERCENTAGE;}&lt;br /&gt;{num}   {return NUMBER;}&lt;br /&gt;&lt;br /&gt;"url("{w}{string}{w}")" {return URI;}&lt;br /&gt;"url("{w}{url}{w}")" {return URI;}&lt;br /&gt;{ident}"("  {return FUNCTION;}&lt;br /&gt;&lt;br /&gt;U\+{range}  {return UNICODERANGE;}&lt;br /&gt;U\+{h}{1,6}-{h}{1,6} {return UNICODERANGE;}&lt;br /&gt;&lt;br /&gt;.   {return *yytext;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-3184171548640125469?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3184171548640125469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3184171548640125469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3184171548640125469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3184171548640125469'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css3-lexical-scanner.html' title='CSS3 Lexical scanner'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-6509499596010530869</id><published>2008-03-14T11:38:00.001-07:00</published><updated>2008-03-14T11:38:45.130-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS3 Grammar</title><content type='html'>&lt;p&gt;The grammar below is &lt;a name="x0"&gt;&lt;span class="index-inst" title="LL(1)"&gt;LL(1)&lt;/span&gt;&lt;/a&gt; (but note that most UA's should not use it  directly, since it doesn't express the &lt;a href="syndata.html#parsing-errors"&gt;parsing conventions&lt;/a&gt;, only the CSS2  syntax). The format of the productions is optimized for human consumption and  some shorthand notation beyond Yacc (see &lt;a class="noxref" href="refs.html#ref-YACC" rel="biblioentry"&gt;&lt;span class="normref"&gt;[YACC]&lt;/span&gt;&lt;/a&gt;)  is used:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;strong&gt;*&lt;/strong&gt;: 0 or more  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;+&lt;/strong&gt;: 1 or more  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;?&lt;/strong&gt;: 0 or 1  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;|&lt;/strong&gt;: separates alternatives  &lt;/li&gt;&lt;li&gt;&lt;strong&gt;[ ]&lt;/strong&gt;: grouping &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The productions are: &lt;/p&gt;&lt;pre&gt;stylesheet&lt;br /&gt; : [ CHARSET_SYM S* STRING S* ';' ]?&lt;br /&gt;   [S|CDO|CDC]* [ import [S|CDO|CDC]* ]*&lt;br /&gt;   [ [ ruleset | media | page | font_face ] [S|CDO|CDC]* ]*&lt;br /&gt; ;&lt;br /&gt;import&lt;br /&gt; : IMPORT_SYM S*&lt;br /&gt;   [STRING|URI] S* [ medium [ ',' S* medium]* ]? ';' S*&lt;br /&gt; ;&lt;br /&gt;media&lt;br /&gt; : MEDIA_SYM S* medium [ ',' S* medium ]* '{' S* ruleset* '}' S*&lt;br /&gt; ;&lt;br /&gt;medium&lt;br /&gt; : IDENT S*&lt;br /&gt; ;&lt;br /&gt;page&lt;br /&gt; : PAGE_SYM S* IDENT? pseudo_page? S*&lt;br /&gt;   '{' S* declaration [ ';' S* declaration ]* '}' S*&lt;br /&gt; ;&lt;br /&gt;pseudo_page&lt;br /&gt; : ':' IDENT&lt;br /&gt; ;&lt;br /&gt;font_face&lt;br /&gt; : FONT_FACE_SYM S*&lt;br /&gt;   '{' S* declaration [ ';' S* declaration ]* '}' S*&lt;br /&gt; ;&lt;br /&gt;operator&lt;br /&gt; : '/' S* | ',' S* | /* empty */&lt;br /&gt; ;&lt;br /&gt;combinator&lt;br /&gt; : '+' S* | '&gt;' S* | /* empty */&lt;br /&gt; ;&lt;br /&gt;unary_operator&lt;br /&gt; : '-' | '+'&lt;br /&gt; ;&lt;br /&gt;property&lt;br /&gt; : IDENT S*&lt;br /&gt; ;&lt;br /&gt;ruleset&lt;br /&gt; : selector [ ',' S* selector ]*&lt;br /&gt;   '{' S* declaration [ ';' S* declaration ]* '}' S*&lt;br /&gt; ;&lt;br /&gt;&lt;a name="x1"&gt;&lt;span class="index-inst" title="selector"&gt;selector&lt;/span&gt;&lt;/a&gt;&lt;br /&gt; : simple_selector [ combinator simple_selector ]*&lt;br /&gt; ;&lt;br /&gt;simple_selector&lt;br /&gt; : element_name? [ HASH | class | attrib | pseudo ]* S*&lt;br /&gt; ;&lt;br /&gt;class&lt;br /&gt; : '.' IDENT&lt;br /&gt; ;&lt;br /&gt;element_name&lt;br /&gt; : IDENT | '*'&lt;br /&gt; ;&lt;br /&gt;attrib&lt;br /&gt; : '[' S* IDENT S* [ [ '=' | INCLUDES | DASHMATCH ] S*&lt;br /&gt;   [ IDENT | STRING ] S* ]? ']'&lt;br /&gt; ;&lt;br /&gt;pseudo&lt;br /&gt; : ':' [ IDENT | FUNCTION S* IDENT S* ')' ]&lt;br /&gt; ;&lt;br /&gt;declaration&lt;br /&gt; : property ':' S* expr prio?&lt;br /&gt; | /* empty */&lt;br /&gt; ;&lt;br /&gt;prio&lt;br /&gt; : IMPORTANT_SYM S*&lt;br /&gt; ;&lt;br /&gt;expr&lt;br /&gt; : term [ operator term ]*&lt;br /&gt; ;&lt;br /&gt;term&lt;br /&gt; : unary_operator?&lt;br /&gt;   [ NUMBER S* | PERCENTAGE S* | LENGTH S* | EMS S* | EXS S* | ANGLE S* |&lt;br /&gt;     TIME S* | FREQ S* | function ]&lt;br /&gt; | STRING S* | IDENT S* | URI S* | RGB S* | UNICODERANGE S* | hexcolor&lt;br /&gt; ;&lt;br /&gt;function&lt;br /&gt; : FUNCTION S* expr ')' S*&lt;br /&gt; ;&lt;br /&gt;/*&lt;br /&gt;* There is a constraint on the &lt;a name="x2"&gt;&lt;span class="index-inst" title="color"&gt;color&lt;/span&gt;&lt;/a&gt; that it must&lt;br /&gt;* have either 3 or 6 hex-digits (i.e., [0-9a-fA-F])&lt;br /&gt;* after the "#"; e.g., "#000" is OK, but "#abcd" is not.&lt;br /&gt;*/&lt;br /&gt;hexcolor&lt;br /&gt; : HASH S*&lt;br /&gt; ;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-6509499596010530869?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/6509499596010530869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=6509499596010530869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6509499596010530869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6509499596010530869'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css3-grammar.html' title='CSS3 Grammar'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-18109816666931072</id><published>2008-03-14T11:36:00.000-07:00</published><updated>2008-03-14T11:37:54.092-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Visibility: the 'visibility' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'visibility'"&gt;&lt;a class="propdef-title" name="propdef-visibility"&gt;&lt;strong&gt;'visibility'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;visible | hidden | collapse | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;inherit  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;no  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;The &lt;a class="noxref" href="visufx.html#propdef-visibility"&gt;&lt;span class="propinst-visibility"&gt;'visibility'&lt;/span&gt;&lt;/a&gt; property specifies whether the  boxes generated by an element are rendered. Invisible boxes still affect layout  (set the &lt;a class="noxref" href="visuren.html#propdef-display"&gt;&lt;span class="propinst-display"&gt;'display'&lt;/span&gt;&lt;/a&gt; property to 'none' to suppress box  generation altogether). Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;visible&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The generated box is visible.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;hidden&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The generated box is invisible (fully transparent), but still affects  layout.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;collapse&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Please consult the section on &lt;a href="tables.html#dynamic-effects"&gt;dynamic  row and column effects&lt;/a&gt; in tables. If used on elements other than rows or  columns, 'collapse' has the same meaning as 'hidden'. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;This property may be used in conjunction with scripts to create dynamic  effects.  &lt;/p&gt;&lt;div class="html-example"&gt; &lt;p&gt;In the following example, pressing either form button invokes a user-defined  script function that causes the corresponding box to become visible and the  other to be hidden. Since these boxes have the same size and position, the  effect is that one replaces the other. (The script code is in a hypothetical  script language. It may or may not have any effect in a CSS-capable UA.) &lt;/p&gt;&lt;pre&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;&lt;head&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;&lt;!--&lt;br /&gt;  #container1 { position: absolute;&lt;br /&gt;                top: 2in; left: 2in; width: 2in }&lt;br /&gt;  #container2 { position: absolute;&lt;br /&gt;                top: 2in; left: 2in; width: 2in;&lt;br /&gt;                visibility: hidden; }&lt;br /&gt;--&gt;&lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;/head&gt;&lt;br /&gt;&lt;body&gt;&lt;br /&gt;&lt;p&gt;Choose a suspect:&lt;/p&gt;&lt;br /&gt;&lt;div id="container1"&gt;&lt;br /&gt;  &lt;IMG alt="Al Capone"&lt;br /&gt;       width="100" height="100"&lt;br /&gt;       src="suspect1.jpg" /&gt;&lt;br /&gt;  &lt;p&gt;Name: Al Capone&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Residence: Chicago&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div id="container2"&gt;&lt;br /&gt;  &lt;IMG alt="Lucky Luciano"&lt;br /&gt;       width="100" height="100"&lt;br /&gt;       src="suspect2.jpg" /&gt;&lt;br /&gt;  &lt;p&gt;Name: Lucky Luciano&lt;/p&gt;&lt;br /&gt;  &lt;p&gt;Residence: New York&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;FORM method="post"&lt;br /&gt;     action="http://www.suspect.org/process-bums"&gt;&lt;br /&gt;  &lt;p&gt;&lt;br /&gt;  &lt;INPUT name="Capone" type="button"&lt;br /&gt;         value="Capone"&lt;br /&gt;         onclick='show("container1");hide("container2")'&gt;&lt;br /&gt;  &lt;INPUT name="Luciano" type="button"&lt;br /&gt;         value="Luciano"&lt;br /&gt;         onclick='show("container2");hide("container1")'&gt;&lt;br /&gt;&lt;/form&gt;&lt;br /&gt;&lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-18109816666931072?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/18109816666931072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=18109816666931072' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/18109816666931072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/18109816666931072'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/visibility-visibility-property.html' title='Visibility: the &apos;visibility&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2848336785190701572</id><published>2008-03-14T11:35:00.002-07:00</published><updated>2008-03-14T11:36:54.361-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS2 Overflow and clipping</title><content type='html'>&lt;p&gt;Generally, the content of a block box is confined to the content edges of the  box. In certain cases, a box may &lt;a name="x0"&gt;&lt;span class="index-def" title="overflow|box::overflow"&gt;&lt;dfn&gt;overflow&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt;, meaning its content  lies partly or entirely outside of the box, e.g.:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;A line cannot be broken, causing the line box to be wider than the block  box.  &lt;/li&gt;&lt;li&gt;A block-level box is too wide for the containing block. This may happen when  an element's &lt;a class="noxref" href="visudet.html#propdef-width"&gt;&lt;span class="propinst-width"&gt;'width'&lt;/span&gt;&lt;/a&gt; property has a value that causes the  generated block box to spill over sides of the containing block.  &lt;/li&gt;&lt;li&gt;An element's height exceeds an explicit height assigned to the containing  block (i.e., the containing block's height is determined by the &lt;a class="noxref" href="visudet.html#propdef-height"&gt;&lt;span class="propinst-height"&gt;'height'&lt;/span&gt;&lt;/a&gt; property, not by content height).  &lt;/li&gt;&lt;li&gt;A box is &lt;a href="visuren.html#absolute-positioning"&gt;positioned  absolutely&lt;/a&gt;.  &lt;/li&gt;&lt;li&gt;It has &lt;a href="box.html#margin-properties"&gt;negative margins&lt;/a&gt;. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Whenever overflow occurs, the &lt;a class="noxref" href="visufx.html#propdef-overflow"&gt;&lt;span class="propinst-overflow"&gt;'overflow'&lt;/span&gt;&lt;/a&gt; property specifies how (and  whether) a box is clipped. The &lt;a class="noxref" href="visufx.html#propdef-clip"&gt;&lt;span class="propinst-clip"&gt;'clip'&lt;/span&gt;&lt;/a&gt;  property specifies the size and shape of the clipping region. Specifying a small  clipping region may cause clipping of otherwise visible contents.  &lt;/p&gt;&lt;h3&gt;11.1.1 &lt;a name="overflow"&gt;Overflow&lt;/a&gt;: the &lt;a class="noxref" href="visufx.html#propdef-overflow"&gt;&lt;span class="propinst-overflow"&gt;'overflow'&lt;/span&gt;&lt;/a&gt; property&lt;/h3&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'overflow'"&gt;&lt;a class="propdef-title" name="propdef-overflow"&gt;&lt;strong&gt;'overflow'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;visible | hidden | scroll | auto | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;visible  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;block-level and replaced elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;no  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies whether the content of a block-level element is  clipped when it overflows the element's box (which is acting as a containing  block for the content). Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;visible&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;This value indicates that content is not clipped, i.e., it may be rendered  outside the block box.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;hidden&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;This value indicates that the content is clipped and that no scrolling  mechanism should be provided to view the content outside the clipping region;  users will not have access to clipped content. The size and shape of the  clipping region is specified by the &lt;a class="noxref" href="visufx.html#propdef-clip"&gt;&lt;span class="propinst-clip"&gt;'clip'&lt;/span&gt;&lt;/a&gt;  property.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;scroll&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;This value indicates that the content is clipped and that if the user agent  uses scrolling mechanism that is visible on the screen (such as a scroll bar or  a panner), that mechanism should be displayed for a box whether or not any of  its content is clipped. This avoids any problem with scrollbars appearing and  disappearing in a dynamic environment. When this value is specified and the  target medium is 'print' or 'projection', overflowing content should be printed.   &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;auto&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;The behavior of the 'auto' value is user agent-dependent, but should cause a  scrolling mechanism to be provided for overflowing boxes. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Even if &lt;a class="noxref" href="visufx.html#propdef-overflow"&gt;&lt;span class="propinst-overflow"&gt;'overflow'&lt;/span&gt;&lt;/a&gt; is set to 'visible', content may  be clipped to a UA's document window by the native operating environment.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;Consider the following example of a block quotation (BLOCKQUOTE) that is too  big for its containing block (established by a DIV). Here is the source  document:&lt;/p&gt;&lt;pre class="html-example"&gt;&lt;div&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;&lt;p&gt;I didn't like the play, but then I saw&lt;br /&gt;it under adverse conditions - the curtain was up.&lt;br /&gt;&lt;div class="attributed-to"&gt;- Groucho Marx&lt;/div&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Here is the style sheet controlling the sizes and style of the generated  boxes: &lt;/p&gt;&lt;pre&gt;DIV { width : 100px; height: 100px;&lt;br /&gt;     border: thin solid red;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;BLOCKQUOTE   { width : 125px; height : 100px;&lt;br /&gt;     margin-top: 50px; margin-left: 50px;&lt;br /&gt;     border: thin dashed black&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;DIV.attributed-to { text-align : right; }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The initial value of &lt;a class="noxref" href="visufx.html#propdef-overflow"&gt;&lt;span class="propinst-overflow"&gt;'overflow'&lt;/span&gt;&lt;/a&gt; is 'visible', so the BLOCKQUOTE  would be formatted without clipping, something like this:&lt;/p&gt; &lt;div class="figure"&gt; &lt;p&gt;&lt;img alt="Rendered overflow" src="./images/overflow1.gif" /&gt;&lt;span class="dlink"&gt;   &lt;a title="Long description for example with unclipped overflow" href="images/longdesc/overflow1-desc.html" name="img-overflow1"&gt;[D]&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;Setting &lt;a class="noxref" href="visufx.html#propdef-overflow"&gt;&lt;span class="propinst-overflow"&gt;'overflow'&lt;/span&gt;&lt;/a&gt; to 'hidden' for the DIV element,  on the other hand, causes the BLOCKQUOTE to be clipped by the containing block:  &lt;/p&gt;&lt;div class="figure"&gt; &lt;p&gt;&lt;img alt="Clipped overflow" src="./images/overflow2.gif" /&gt;&lt;span class="dlink"&gt;   &lt;a title="Long description for example with clipped overflow" href="images/longdesc/overflow2-desc.html" name="img-overflow2"&gt;[D]&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt; &lt;p&gt;A value of 'scroll' would tell UAs that support a visible scrolling mechanism  to display one so that users could access the clipped content. &lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2848336785190701572?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2848336785190701572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2848336785190701572' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2848336785190701572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2848336785190701572'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css2-overflow-and-clipping.html' title='CSS2 Overflow and clipping'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2908249524515205279</id><published>2008-03-14T11:35:00.001-07:00</published><updated>2008-03-14T11:35:40.654-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Recognized media types</title><content type='html'>&lt;p&gt;A CSS &lt;a name="x4"&gt;&lt;span class="index-def" title="media type"&gt;&lt;dfn&gt;media  type&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt; names a set of CSS properties. A user agent that claims to  support a media type by name must implement all of the properties that apply to  that media type.  &lt;/p&gt;&lt;p&gt;The names chosen for CSS media types reflect target devices for which the  relevant properties make sense. In the following list of CSS media types, the  parenthetical descriptions are not normative. They only give a sense of what  device the media type is meant to refer to.  &lt;/p&gt;&lt;dl&gt;&lt;dt&gt;&lt;strong&gt;all&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Suitable for all devices.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;aural&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for speech synthesizers. See the section on &lt;a href="./aural.html"&gt;aural style sheets&lt;/a&gt; for details.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;braille&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for braille tactile feedback devices.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;embossed&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for paged braille printers.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;handheld&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for handheld devices (typically small screen, monochrome, limited  bandwidth).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;print&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for paged, opaque material and for documents viewed on screen in  print preview mode. Please consult the section on &lt;a href="page.html"&gt;paged  media&lt;/a&gt; for information about formatting issues that are specific to paged  media.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;projection&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for projected presentations, for example projectors or print to  transparencies. Please consult the section on &lt;a href="page.html"&gt;paged  media&lt;/a&gt; for information about formatting issues that are specific to paged  media.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;screen&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended primarily for color computer screens.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;tty&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for media using a fixed-pitch character grid, such as teletypes,  terminals, or portable devices with limited display capabilities. Authors should  not use &lt;a href="syndata.html#pixel-units"&gt;pixel units&lt;/a&gt; with the "tty" media  type.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;tv&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Intended for television-type devices (low resolution, color,  limited-scrollability screens, sound available). &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;Media type names are case-insensitive.  &lt;/p&gt;&lt;p&gt;Due to rapidly changing technologies, CSS2 does not specify a definitive list  of media types that may be values for &lt;a name="x5"&gt;&lt;span class="index-inst" title="@media"&gt;@media&lt;/span&gt;&lt;/a&gt;.  &lt;/p&gt;&lt;div class="note"&gt; &lt;p&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; Future versions of CSS may extend this list.  Authors should not rely on media type names that are not yet defined by a CSS  specification. &lt;/em&gt;&lt;/p&gt;&lt;/div&gt; &lt;h3&gt;7.3.1 &lt;a name="media-groups"&gt;Media groups&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;Each CSS property definition specifies the media types for which the property  must be implemented by a &lt;a href="conform.html#conformance"&gt;conforming user  agent&lt;/a&gt;. Since properties generally apply to several media, the "Applies to  media" section of each property definition lists &lt;a name="x6"&gt;&lt;span class="index-def" title="media group"&gt;media groups&lt;/span&gt;&lt;/a&gt; rather than  individual media types. Each property applies to all media types in the media  groups listed in its definition.  &lt;/p&gt;&lt;p&gt;CSS2 defines the following media groups: &lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;span class="index-def" title="'continuous' media group"&gt;&lt;a name="continuous-media-group"&gt;&lt;strong&gt;continuous&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt; or &lt;span class="index-def" title="'paged' media group"&gt;&lt;a name="paged-media-group"&gt;&lt;strong&gt;paged&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;. "Both" means that the  property in question applies to both media groups.  &lt;/li&gt;&lt;li&gt;&lt;span class="index-def" title="'visual' media group"&gt;&lt;a name="visual-media-group"&gt;&lt;strong&gt;visual&lt;/strong&gt;&lt;/a&gt;,&lt;/span&gt; &lt;span class="index-def" title="'aural' media group"&gt;&lt;a name="aural-media-group"&gt;&lt;strong&gt;aural&lt;/strong&gt;&lt;/a&gt;,&lt;/span&gt; or &lt;span class="index-def" title="'tactile' media group"&gt;&lt;a name="tactile-media-group"&gt;&lt;strong&gt;tactile&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;.  &lt;/li&gt;&lt;li&gt;&lt;span class="index-def" title="'grid' media group"&gt;&lt;a name="grid-media-group"&gt;&lt;strong&gt;grid&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt; (for character grid  devices), or &lt;span class="index-def" title="'bitmap' media group"&gt;&lt;a name="bitmap-media-group"&gt;&lt;strong&gt;bitmap&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;. "Both" means that  the property in question applies to both media groups.  &lt;/li&gt;&lt;li&gt;&lt;span class="index-def" title="'interactive media group"&gt;&lt;a name="interactive-media-group"&gt;&lt;strong&gt;interactive&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt; (for  devices that allow user interaction), or &lt;span class="index-def" title="'static' media group"&gt;&lt;a name="static-media-group"&gt;&lt;strong&gt;static&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt; (for those that  don't). "Both" means that the property in question applies to both media groups.   &lt;/li&gt;&lt;li&gt;&lt;span class="index-def" title="'all' media group"&gt;&lt;a name="all-media-group"&gt;&lt;strong&gt;all&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt; (includes all media types)  &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;The following table shows the relationships between media groups and media  types:&lt;/p&gt; &lt;table summary="Relationship between media groups and media types" border="1"&gt; &lt;caption&gt;Relationship between media groups and media types&lt;/caption&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th&gt;Media Types  &lt;/th&gt;&lt;th colspan="4"&gt;Media Groups  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;   &lt;/th&gt;&lt;th&gt;continuous/paged  &lt;/th&gt;&lt;th&gt;visual/aural/tactile  &lt;/th&gt;&lt;th&gt;grid/bitmap  &lt;/th&gt;&lt;th&gt;interactive/static  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;aural &lt;/th&gt;&lt;td align="center"&gt;continuous &lt;/td&gt;&lt;td align="center"&gt;aural &lt;/td&gt;&lt;td align="center"&gt;N/A &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;braille &lt;/th&gt;&lt;td align="center"&gt;continuous &lt;/td&gt;&lt;td align="center"&gt;tactile &lt;/td&gt;&lt;td align="center"&gt;grid &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;emboss &lt;/th&gt;&lt;td align="center"&gt;paged &lt;/td&gt;&lt;td align="center"&gt;tactile &lt;/td&gt;&lt;td align="center"&gt;grid &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;handheld &lt;/th&gt;&lt;td align="center"&gt;both &lt;/td&gt;&lt;td align="center"&gt;visual &lt;/td&gt;&lt;td align="center"&gt;both &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;print &lt;/th&gt;&lt;td align="center"&gt;paged &lt;/td&gt;&lt;td align="center"&gt;visual &lt;/td&gt;&lt;td align="center"&gt;bitmap &lt;/td&gt;&lt;td align="center"&gt;static&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;projection &lt;/th&gt;&lt;td align="center"&gt;paged &lt;/td&gt;&lt;td align="center"&gt;visual &lt;/td&gt;&lt;td align="center"&gt;bitmap &lt;/td&gt;&lt;td align="center"&gt;static&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;screen &lt;/th&gt;&lt;td align="center"&gt;continuous &lt;/td&gt;&lt;td align="center"&gt;visual &lt;/td&gt;&lt;td align="center"&gt;bitmap &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;tty &lt;/th&gt;&lt;td align="center"&gt;continuous &lt;/td&gt;&lt;td align="center"&gt;visual &lt;/td&gt;&lt;td align="center"&gt;grid &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;th&gt;tv &lt;/th&gt;&lt;td align="center"&gt;both &lt;/td&gt;&lt;td align="center"&gt;visual, aural &lt;/td&gt;&lt;td align="center"&gt;bitmap &lt;/td&gt;&lt;td align="center"&gt;both&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2908249524515205279?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2908249524515205279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2908249524515205279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2908249524515205279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2908249524515205279'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/recognized-media-types.html' title='Recognized media types'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-4092385307030132474</id><published>2008-03-14T11:34:00.000-07:00</published><updated>2008-03-14T11:35:12.028-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Specifying media-dependent style sheets</title><content type='html'>There are currently two ways to specify media dependencies for style sheets:&lt;br /&gt;&lt;br /&gt;Specify the target medium from a style sheet with the @media or @import at-rules. &lt;br /&gt;Example(s):&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;@import url("loudvoice.css") aural;&lt;br /&gt;@media print {&lt;br /&gt;  /* style sheet for print goes here */&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Specify the target medium within the document language. For example, in HTML 4.0 ([HTML40]), the "media" attribute on the LINK element specifies the target media of an external style sheet: &lt;br /&gt;&lt;br /&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;&lt;br /&gt;&lt;HTML&gt;&lt;br /&gt;   &lt;HEAD&gt;&lt;br /&gt;      &lt;TITLE&gt;Link to a target medium&lt;/TITLE&gt;&lt;br /&gt;      &lt;LINK rel="stylesheet" type="text/css" &lt;br /&gt;	 media="print, handheld" href="foo.css"&gt;&lt;br /&gt;   &lt;/HEAD&gt;&lt;br /&gt;   &lt;BODY&gt;&lt;br /&gt;      &lt;P&gt;The body...&lt;br /&gt;   &lt;/BODY&gt;&lt;br /&gt;&lt;/HTML&gt;&lt;br /&gt;&lt;br /&gt;The @import rule is defined in the chapter on the cascade. &lt;br /&gt;&lt;br /&gt;7.2.1 The @media rule&lt;br /&gt;An @media rule specifies the target media types (separated by commas) of a set of rules (delimited by curly braces). The @media construct allows style sheet rules for various media in the same style sheet:&lt;br /&gt;&lt;br /&gt;  @media print {&lt;br /&gt;    BODY { font-size: 10pt }&lt;br /&gt;  }&lt;br /&gt;  @media screen {&lt;br /&gt;    BODY { font-size: 12pt }&lt;br /&gt;  }&lt;br /&gt;  @media screen, print {&lt;br /&gt;    BODY { line-height: 1.2 }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-4092385307030132474?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/4092385307030132474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=4092385307030132474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4092385307030132474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/4092385307030132474'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/specifying-media-dependent-style-sheets.html' title='Specifying media-dependent style sheets'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-8765128328725120278</id><published>2008-03-14T11:33:00.002-07:00</published><updated>2008-03-14T11:34:37.204-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Font family: the 'font-family' property</title><content type='html'>&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-family'"&gt;&lt;a class="propdef-title" name="propdef-font-family"&gt;&lt;strong&gt;'font-family'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;[[ &lt;a class="noxref" href="fonts.html#value-def-family-name"&gt;&lt;span class="value-inst-family-name"&gt;&lt;family-name&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="fonts.html#value-def-generic-family"&gt;&lt;span class="value-inst-generic-family"&gt;&lt;generic-family&gt;&lt;/span&gt;&lt;/a&gt; ],]* [&lt;a class="noxref" href="fonts.html#value-def-family-name"&gt;&lt;span class="value-inst-family-name"&gt;&lt;family-name&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="fonts.html#value-def-generic-family"&gt;&lt;span class="value-inst-generic-family"&gt;&lt;generic-family&gt;&lt;/span&gt;&lt;/a&gt;] | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;depends on user agent  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property specifies a prioritized list of font family names and/or  generic family names. To deal with the problem that a single font may not  contain glyphs to display all the characters in a document, or that not all  fonts are available on all systems, this property allows authors to specify a  list of fonts, all of the same style and size, that are tried in sequence to see  if they contain a glyph for a certain character. This list is called a &lt;a name="x7"&gt;&lt;span class="index-def" title="font set"&gt;&lt;dfn&gt;font set&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt;.  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;For example, text that contains English words mixed with mathematical symbols  may need a font set of two fonts, one containing Latin letters and digits, the  other containing mathematical symbols. Here is an example of a font set suitable  for a text that is expected to contain text with Latin characters, Japanese  characters, and mathematical symbols: &lt;/p&gt;&lt;pre&gt;BODY { font-family: Baskerville, "Heisi Mincho W3", Symbol, serif }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;The glyphs available in the "Baskerville" font (a font that covers only Latin  characters) will be taken from that font, Japanese glyphs will be taken from  "Heisi Mincho W3", and the mathematical symbol glyphs will come from "Symbol".  Any others will come from the generic font family 'serif'. &lt;/p&gt;&lt;/div&gt; &lt;p&gt;The generic font family will be used if one or more of the other fonts in a  font set is unavailable. Although many fonts provide the "missing character"  glyph, typically an open box, as its name implies this should not be considered  a match except for the last font in a font set.  &lt;/p&gt;&lt;p&gt;There are two types of font family names:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title=""&gt;::definition of"&gt;&lt;a class="value-def" name="value-def-family-name"&gt;&lt;strong&gt;&lt;family-name&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;The name of a font family of choice. In the previous example, "Baskerville",  "Heisi Mincho W3", and "Symbol" are font families. Font family names containing  &lt;a href="syndata.html#whitespace"&gt;whitespace&lt;/a&gt; should be quoted. If quoting is  omitted, any &lt;a href="syndata.html#whitespace"&gt;whitespace&lt;/a&gt; characters before  and after the font name are &lt;span class="index-inst" title="ignore"&gt;&lt;a href="syndata.html#ignore" name="x9"&gt;ignored&lt;/a&gt;&lt;/span&gt; and any sequence of  whitespace characters inside the font name is converted to a single space.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-def" title=""&gt;::definition of"&gt;&lt;a class="value-def" name="value-def-generic-family"&gt;&lt;strong&gt;&lt;generic-family&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;   &lt;/dt&gt;&lt;dd&gt;The following generic families are defined: 'serif', 'sans-serif',  'cursive', 'fantasy', and 'monospace'. Please see the section on &lt;a href="#generic-font-families"&gt;generic font families&lt;/a&gt; for descriptions of  these families. Generic font family names are keywords, and therefore must not  be quoted.  &lt;p&gt;Authors are encouraged to offer a generic font family as a last alternative,  for improved robustness.&lt;/p&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;div class="html-example"&gt; &lt;p&gt;For example: &lt;/p&gt;&lt;pre&gt;&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt; &lt;head&gt;&lt;br /&gt;   &lt;title&gt;Font test&lt;/title&gt;&lt;br /&gt;   &lt;style type="text/css"&gt;&lt;br /&gt;     BODY { font-family: "new century schoolbook", serif }&lt;br /&gt;   &lt;/style&gt;&lt;br /&gt; &lt;/head&gt;&lt;br /&gt; &lt;body&gt;&lt;br /&gt;  &lt;h1 style="font-family: 'My own font', fantasy"&gt;Test&lt;/h1&gt;&lt;br /&gt;   &lt;p&gt;What's up, Doc?&lt;br /&gt; &lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The richer selector syntax of CSS2 may be used to create language-sensitive  typography. For example, some Chinese and Japanese characters are unified to  have the same Unicode codepoint, although the abstract glyphs are not the same  in the two languages. &lt;/p&gt;&lt;pre&gt;*:lang(ja-jp) { font: 900 14pt/16pt "Heisei Mincho W9", serif }&lt;br /&gt;*:lang(zh-tw) { font: 800 14pt/16.5pt "Li Sung", serif }&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;This selects any element that has the given language - Japanese or  Traditional Chinese - and requests the appropriate font. &lt;/p&gt;&lt;/div&gt; &lt;h3&gt;15.2.3 &lt;a name="font-styling"&gt;Font styling&lt;/a&gt;: the &lt;a class="noxref" href="fonts.html#propdef-font-style"&gt;&lt;span class="propinst-font-style"&gt;'font-style'&lt;/span&gt;&lt;/a&gt;, &lt;a class="noxref" href="fonts.html#propdef-font-variant"&gt;&lt;span class="propinst-font-variant"&gt;'font-variant'&lt;/span&gt;&lt;/a&gt;, &lt;a class="noxref" href="fonts.html#propdef-font-weight"&gt;&lt;span class="propinst-font-weight"&gt;'font-weight'&lt;/span&gt;&lt;/a&gt; and &lt;a class="noxref" href="fonts.html#propdef-font-stretch"&gt;&lt;span class="propinst-font-stretch"&gt;'font-stretch'&lt;/span&gt;&lt;/a&gt; properties &lt;/h3&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-style'"&gt;&lt;a class="propdef-title" name="propdef-font-style"&gt;&lt;strong&gt;'font-style'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | italic | oblique | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;The &lt;a class="noxref" href="fonts.html#propdef-font-style"&gt;&lt;span class="propinst-font-style"&gt;'font-style'&lt;/span&gt;&lt;/a&gt; property requests normal  (sometimes referred to as "roman" or "upright"), italic, and oblique faces  within a font family. Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;normal&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies a font that is classified as 'normal' in the UA's font database.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;oblique&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies a font that is classified as 'oblique' in the UA's font database.  Fonts with Oblique, Slanted, or Incline in their names will typically be labeled  'oblique' in the font database. A font that is labeled 'oblique' in the UA's  font database may actually have been generated by electronically slanting a  normal font.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;italic&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies a font that is classified as 'italic' in the UA's font database,  or, if that is not available, one labeled 'oblique'. Fonts with &lt;em&gt;Italic,  Cursive&lt;/em&gt;, or &lt;em&gt;Kursiv&lt;/em&gt; in their names will typically be labeled  'italic'. &lt;/dd&gt;&lt;/dl&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;In this example, normal text in an H1, H2, or H3 element will be displayed  with an italic font. However, emphasized text (EM) within an H1 will appear in a  normal face. &lt;/p&gt;&lt;pre&gt;H1, H2, H3 { font-style: italic }&lt;br /&gt;H1 EM { font-style: normal }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-variant'"&gt;&lt;a class="propdef-title" name="propdef-font-variant"&gt;&lt;strong&gt;'font-variant'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | small-caps | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;In a small-caps font, the glyphs for lowercase letters look similar to the  uppercase ones, but in a smaller size and with slightly different proportions.  The &lt;a class="noxref" href="fonts.html#propdef-font-variant"&gt;&lt;span class="propinst-font-variant"&gt;'font-variant'&lt;/span&gt;&lt;/a&gt; property requests such a  font for &lt;a name="x13"&gt;&lt;span class="index-def" title="bicameral::definition of"&gt;bicameral&lt;/span&gt;&lt;/a&gt; (having two cases, as with  Latin script). This property has no visible effect for scripts that are &lt;a name="x14"&gt;&lt;span class="index-def" title="unicameral::definition of"&gt;&lt;dfn&gt;unicameral&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt; (having only  one case, as with most of the world's writing systems). Values have the  following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;normal&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies a font that is not labeled as a small-caps font.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;small-caps&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies a font that is labeled as a small-caps font. If a genuine  small-caps font is not available, user agents should simulate a small-caps font,  for example by taking a normal font and replacing the lowercase letters by  scaled uppercase characters. As a last resort, unscaled uppercase letter glyphs  in a normal font may replace glyphs in a small-caps font so that the text  appears in all uppercase letters. &lt;/dd&gt;&lt;/dl&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;The following example results in an H3 element in small-caps, with emphasized  words (EM) in oblique small-caps: &lt;/p&gt;&lt;pre&gt;H3 { font-variant: small-caps }&lt;br /&gt;EM { font-style: oblique }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Insofar as this property causes text to be transformed to uppercase, the same  considerations as for &lt;a class="noxref" href="text.html#propdef-text-transform"&gt;&lt;span class="propinst-text-transform"&gt;'text-transform'&lt;/span&gt;&lt;/a&gt; apply.  &lt;/p&gt;&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-weight'"&gt;&lt;a class="propdef-title" name="propdef-font-weight"&gt;&lt;strong&gt;'font-weight'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 |  800 | 900 | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;The &lt;a class="noxref" href="fonts.html#propdef-font-weight"&gt;&lt;span class="propinst-font-weight"&gt;'font-weight'&lt;/span&gt;&lt;/a&gt; property specifies the  &lt;span&gt;weight&lt;/span&gt; of the font. Values have the following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;strong&gt;100 to 900&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;These values form an ordered sequence, where each number indicates a weight  that is at least as dark as its predecessor.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;normal&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Same as '400'.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;bold&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Same as '700'.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;bolder&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies the next weight that is assigned to a font that is darker than the  inherited one. If there is no such weight, it simply results in the next darker  numerical value (and the font remains unchanged), unless the inherited value was  '900', in which case the resulting weight is also '900'.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;lighter&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies the next weight that is assigned to a font that is lighter than  the inherited one. If there is no such weight, it simply results in the next  lighter numerical value (and the font remains unchanged), unless the inherited  value was '100', in which case the resulting weight is also '100'. &lt;/dd&gt;&lt;/dl&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt;&lt;pre&gt;P { font-weight: normal }   /* 400 */&lt;br /&gt;H1 { font-weight: 700 }     /* bold */&lt;br /&gt;BODY { font-weight: 400 }&lt;br /&gt;STRONG { font-weight: bolder } /* 500 if available */&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Child elements inherit the &lt;a href="cascade.html#computed-value"&gt;computed  value&lt;/a&gt; of the weight.  &lt;/p&gt;&lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-stretch'"&gt;&lt;a class="propdef-title" name="propdef-font-stretch"&gt;&lt;strong&gt;'font-stretch'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal | wider | narrower | ultra-condensed | extra-condensed | condensed |  semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;normal  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;The &lt;a class="noxref" href="fonts.html#propdef-font-stretch"&gt;&lt;span class="propinst-font-stretch"&gt;'font-stretch'&lt;/span&gt;&lt;/a&gt; property selects a normal,  condensed, or extended face from a font family. Absolute keyword values have the  following ordering, from narrowest to widest :&lt;/p&gt; &lt;ol&gt;&lt;li&gt;ultra-condensed  &lt;/li&gt;&lt;li&gt;extra-condensed  &lt;/li&gt;&lt;li&gt;condensed  &lt;/li&gt;&lt;li&gt;semi-condensed  &lt;/li&gt;&lt;li&gt;normal  &lt;/li&gt;&lt;li&gt;semi-expanded  &lt;/li&gt;&lt;li&gt;expanded  &lt;/li&gt;&lt;li&gt;extra-expanded  &lt;/li&gt;&lt;li&gt;ultra-expanded &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;The relative keyword 'wider' sets the value to the next expanded value above  the inherited value (while not increasing it above 'ultra-expanded'); the  relative keyword 'narrower' sets the value to the next condensed value below the  inherited value (while not decreasing it below 'ultra-condensed').  &lt;/p&gt;&lt;h3&gt;15.2.4 &lt;a name="font-size-props"&gt;Font size&lt;/a&gt;: the &lt;a class="noxref" href="fonts.html#propdef-font-size"&gt;&lt;span class="propinst-font-size"&gt;'font-size'&lt;/span&gt;&lt;/a&gt; and &lt;a class="noxref" href="fonts.html#propdef-font-size-adjust"&gt;&lt;span class="propinst-font-size-adjust"&gt;'font-size-adjust'&lt;/span&gt;&lt;/a&gt; properties&lt;/h3&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-size'"&gt;&lt;a class="propdef-title" name="propdef-font-size"&gt;&lt;strong&gt;'font-size'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="fonts.html#value-def-absolute-size"&gt;&lt;span class="value-inst-absolute-size"&gt;&lt;absolute-size&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="fonts.html#value-def-relative-size"&gt;&lt;span class="value-inst-relative-size"&gt;&lt;relative-size&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="syndata.html#value-def-length"&gt;&lt;span class="value-inst-length"&gt;&lt;length&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="syndata.html#value-def-percentage"&gt;&lt;span class="value-inst-percentage"&gt;&lt;percentage&gt;&lt;/span&gt;&lt;/a&gt; | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;medium  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes, the computed value is inherited  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;refer to parent element's font size  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;This property describes the size of the font when set solid. Values have the  following meanings:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;a name="x18"&gt;&lt;span class="index-def" title=""&gt;::definition of"&gt;&lt;strong&gt;&lt;absolute-size&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;   &lt;/dt&gt;&lt;dd&gt;An &lt;a class="value-def" name="value-def-absolute-size"&gt;&lt;absolute-size&gt;&lt;/a&gt;  keyword refers to an entry in a table of font sizes computed and kept by the  user agent. Possible values are:  &lt;p&gt;[ xx-small | x-small | small | medium | large | x-large | xx-large ]  &lt;/p&gt;&lt;p&gt;On a computer screen a scaling factor of 1.2 is suggested between adjacent  indexes; if the 'medium' font is 12pt, the 'large' font could be 14.4pt.  Different media may need different scaling factors. Also, the user agent should  take the quality and availability of fonts into account when computing the  table. The table may be different from one font family to another.  &lt;/p&gt;&lt;p class="note"&gt;&lt;em&gt;&lt;strong&gt;Note.&lt;/strong&gt; In CSS1, the suggested scaling factor  between adjacent indexes was 1.5 which user experience proved to be too  large.&lt;/em&gt;&lt;/p&gt; &lt;/dd&gt;&lt;dt&gt;&lt;a name="x19"&gt;&lt;span class="index-def" title=""&gt;::definition of"&gt;&lt;strong&gt;&lt;relative-size&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;   &lt;/dt&gt;&lt;dd&gt;A &lt;a class="value-def" name="value-def-relative-size"&gt;&lt;relative-size&gt;&lt;/a&gt;  keyword is interpreted relative to the table of font sizes and the font size of  the parent element. Possible values are:  &lt;p&gt;[ larger | smaller ]  &lt;/p&gt;&lt;p&gt;For example, if the parent element has a font size of 'medium', a value of  'larger' will make the font size of the current element be 'large'. If the  parent element's size is not close to a table entry, the user agent is free to  interpolate between table entries or round off to the closest one. The user  agent may have to extrapolate table values if the numerical value goes beyond  the keywords. &lt;/p&gt; &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-length" name="x20"&gt;&lt;span class="value-inst-length"&gt;&lt;strong&gt;&lt;length&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;A length value specifies an absolute font size (that is independent of the  user agent's font table). Negative lengths are illegal.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-percentage" name="x21"&gt;&lt;span class="value-inst-percentage"&gt;&lt;strong&gt;&lt;percentage&gt;&lt;/strong&gt;  &lt;/span&gt;&lt;/a&gt;&lt;/span&gt; &lt;/dt&gt;&lt;dd&gt;A percentage value specifies an absolute font size relative to the parent  element's font size. Use of percentage values, or values in 'em's, leads to more  robust and cascadable style sheets. &lt;/dd&gt;&lt;/dl&gt; &lt;p&gt;The &lt;a href="cascade.html#actual-value"&gt;actual value&lt;/a&gt; of this property may  differ from the &lt;a href="cascade.html#computed-value"&gt;computed value&lt;/a&gt; due a  numerical value on 'font-size-adjust' and the unavailability of certain font  sizes.  &lt;/p&gt;&lt;p&gt;Child elements inherit the computed &lt;a class="noxref" href="fonts.html#propdef-font-size"&gt;&lt;span class="propinst-font-size"&gt;'font-size'&lt;/span&gt;&lt;/a&gt; value (otherwise, the effect of  &lt;a class="noxref" href="fonts.html#propdef-font-size-adjust"&gt;&lt;span class="propinst-font-size-adjust"&gt;'font-size-adjust'&lt;/span&gt;&lt;/a&gt; would compound).  &lt;/p&gt;&lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;pre&gt;P { font-size: 12pt; }&lt;br /&gt;BLOCKQUOTE { font-size: larger }&lt;br /&gt;EM { font-size: 150% }&lt;br /&gt;EM { font-size: 1.5em }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;div class="propdef"&gt; &lt;dl&gt;&lt;dt&gt;&lt;span class="index-def" title="'font-size-adjust'"&gt;&lt;a class="propdef-title" name="propdef-font-size-adjust"&gt;&lt;strong&gt;'font-size-adjust'&lt;/strong&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt; &lt;table class="propinfo" cellpadding="0" cellspacing="0"&gt; &lt;tbody&gt; &lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Value:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="syndata.html#value-def-number"&gt;&lt;span class="value-inst-number"&gt;&lt;number&gt;&lt;/span&gt;&lt;/a&gt; | none | &lt;a class="noxref" href="cascade.html#value-def-inherit"&gt;&lt;span class="value-inst-inherit"&gt;inherit&lt;/span&gt;&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Initial:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;none  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Applies to:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;all elements  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Inherited:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;yes  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Percentages:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;N/A  &lt;/td&gt;&lt;/tr&gt;&lt;tr valign="baseline"&gt; &lt;td&gt;&lt;em&gt;Media:&lt;/em&gt;   &lt;/td&gt;&lt;td&gt;&lt;a class="noxref" href="media.html#visual-media-group"&gt;visual&lt;/a&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt; &lt;p&gt;In &lt;a name="x23"&gt;&lt;span class="index-inst" title="bicameral"&gt;bicameral&lt;/span&gt;&lt;/a&gt;  scripts, the subjective apparent size and legibility of a font are less  dependent on their &lt;a class="noxref" href="fonts.html#propdef-font-size"&gt;&lt;span class="propinst-font-size"&gt;'font-size'&lt;/span&gt;&lt;/a&gt; value than on the value of their  &lt;a class="noxref" href="fonts.html#descdef-x-height"&gt;&lt;span class="descinst-x-height"&gt;'x-height'&lt;/span&gt;&lt;/a&gt;, or, more usefully, on the ratio  of these two values, called the &lt;a name="x24"&gt;&lt;span class="index-def" title="aspect value"&gt;&lt;dfn&gt;aspect value&lt;/dfn&gt;&lt;/span&gt;&lt;/a&gt; (font size divided by  x-height). The higher the aspect value, the more likely it is that a font at  smaller sizes will be legible. Inversely, faces with a lower aspect value will  become illegible more rapidly below a given threshold size than faces with a  higher aspect value. Straightforward font substitution that relies on font size  alone may lead to illegible characters.  &lt;/p&gt;&lt;p&gt;For example, the popular font Verdana has an aspect value of 0.58; when  Verdana's font size 100 units, its x-height is 58 units. For comparison, Times  New Roman has an aspect value of 0.46. Verdana will therefore tend to remain  legible at smaller sizes than Times New Roman. Conversely, Verdana will often  look 'too big' if substituted for Times New Roman at a chosen size.  &lt;/p&gt;&lt;p&gt;This property allows authors to specify an aspect value for an element that  will preserve the x-height of the first choice font in the substitute font.  Values have the following meanings:  &lt;/p&gt;&lt;dl&gt;&lt;dt&gt;&lt;strong&gt;none&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Do not preserve the font's x-height.  &lt;/dd&gt;&lt;dt&gt;&lt;span class="index-inst" title=""&gt;"&gt;&lt;a class="noxref" href="syndata.html#value-def-number" name="x25"&gt;&lt;span class="value-inst-number"&gt;&lt;strong&gt;&lt;number&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;  &lt;/dt&gt;&lt;dd&gt;Specifies the aspect value. The number refers to the aspect value of the  first choice font. The scaling factor for available fonts is computed according  to the following formula: &lt;pre&gt;  y(a/a') = c&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;where:&lt;/p&gt;&lt;pre&gt;y = 'font-size' of first-choice font&lt;br /&gt;a' = aspect value of available font&lt;br /&gt;c = 'font-size' to apply to available font&lt;br /&gt;&lt;/pre&gt;&lt;/dd&gt;&lt;/dl&gt; &lt;div class="example"&gt; &lt;p style="display: none;"&gt;Example(s):&lt;/p&gt; &lt;p&gt;For example, if 14px Verdana (with an aspect value of 0.58) was unavailable  and an available font had an aspect value of 0.46, the font-size of the  substitute would be 14 * (0.58/0.46) = 17.65px. &lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-8765128328725120278?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/8765128328725120278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=8765128328725120278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8765128328725120278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8765128328725120278'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/font-family-font-family-property.html' title='Font family: the &apos;font-family&apos; property'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-6811169750558828914</id><published>2008-03-14T11:33:00.001-07:00</published><updated>2008-03-14T11:33:25.780-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>A sample style sheet for HTML 4.0</title><content type='html'>&lt;p&gt;This style sheet describes the typical formatting of all HTML 4.0 (&lt;a class="noxref" href="refs.html#ref-HTML40" rel="biblioentry"&gt;&lt;span class="informref"&gt;[HTML40]&lt;/span&gt;&lt;/a&gt;) elements based on extensive research into  current UA practice. Developers are encouraged to use it as a default style  sheet in their implementations.  &lt;/p&gt;&lt;p&gt;The full presentation of some HTML elements cannot be expressed in CSS2,  including &lt;a href="conform.html#replaced-element"&gt;replaced&lt;/a&gt; elements (IMG,  OBJECT), scripting elements (SCRIPT, APPLET), form control elements, and frame  elements. &lt;/p&gt;&lt;pre class="example"&gt;ADDRESS,&lt;br /&gt;BLOCKQUOTE,&lt;br /&gt;BODY, DD, DIV,&lt;br /&gt;DL, DT,&lt;br /&gt;FIELDSET, FORM,&lt;br /&gt;FRAME, FRAMESET,&lt;br /&gt;H1, H2, H3, H4,&lt;br /&gt;H5, H6, IFRAME,&lt;br /&gt;NOFRAMES,&lt;br /&gt;OBJECT, OL, P,&lt;br /&gt;UL, APPLET,&lt;br /&gt;CENTER, DIR,&lt;br /&gt;HR, MENU, PRE   { display: block }&lt;br /&gt;LI              { display: list-item }&lt;br /&gt;HEAD            { display: none }&lt;br /&gt;TABLE           { display: table }&lt;br /&gt;TR              { display: table-row }&lt;br /&gt;THEAD           { display: table-header-group }&lt;br /&gt;TBODY           { display: table-row-group }&lt;br /&gt;TFOOT           { display: table-footer-group }&lt;br /&gt;COL             { display: table-column }&lt;br /&gt;COLGROUP        { display: table-column-group }&lt;br /&gt;TD, TH          { display: table-cell }&lt;br /&gt;CAPTION         { display: table-caption }&lt;br /&gt;TH              { font-weight: bolder; text-align: center }&lt;br /&gt;CAPTION         { text-align: center }&lt;br /&gt;BODY            { padding: 8px; line-height: 1.33 }&lt;br /&gt;H1              { font-size: 2em; margin: .67em 0 }&lt;br /&gt;H2              { font-size: 1.5em; margin: .83em 0 }&lt;br /&gt;H3              { font-size: 1.17em; margin: 1em 0 }&lt;br /&gt;H4, P,&lt;br /&gt;BLOCKQUOTE, UL,&lt;br /&gt;FIELDSET, FORM,&lt;br /&gt;OL, DL, DIR,&lt;br /&gt;MENU            { margin: 1.33em 0 }&lt;br /&gt;H5              { font-size: .83em; line-height: 1.17em; margin: 1.67em 0 }&lt;br /&gt;H6              { font-size: .67em; margin: 2.33em 0 }&lt;br /&gt;H1, H2, H3, H4,&lt;br /&gt;H5, H6, B,&lt;br /&gt;STRONG          { font-weight: bolder }&lt;br /&gt;BLOCKQUOTE      { margin-left: 40px; margin-right: 40px }&lt;br /&gt;I, CITE, EM,&lt;br /&gt;VAR, ADDRESS    { font-style: italic }&lt;br /&gt;PRE, TT, CODE,&lt;br /&gt;KBD, SAMP       { font-family: monospace }&lt;br /&gt;PRE             { white-space: pre }&lt;br /&gt;BIG             { font-size: 1.17em }&lt;br /&gt;SMALL, SUB, SUP { font-size: .83em }&lt;br /&gt;SUB             { vertical-align: sub }&lt;br /&gt;SUP             { vertical-align: super }&lt;br /&gt;S, STRIKE, DEL  { text-decoration: line-through }&lt;br /&gt;HR              { border: 1px inset }&lt;br /&gt;OL, UL, DIR,&lt;br /&gt;MENU, DD        { margin-left: 40px }&lt;br /&gt;OL              { list-style-type: decimal }&lt;br /&gt;OL UL, UL OL,&lt;br /&gt;UL UL, OL OL    { margin-top: 0; margin-bottom: 0 }&lt;br /&gt;U, INS          { text-decoration: underline }&lt;br /&gt;CENTER          { text-align: center }&lt;br /&gt;BR:before       { content: "\A" }&lt;br /&gt;&lt;br /&gt;/* An example of style for HTML 4.0's ABBR/ACRONYM elements */&lt;br /&gt;&lt;br /&gt;ABBR, ACRONYM   { font-variant: small-caps; letter-spacing: 0.1em }&lt;br /&gt;A[href]         { text-decoration: underline }&lt;br /&gt;:focus          { outline: thin dotted invert }&lt;br /&gt;&lt;br /&gt;&lt;a name="bidi"&gt;&lt;br /&gt;/* Begin bidirectionality settings (do not change) */&lt;br /&gt;BDO[DIR="ltr"]  { direction: ltr; unicode-bidi: bidi-override }&lt;br /&gt;BDO[DIR="rtl"]  { direction: rtl; unicode-bidi: bidi-override }&lt;br /&gt;&lt;br /&gt;*[DIR="ltr"]    { direction: ltr; unicode-bidi: embed }&lt;br /&gt;*[DIR="rtl"]    { direction: rtl; unicode-bidi: embed }&lt;br /&gt;&lt;br /&gt;/* Elements that are block-level in HTML4 */&lt;br /&gt;ADDRESS, BLOCKQUOTE, BODY, DD, DIV, DL, DT, FIELDSET,&lt;br /&gt;FORM, FRAME, FRAMESET, H1, H2, H3, H4, H5, H6, IFRAME,&lt;br /&gt;NOSCRIPT, NOFRAMES, OBJECT, OL, P, UL, APPLET, CENTER,&lt;br /&gt;DIR, HR, MENU, PRE, LI, TABLE, TR, THEAD, TBODY, TFOOT,&lt;br /&gt;COL, COLGROUP, TD, TH, CAPTION&lt;br /&gt;               { unicode-bidi: embed }&lt;br /&gt;/* End bidi settings */&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;@media print {&lt;br /&gt; @page         { margin: 10% }&lt;br /&gt; H1, H2, H3,&lt;br /&gt; H4, H5, H6    { page-break-after: avoid; page-break-inside: avoid }&lt;br /&gt; BLOCKQUOTE,&lt;br /&gt; PRE           { page-break-inside: avoid }&lt;br /&gt; UL, OL, DL    { page-break-before: avoid }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;@media speech {&lt;br /&gt; H1, H2, H3,&lt;br /&gt; H4, H5, H6    { voice-family: paul, male; stress: 20; richness: 90 }&lt;br /&gt; H1            { pitch: x-low; pitch-range: 90 }&lt;br /&gt; H2            { pitch: x-low; pitch-range: 80 }&lt;br /&gt; H3            { pitch: low; pitch-range: 70 }&lt;br /&gt; H4            { pitch: medium; pitch-range: 60 }&lt;br /&gt; H5            { pitch: medium; pitch-range: 50 }&lt;br /&gt; H6            { pitch: medium; pitch-range: 40 }&lt;br /&gt; LI, DT, DD    { pitch: medium; richness: 60 }&lt;br /&gt; DT            { stress: 80 }&lt;br /&gt; PRE, CODE, TT { pitch: medium; pitch-range: 0; stress: 0; richness: 80 }&lt;br /&gt; EM            { pitch: medium; pitch-range: 60; stress: 60; richness: 50 }&lt;br /&gt; STRONG        { pitch: medium; pitch-range: 60; stress: 90; richness: 90 }&lt;br /&gt; DFN           { pitch: high; pitch-range: 60; stress: 60 }&lt;br /&gt; S, STRIKE     { richness: 0 }&lt;br /&gt; I             { pitch: medium; pitch-range: 60; stress: 60; richness: 50 }&lt;br /&gt; B             { pitch: medium; pitch-range: 60; stress: 90; richness: 90 }&lt;br /&gt; U             { richness: 0 }&lt;br /&gt; A:link        { voice-family: harry, male }&lt;br /&gt; A:visited     { voice-family: betty, female }&lt;br /&gt; A:active      { voice-family: betty, female; pitch-range: 80; pitch: x-high }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-6811169750558828914?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/6811169750558828914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=6811169750558828914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6811169750558828914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/6811169750558828914'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/sample-style-sheet-for-html-40.html' title='A sample style sheet for HTML 4.0'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-626081274720368360</id><published>2008-03-14T11:31:00.000-07:00</published><updated>2008-03-14T11:32:29.890-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>About the CSS2 Specification</title><content type='html'>&lt;div class="subtoc"&gt; &lt;p&gt;&lt;strong&gt;Contents&lt;/strong&gt;  &lt;/p&gt;&lt;ul class="toc"&gt;&lt;li class="tocline2"&gt;&lt;a class="tocxref" href="about.html#q1"&gt;1.1 Reading the  specification&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline2"&gt;&lt;a class="tocxref" href="about.html#q2"&gt;1.2 How the  specification is organized&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline2"&gt;&lt;a class="tocxref" href="about.html#q3"&gt;1.3 Conventions&lt;/a&gt;  &lt;ul class="toc"&gt;&lt;li class="tocline3"&gt;&lt;a class="tocxref" href="about.html#q4"&gt;1.3.1 Document language  elements and attributes&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline3"&gt;&lt;a class="tocxref" href="about.html#property-defs"&gt;1.3.2 CSS  property definitions&lt;/a&gt;  &lt;ul class="toc"&gt;&lt;li class="tocline4"&gt;&lt;a class="tocxref" href="about.html#q6"&gt;Value&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline4"&gt;&lt;a class="tocxref" href="about.html#q7"&gt;Initial&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline4"&gt;&lt;a class="tocxref" href="about.html#q8"&gt;Applies to&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline4"&gt;&lt;a class="tocxref" href="about.html#q9"&gt;Inherited&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline4"&gt;&lt;a class="tocxref" href="about.html#q10"&gt;Percentage values&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline4"&gt;&lt;a class="tocxref" href="about.html#q11"&gt;Media groups&lt;/a&gt;  &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="tocline3"&gt;&lt;a class="tocxref" href="about.html#shorthand"&gt;1.3.3 Shorthand  properties&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline3"&gt;&lt;a class="tocxref" href="about.html#q13"&gt;1.3.4 Notes and  examples&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline3"&gt;&lt;a class="tocxref" href="about.html#q14"&gt;1.3.5 Images and long  descriptions&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt; &lt;/li&gt;&lt;li class="tocline2"&gt;&lt;a class="tocxref" href="about.html#q15"&gt;1.4  Acknowledgments&lt;/a&gt;  &lt;/li&gt;&lt;li class="tocline2"&gt;&lt;a class="tocxref" href="about.html#copyright"&gt;1.5 Copyright  Notice&lt;/a&gt; &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-626081274720368360?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/626081274720368360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=626081274720368360' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/626081274720368360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/626081274720368360'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/about-css2-specification.html' title='About the CSS2 Specification'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-8173095755493836890</id><published>2008-03-14T11:30:00.004-07:00</published><updated>2008-03-14T11:31:19.303-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Access to alternative representations of content</title><content type='html'>&lt;p&gt;CSS2 lets users access alternative representations of content that is  specified in attribute values when the following are used together:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;attribute selectors.  &lt;/li&gt;&lt;li&gt;the attr() function and the 'content' property'  &lt;/li&gt;&lt;li&gt;the :before and :after pseudo-elements &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;In the following example, the value of the "alt" attribute for the IMG  element is rendered after the image (visually, aurally, etc.):&lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt;IMG:after { content: attr(alt) }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Note that the value of the attribute is displayed even though the image may  not be (e.g., the user has turned off images through the user interface).  &lt;/p&gt;&lt;h3&gt;&lt;a name="Media"&gt;Media types&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;The CSS2 "media types" (used with @media rules) allow authors and users to  design style sheets that will cause documents to render more appropriately on  certain target devices. These style sheets can tailor content for presentation  on braille devices, speech synthesizers, or tty devices. Using "@media" rules  can also reduce download times by allowing user agents to ignore inapplicable  rules. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-8173095755493836890?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/8173095755493836890/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=8173095755493836890' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8173095755493836890'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8173095755493836890'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/access-to-alternative-representations.html' title='Access to alternative representations of content'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-8575266100832633513</id><published>2008-03-14T11:30:00.003-07:00</published><updated>2008-03-14T11:30:56.814-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS2 Generated content</title><content type='html'>&lt;p&gt;CSS2 includes several mechanisms that allow content to be generated from  style sheets:  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;the :before and :after pseudo-elements and the 'content' property. When used  together, these allow authors to insert markers (e.g., counters and constant  strings such as "End Example" in the examples below) before or after and  element's content.  &lt;/li&gt;&lt;li&gt;the 'cue', 'cue-before', and 'cue-after' properties. This properties allow  users to play a sound before or after an element's content.  &lt;/li&gt;&lt;li&gt;List styles, which may be numbers, glyphs, or images (usually associated  with the LI element in HTML). CSS2 adds international list styles to the styles  defined in CSS1. See th 'list-style-type' and 'content' properties. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Generated content can serve as markers to help users navigate a document and  stay oriented when they can't access visual clues such as proportional  scrollbars, frames with tables of contents, etc.  &lt;/p&gt;&lt;p&gt;For instance, the following user style sheet would cause the words "End  Example" to be generated after each example marked up with a special class value  in the document: &lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt;DIV.example:after {&lt;br /&gt;  content: End Example&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;Users could also, for example, number paragraphs so that they could locate  their current reading position in a document:&lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt;P:before {&lt;br /&gt;  content: counter(paragraph) ". " ;&lt;br /&gt;  counter-increment: paragraph&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;h3&gt;&lt;a name="ACSS"&gt;Aural Cascading Style Sheets&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;CSS2's aural properties provide information to non-sighted users and  voice-browser users much in the same way fonts provide visual information. The  following example show how various sound qualities (including 'voice-family',  which is something like an audio font) can let a user know that spoken content  is a header:&lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt;H1 {&lt;br /&gt;   voice-family: paul;&lt;br /&gt;   stress: 20;&lt;br /&gt;   richness: 90;&lt;br /&gt;   cue-before: url("ping.au")&lt;br /&gt;   }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;The following properties are part of CSS2's aural cascading style sheets.&lt;/p&gt; &lt;ul&gt;&lt;li&gt;'volume' controls the volume of spoken text.  &lt;/li&gt;&lt;li&gt;'speak' controls whether content will be spoken and, if so, whether it will  be spelled or spoken as words.  &lt;/li&gt;&lt;li&gt;'pause', 'pause-before', and 'pause-after' control pauses before and after  content is spoken. This allows users to separate content for better  comprehension.  &lt;/li&gt;&lt;li&gt;'cue', 'cue-before', and 'cue-after' specify a sound to be played before and  after content, which can be valuable for orientation (much like a visual icon).  &lt;/li&gt;&lt;li&gt;'play-during' controls background sounds while an element is rendered (much  like a background image).  &lt;/li&gt;&lt;li&gt;'azimuth' and 'elevation' provide dimension to sound, which allows users to  distinguish voices, for example.  &lt;/li&gt;&lt;li&gt;'speech-rate', 'voice-family', 'pitch', 'pitch-range', 'stress', and  'richness' control the quality of spoken content. By varying these properties  for different elements, users can fine-tune how content is presented aurally.  &lt;/li&gt;&lt;li&gt;'speak-punctuation' and 'speak-numeral' control how numbers and punctuation  are spoken, which has an effect on the quality of the experience of aural  browsing. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Furthermore, the 'speak-header' property describes how table header  information is to be spoken before a table cell. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-8575266100832633513?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/8575266100832633513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=8575266100832633513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8575266100832633513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/8575266100832633513'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css2-generated-content.html' title='CSS2 Generated content'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-1339414906440391991</id><published>2008-03-14T11:30:00.001-07:00</published><updated>2008-03-14T11:30:29.985-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>css User override of styles</title><content type='html'>&lt;p&gt;In order to ensure that users can control styles, CSS2 changes the semantics  of the "!important" operator defined in CSS1. In CSS1, authors always had final  say over styles. In CSS2, if a user's style sheet contains "!important", it  takes precedence over any applicable rule in an author's style sheet. This is an  important feature to users who require or must avoid certain color combinations  or contrasts, users who require large fonts, etc. For instance, the following  rule specifies a large font size for paragraph text and would override an author  rule of equal weight:&lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt;P { font-size: 24pt ! important }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;The CSS2 'inherit' value - available for every property - leads to compact  "!important" style rules that govern most or all of a document. For instance,  the following style rules force all backgrounds to white and all foreground  colors to black:&lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt; /*&lt;br /&gt;Sets the text color to black&lt;br /&gt;and the background color to&lt;br /&gt;white for the document body.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;BODY {&lt;br /&gt;  color: black ! important ; &lt;br /&gt;  background: white ! important&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;Causes the values of 'color' and 'background'&lt;br /&gt;to be inherited by all other elements,&lt;br /&gt;strengthened by !important. Note that this&lt;br /&gt;may be overridden by other, more specific,&lt;br /&gt;user styles.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;* {&lt;br /&gt;color: inherit ! important ;&lt;br /&gt;background: inherit ! important&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p&gt;CSS2 also includes these user control features:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;System colors (for 'color', 'background-color', 'border-color', and  'outline-color') and system fonts (for 'font') mean that users may apply their  system color and font preferences to Web documents.  &lt;/li&gt;&lt;li&gt;Dynamic outlines (the 'outline' property) allow users (e.g., with low  vision) to create outlines around content that don't affect layout but do  provide highlight information. &lt;/li&gt;&lt;/ul&gt; &lt;p&gt;For example, to draw a thick black line around an element when it has the  focus, and a thick red line when it is active, the following rules can be  used:&lt;/p&gt; &lt;div class="example"&gt;&lt;pre&gt; :focus  { outline: thick solid black }&lt;br /&gt;:active { outline: thick solid red }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-1339414906440391991?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/1339414906440391991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=1339414906440391991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1339414906440391991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1339414906440391991'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css-user-override-of-styles.html' title='css User override of styles'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3606051569094668394</id><published>2008-03-14T11:29:00.002-07:00</published><updated>2008-03-14T11:30:07.451-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='css articles'/><title type='text'>Spacing, alignment, and positioning</title><content type='html'>&lt;p&gt;CSS2 allows authors to control the visual placement of content on the page  through text indentation, margins, floats, and absolute and relative  positioning. By using CSS properties to achieve visual effects, authors can  write simpler HTML and eliminate images and non-breaking spaces ( )  used for positioning.  &lt;/p&gt;&lt;p&gt;The following properties give control over spacing, alignment, and  positioning:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;'text-indent', 'text-align', 'word-spacing', 'font-stretch'. Each of these  properties allows users to control spacing without adding additional spaces. For  example instead of writing "H E L L O" (which users generally recognize as the  word "hello" but users of speech recognition tools would hear as individual  letters), authors may create the same visual effect with the 'word-spacing'  property applied to "HELLO".  &lt;/li&gt;&lt;li&gt;'margin', 'margin-top', 'margin-right', 'margin-bottom', 'margin-left'. With  these properties, authors can create space on four sides of an element's content  instead of adding non-breaking spaces ( ), which are non-standard  mark-up, to create space around an element.  &lt;/li&gt;&lt;li&gt;'float', 'position', 'top', 'right', 'bottom', 'left'. With these  properties, the user can control the visual position of almost any element in a  manner independent of where the element appears in the document. Authors should  always design documents that make sense without style sheets (i.e., the document  should be written in a "logical" order) and then apply style sheets to achieve  visual effects. The positioning properties may be used to create margin notes  (which may be automatically numbered), side bars, frame-like effects, simple  headers and footers, and more.  &lt;/li&gt;&lt;li&gt;The 'empty-cells' property allows users to leave table cells empty and still  give them proper borders on the screen or on paper. A data cell that is meant to  be empty should not be filled with white space or a non-breaking space just to  achieve a visual effect. &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/7681105400300687252-3606051569094668394?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3606051569094668394/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3606051569094668394' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3606051569094668394'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3606051569094668394'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/spacing-alignment-and-positioning.html' title='Spacing, alignment, and positioning'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-3153191989999462359</id><published>2008-03-14T11:29:00.001-07:00</published><updated>2008-03-14T11:29:32.668-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Accessibility features in CSS2</title><content type='html'>&lt;p&gt;The following is a list of CSS2 features that affect accessibility (and the  sections where defined in the CSS2 specification). The sections following the  list elaborate on how these features affect accessibility.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;Note.&lt;/strong&gt; Property names are indicated by back quotes, the  convention used by the CSS1 and CSS2 specifications.  &lt;/p&gt;&lt;dl&gt;&lt;dt&gt;&lt;a href="#Positioning"&gt;Spacing, alignment, and positioning&lt;/a&gt;  &lt;/dt&gt;&lt;dd&gt;'text-indent' (16.1); 'text-align' (16.2); 'word-spacing' and  'letter-spacing' (16.4); 'font-stretch', (15.2.3); 'margin', 'margin-top',  'margin-right', 'margin-bottom', and 'margin-left' (8.3); 'float' (9.5.1),  'position' (9.3.1); 'top', 'right', 'bottom', and 'left' (9.3.2); 'empty-cells'  (17.6.1)  &lt;/dd&gt;&lt;dt&gt;&lt;a href="#UserControl"&gt;User override of styles&lt;/a&gt;  &lt;/dt&gt;&lt;dd&gt;!important (6.4.1); the 'inherit' value (6.2.1); system fonts (15.2.5);  system colors (18.2); list types (12.6.2); dynamic outlines ('outline',  'outline-width', 'outline-style', and 'outline-color') (18.4)  &lt;/dd&gt;&lt;dt&gt;&lt;a href="#Generated"&gt;Generated content&lt;/a&gt;  &lt;/dt&gt;&lt;dd&gt;:before/:after pseudo-elements (5.12.3, 12.1); 'content' (12.2); 'cue',  'cue-before', and 'cue-after' (19.5)  &lt;/dd&gt;&lt;dt&gt;&lt;a href="#ACSS"&gt;Aural style sheets&lt;/a&gt;  &lt;/dt&gt;&lt;dd&gt;'volume' (19.2); 'speak' (19.3); 'pause', 'pause-before', and 'pause-after'  (19.4); 'cue', 'cue-before', 'cue-after' (19.5); 'play-during' (19.6);  'azimuth', 'elevation' (19.7); 'speech-rate', 'voice-family', 'pitch',  'pitch-range', 'stress', and 'richness' (19.8); 'speak-punctuation' and  'speak-numeral' (19.9)  &lt;/dd&gt;&lt;dt&gt;&lt;a href="#Alt"&gt;Access to alternative content&lt;/a&gt;  &lt;/dt&gt;&lt;dd&gt;attribute selectors (5.8); the attr() function (12.2)  &lt;/dd&gt;&lt;dt&gt;WebFonts  &lt;/dt&gt;&lt;dd&gt;See Chapter 15 of the CSS2 specification. &lt;/dd&gt;&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-3153191989999462359?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/3153191989999462359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=3153191989999462359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3153191989999462359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/3153191989999462359'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/accessibility-features-in-css2.html' title='Accessibility features in CSS2'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-7392586078243135199</id><published>2008-03-14T11:26:00.000-07:00</published><updated>2008-03-14T11:29:02.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='css articles'/><title type='text'>How Style Sheets Benefit Accessibility</title><content type='html'>&lt;p&gt;CSS benefits accessibility primarily by separating document structure from  presentation. Style sheets were designed to allow precise control - outside of  markup - of character spacing, text alignment, object position on the page,  audio and speech output, font characteristics, etc. By separating style from  markup, authors can simplify and clean up the HTML in their documents, making  the documents more accessible at the same time.  &lt;/p&gt;&lt;p&gt;CSS allows precise control over spacing, alignment and positioning. Authors  can thereby avoid "tag misuse" - the practice of misusing a structural element  for its expected stylistic effects. For example, while the BLOCKQUOTE and TABLE  elements in HTML are meant to mark up quotations and tabular data, they are  frequently used to create visual effects instead such as indentation and  alignment. When specialized browsing software such as a speech synthesizer  encounters elements that are misused in this way, the results can be  unintelligible to the user.  &lt;/p&gt;&lt;p&gt;In addition to preventing element misuse, style sheets can help reduce image  misuse. For instance, authors sometimes use 1-pixel invisible images to position  content. This not only bloats documents, making them slow to download, but can  also confuse software agents looking for alternative text (the "alt" attribute)  for these images. CSS positioning properties mean that invisible images are no  longer required to control positioning.  &lt;/p&gt;&lt;p&gt;CSS provides precise control over font size, color, and style. Some authors  have used images to represent text in a particular font when they are uncertain  of the availability of the font on the client's machine. Text in images is not  accessible to specialized software such as screen readers, nor can it be  cataloged by search robots. To remedy this situation, the powerful WebFonts of  CSS allows users much greater control of client-side font information. With  WebFonts, authors can rely on fallback mechanisms on the client when the  author's preferred fonts are not available. Fonts can be substituted with more  accuracy, synthesized by client software, and even downloaded from the Web, all  according to author specification.  &lt;/p&gt;&lt;p&gt;CSS allows users to override author styles. This is very important to users  who cannot perceive a page with the author's chosen fonts and color. CSS allows  users to view documents with their own preferred fonts, colors, etc. by  specifying them in a user style sheet.  &lt;/p&gt;&lt;p&gt;CSS provides support for automatically generated numbers, markers, and other  content that can help users stay oriented within a document. Long lists, tables,  or documents are easier to navigate when numbers or other contextual clues are  provided in an accessible manner.  &lt;/p&gt;&lt;p&gt;CSS supports aural style sheets, which specify how a document will sound when  rendered as speech. Aural style sheets (or "ACSS" for short) allow authors and  users to specify the volume of spoken content, background sounds, spatial  properties for sound, and a host of other properties that can add effects to  synthesized speech analogous to those achieved with styled fonts for visual  output.  &lt;/p&gt;&lt;p&gt;CSS provides more precise control over the display of alternative content  than HTML alone. CSS2 selectors give access to attribute values, often used to  provide alternative content. In CSS2, attribute values may be rendered in a  document along with an element's primary content.  &lt;/p&gt;&lt;h3&gt;&lt;a name="Implementations"&gt;CSS Implementations&lt;/a&gt;&lt;/h3&gt; &lt;p&gt;At the publication of this NOTE, widely deployed browsers do not implement  CSS consistently. However, the latest generation of browsers from a number of  vendors demonstrates solid implementations of most of CSS1 and much of CSS2, and  implementations continue to improve.  &lt;/p&gt;&lt;p&gt;Obviously, the benefits of the features described in this document will not  be realized without proper implementation of CSS1 and CSS2. Part of designing an  accessible document with CSS involves ensuring that the document remains  accessible when style sheets are turned off or not supported.  &lt;/p&gt;&lt;p&gt;Until most browsers support CSS consistently, content developers may still  create accessible documents that mix supported features of CSS with some  presentation features of HTML. Documents that use HTML presentation features  instead of CSS must transform gracefully. For example, tables used for layout  must make sense when rendered serially. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-7392586078243135199?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/7392586078243135199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=7392586078243135199' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7392586078243135199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/7392586078243135199'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/how-style-sheets-benefit-accessibility.html' title='How Style Sheets Benefit Accessibility'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-1016963803672036945</id><published>2008-03-14T11:24:00.003-07:00</published><updated>2008-03-14T11:24:49.474-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS3 Color profile</title><content type='html'>&lt;table class="tprofile" border="1" width="75%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th class="title" colspan="2"&gt;&lt;span class="modulename"&gt;CSS3 Color&lt;/span&gt; profile  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Specification  &lt;/th&gt;&lt;td&gt;HTML4  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Accepts  &lt;/th&gt;&lt;td&gt;HTML4 color keywords&lt;br /&gt;RGB six digit hex color values  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Excludes  &lt;/th&gt;&lt;td&gt;'color' property&lt;br /&gt;'opacity' property&lt;br /&gt;'color-profile'  property&lt;br /&gt;'rendering-intent' property&lt;br /&gt;@color-profile rule&lt;br /&gt;RGB three  digit hex color values and RGB functional notation color value&lt;br /&gt;RGBA color  values&lt;br /&gt;HSL and HSLA color values&lt;br /&gt;SVG color keywords&lt;br /&gt;'currentColor'  color value&lt;br /&gt;CSS2 UI Colors&lt;br /&gt;'transparent' color value&lt;br /&gt;'flavor' color  value  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Extra constraints  &lt;/th&gt;&lt;td&gt;none. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;table class="tprofile" border="1" width="75%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th class="title" colspan="2"&gt;&lt;span class="modulename"&gt;CSS3 Color&lt;/span&gt; profile  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Specification  &lt;/th&gt;&lt;td&gt;CSS level 1  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Accepts  &lt;/th&gt;&lt;td&gt;'color' property&lt;br /&gt;HTML4 color keywords&lt;br /&gt;RGB color values  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Excludes  &lt;/th&gt;&lt;td&gt;'opacity' property&lt;br /&gt;'color-profile' property&lt;br /&gt;'rendering-intent'  property&lt;br /&gt;@color-profile rule&lt;br /&gt;RGBA color values&lt;br /&gt;HSL and HSLA color  values&lt;br /&gt;SVG color keywords&lt;br /&gt;'currentColor' color value&lt;br /&gt;CSS2 UI  Colors&lt;br /&gt;'transparent' color value&lt;br /&gt;'flavor' color value  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Extra constraints  &lt;/th&gt;&lt;td&gt;none. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;table class="tprofile" border="1" width="75%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th class="title" colspan="2"&gt;&lt;span class="modulename"&gt;CSS3 Color&lt;/span&gt; profile  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Specification  &lt;/th&gt;&lt;td&gt;CSS level 2  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Accepts  &lt;/th&gt;&lt;td&gt;'color' property&lt;br /&gt;HTML4 color keywords&lt;br /&gt;RGB color values&lt;br /&gt;CSS2 UI  Colors&lt;br /&gt;'transparent' color value  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Excludes  &lt;/th&gt;&lt;td&gt;'opacity' property&lt;br /&gt;'color-profile' property&lt;br /&gt;'rendering-intent'  property&lt;br /&gt;@color-profile rule&lt;br /&gt;RGBA color values&lt;br /&gt;HSL and HSLA color  values&lt;br /&gt;SVG color keywords&lt;br /&gt;'currentColor' color value&lt;br /&gt;'flavor' color  value  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Extra constraints  &lt;/th&gt;&lt;td&gt;'transparent' color value not valid for 'color' property.  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt; &lt;table class="tprofile" border="1" width="75%"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th class="title" colspan="2"&gt;&lt;span class="modulename"&gt;CSS3 Color&lt;/span&gt; profile  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Specification  &lt;/th&gt;&lt;td&gt;SVG 1.0 and 1.1  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Accepts  &lt;/th&gt;&lt;td&gt;'color' property&lt;br /&gt;'opacity' property&lt;br /&gt;@color-profile rule&lt;br /&gt;HTML4 color  keywords&lt;br /&gt;RGB color values&lt;br /&gt;CSS2 UI Colors&lt;br /&gt;SVG color  keywords&lt;br /&gt;'currentColor' color value  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Excludes  &lt;/th&gt;&lt;td&gt;'color-profile' property&lt;br /&gt;'rendering-intent' property&lt;br /&gt;RGBA color  values&lt;br /&gt;HSL and HSLA color values&lt;br /&gt;'transparent' color value&lt;br /&gt;'flavor'  color value  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;th&gt;Extra constraints  &lt;/th&gt;&lt;td&gt;'currentColor' color value not valid for 'color' property. &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-1016963803672036945?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/1016963803672036945/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=1016963803672036945' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1016963803672036945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/1016963803672036945'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css3-color-profile.html' title='CSS3 Color profile'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-2252139176204183571</id><published>2008-03-14T11:24:00.001-07:00</published><updated>2008-03-14T11:24:23.865-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>Sample style sheet for (X)HTML</title><content type='html'>&lt;p&gt;This appendix is informative, not normative. This style sheet could be used  by an implementation as part of its default styling of HTML4, XHTML1, XHTML1.1,  XHTML Basic, and other XHTML Family documents. &lt;/p&gt;&lt;pre&gt;html {&lt;br /&gt; color: black;&lt;br /&gt; background: white;&lt;br /&gt; color-profile: sRGB;&lt;br /&gt; rendering-intent: auto&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;body[text] {&lt;br /&gt;   color: attr(text,color};&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;body[bgcolor],table[bgcolor],tr[bgcolor],td[bgcolor],th[bgcolor] {&lt;br /&gt;   background-color: attr(bgcolor,color);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;font[color] {&lt;br /&gt;   color: attr(color,color);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* traditional desktop user agent colors for hyperlinks */&lt;br /&gt;:link    { color: blue; }  &lt;br /&gt;:visited { color: purple; }&lt;br /&gt;&lt;br /&gt;img,object {&lt;br /&gt; color-profile: auto;&lt;br /&gt; rendering-intent: auto&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* default focus outline */&lt;br /&gt;:focus {&lt;br /&gt; outline: 1px dotted gray;&lt;br /&gt; outline: 1px solid flavor;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-2252139176204183571?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/2252139176204183571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=2252139176204183571' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2252139176204183571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/2252139176204183571'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/sample-style-sheet-for-xhtml.html' title='Sample style sheet for (X)HTML'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-5739585646184342486</id><published>2008-03-14T11:23:00.001-07:00</published><updated>2008-03-14T11:23:52.543-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS System Colors</title><content type='html'>&lt;h4 id="css2-system"&gt;CSS2 System Colors&lt;/h4&gt; &lt;p&gt;&lt;strong&gt;Deprecated.&lt;/strong&gt; In addition to being able to assign pre-defined  color values to text, backgrounds, etc., &lt;a href="http://www.w3.org/TR/REC-CSS2/ui.html#system-colors"&gt;CSS2&lt;/a&gt; allowed  authors to specify colors in a manner that integrated them into the user's  graphic environment.  &lt;/p&gt;&lt;p&gt;For systems that do not have a corresponding value, the specified value  should be mapped to the nearest system color value, or to a default color. Note  that some profiles of CSS may not support System Colors at all.  &lt;/p&gt;&lt;p&gt;The following lists additional values for color-related CSS values and their  general meaning. Any color property can take one of the following names.  Although these are case-insensitive, it is recommended that the mixed  capitalization shown below be used, to make the names more legible.  &lt;/p&gt;&lt;dl&gt;&lt;dt&gt;&lt;strong&gt;ActiveBorder&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Active window border.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ActiveCaption&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Active window caption.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;AppWorkspace&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Background color of multiple document interface.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;Background&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Desktop background.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ButtonFace&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Face color for three-dimensional display elements.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ButtonHighlight&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Dark shadow for three-dimensional display elements (for edges facing away  from the light source).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ButtonShadow&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Shadow color for three-dimensional display elements.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ButtonText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text on push buttons.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;CaptionText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text in caption, size box, and scrollbar arrow box.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;GrayText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Grayed (disabled) text. This color is set to #000 if the current display  driver does not support a solid gray color.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;Highlight&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Item(s) selected in a control.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;HighlightText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text of item(s) selected in a control.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;InactiveBorder&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Inactive window border.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;InactiveCaption&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Inactive window caption.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;InactiveCaptionText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Color of text in an inactive caption.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;InfoBackground&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Background color for tooltip controls.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;InfoText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text color for tooltip controls.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;Menu&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Menu background.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;MenuText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text in menus.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;Scrollbar&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Scroll bar gray area.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ThreeDDarkShadow&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Dark shadow for three-dimensional display elements.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ThreeDFace&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Face color for three-dimensional display elements.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ThreeDHighlight&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Highlight color for three-dimensional display elements.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ThreeDLightShadow&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Light color for three-dimensional display elements (for edges facing the  light source).  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;ThreeDShadow&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Dark shadow for three-dimensional display elements.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;Window&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Window background.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;WindowFrame&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Window frame.  &lt;/dd&gt;&lt;dt&gt;&lt;strong&gt;WindowText&lt;/strong&gt;  &lt;/dt&gt;&lt;dd&gt;Text in windows. &lt;/dd&gt;&lt;/dl&gt; &lt;div class="deprecated-example"&gt; &lt;p style="display: none;"&gt;DEPRECATED EXAMPLE(S):  &lt;/p&gt;&lt;p&gt;For example, to set the foreground and background colors of a paragraph to  the same foreground and background colors of the user's window, write the  following: &lt;/p&gt;&lt;pre&gt;p { color: WindowText; background-color: Window }&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt; &lt;p class="note"&gt;&lt;strong&gt;Note.&lt;/strong&gt; The computed value of a System Color  keyword value is the keyword itself.  &lt;/p&gt;&lt;p&gt;The CSS2 System Color values have been deprecated in favor of the CSS3 UI  'appearance' property for specifying the complete look of user interface related  elements. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7681105400300687252-5739585646184342486?l=css3examples.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://css3examples.blogspot.com/feeds/5739585646184342486/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7681105400300687252&amp;postID=5739585646184342486' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5739585646184342486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7681105400300687252/posts/default/5739585646184342486'/><link rel='alternate' type='text/html' href='http://css3examples.blogspot.com/2008/03/css-system-colors_14.html' title='CSS System Colors'/><author><name>jon</name><uri>http://www.blogger.com/profile/07893884823282842200</uri><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-7681105400300687252.post-6207510511551948558</id><published>2008-03-14T11:22:00.002-07:00</published><updated>2008-03-14T11:23:27.479-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='W3C CSS3'/><category scheme='http://www.blogger.com/atom/ns#' term='Advance CSS3'/><title type='text'>CSS SVG color keywords</title><content type='html'>&lt;p&gt;The table below provides a list of the X11 colors &lt;a href="#X11COLORS" rel="biblioentry"&gt;[X11COLORS]&lt;/a&gt; supported by popular browsers with the addition  of gray/grey variants from SVG 1.0. The resulting list is precisely the same as  the &lt;a href="http://www.w3.org/TR/SVG/types.html#ColorKeywords"&gt;SVG 1.0 color  keyword names&lt;/a&gt;. The two color swatches on the left illustrate setting the  background color of a table cell in two ways: The first column uses the named  color value, and the second column uses the respective numeric color value.  &lt;table class="x11colortable"&gt; &lt;tbody&gt; &lt;tr&gt; &lt;th style="background: black none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;Named  &lt;/th&gt;&lt;th&gt;Numeric  &lt;/th&gt;&lt;th&gt;Color name  &lt;/th&gt;&lt;th&gt;Hex rgb  &lt;/th&gt;&lt;th&gt;Decimal  &lt;/th&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: aliceblue none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(240, 248, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;aliceblue  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#f0f8ff  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;240,248,255  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: antiquewhite none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(250, 235, 215) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;antiquewhite  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#faebd7  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;250,235,215  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: aqua none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 255, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;aqua  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#00ffff  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,255,255  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: aquamarine none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(127, 255, 212) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;aquamarine  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#7fffd4  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;127,255,212  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: azure none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(240, 255, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;azure  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#f0ffff  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;240,255,255  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: beige none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(245, 245, 220) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;beige  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#f5f5dc  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;245,245,220  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: bisque none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(255, 228, 196) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;bisque  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#ffe4c4  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;255,228,196  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: black none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 0, 0) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;black  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#000000  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,0,0  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: blanchedalmond none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(255, 235, 205) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;blanchedalmond  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#ffebcd  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;255,235,205  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: blue none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 0, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;blue  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#0000ff  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,0,255  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: blueviolet none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(138, 43, 226) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;blueviolet  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#8a2be2  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;138,43,226  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: brown none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(165, 42, 42) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;brown  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#a52a2a  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;165,42,42  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: burlywood none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(222, 184, 135) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;burlywood  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#deb887  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;222,184,135  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: cadetblue none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(95, 158, 160) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;cadetblue  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#5f9ea0  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;95,158,160  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: chartreuse none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(127, 255, 0) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;chartreuse  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#7fff00  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;127,255,0  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: chocolate none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(210, 105, 30) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;chocolate  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#d2691e  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;210,105,30  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: coral none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(255, 127, 80) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;coral  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#ff7f50  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;255,127,80  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: cornflowerblue none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(100, 149, 237) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;cornflowerblue  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#6495ed  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;100,149,237  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: cornsilk none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(255, 248, 220) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;cornsilk  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#fff8dc  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;255,248,220  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: crimson none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(220, 20, 60) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;crimson  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#dc143c  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;220,20,60  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: cyan none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 255, 255) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;cyan  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#00ffff  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,255,255  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkblue none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 0, 139) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkblue  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#00008b  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,0,139  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkcyan none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 139, 139) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkcyan  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#008b8b  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,139,139  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkgoldenrod none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(184, 134, 11) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkgoldenrod  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#b8860b  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;184,134,11  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkgray none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(169, 169, 169) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkgray  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#a9a9a9  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;169,169,169  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkgreen none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(0, 100, 0) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkgreen  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#006400  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;0,100,0  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(169, 169, 169) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkgrey  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#a9a9a9  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;169,169,169  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkkhaki none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(189, 183, 107) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkkhaki  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#bdb76b  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;189,183,107  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkmagenta none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(139, 0, 139) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkmagenta  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#8b008b  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;139,0,139  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkolivegreen none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(85, 107, 47) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkolivegreen  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#556b2f  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;85,107,47  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkorange none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(255, 140, 0) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkorange  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#ff8c00  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;255,140,0  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkorchid none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(153, 50, 204) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkorchid  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#9932cc  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;153,50,204  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkred none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(139, 0, 0) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkred  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#8b0000  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;139,0,0  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darksalmon none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(233, 150, 122) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darksalmon  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#e9967a  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;233,150,122  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkseagreen none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(143, 188, 143) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkseagreen  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#8fbc8f  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;143,188,143  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkslateblue none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(72, 61, 139) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkslateblue  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#483d8b  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;72,61,139  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td class="c" style="background: darkslategray none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td class="c" style="background: rgb(47, 79, 79) none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;   &lt;/td&gt;&lt;td&gt;darkslategray  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"&gt;#2f4f4f  &lt;/td&gt;&lt;td class="c" style="background: silver none repeat scroll 0% 50%; -moz-backgroun
