<?xml version="1.0" encoding="UTF-8" standalone="no"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:gd="http://schemas.google.com/g/2005" xmlns:georss="http://www.georss.org/georss" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:thr="http://purl.org/syndication/thread/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-7681105400300687252</atom:id><lastBuildDate>Sat, 05 Oct 2024 02:14:27 +0000</lastBuildDate><category>Advance CSS3</category><category>W3C CSS3</category><category>CSS Aural</category><category>CSS Borders</category><category>CSS International</category><category>CSS Text</category><category>CSS Color and Backgrounds</category><category>CSS Positioning</category><category>About CSS3</category><category>CSS Font</category><category>CSS Printing</category><category>CSS Scrollbars</category><category>CSS Dimensions</category><category>CSS Tables</category><category>css articles</category><category>CSS Classification</category><category>CSS Dynamic Content</category><category>CSS Generated Content</category><category>CSS Lists</category><category>CSS Margins</category><category>CSS Padding</category><category>CSS Shortcuts</category><category>CSS Outline</category><category>CSS Tutorial</category><category>CSS3 Info</category><category>eyovurc</category><title>CSS3 Examples</title><description></description><link>http://css3examples.blogspot.com/</link><managingEditor>noreply@blogger.com (jon)</managingEditor><generator>Blogger</generator><openSearch:totalResults>267</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><language>en-us</language><itunes:explicit>no</itunes:explicit><itunes:subtitle/><itunes:owner><itunes:email>noreply@blogger.com</itunes:email></itunes:owner><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-3810830248936938103</guid><pubDate>Mon, 21 Jul 2008 16:35:00 +0000</pubDate><atom:updated>2008-07-21T09:38:51.734-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">CSS Shortcuts</category><title>Keyboard Shortcuts</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/07/keyboard-shortcuts.html</link><author>noreply@blogger.com (jon)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-6425382294310137661</guid><pubDate>Mon, 21 Jul 2008 16:25:00 +0000</pubDate><atom:updated>2008-07-21T09:31:06.655-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS Tutorial</category><title>CASCADING STYLE SHEETS TUTORIAL PART 3 OF 3</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/07/cascading-style-sheets-tutorial-part-3.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-5834927287111759670</guid><pubDate>Mon, 21 Jul 2008 16:23:00 +0000</pubDate><atom:updated>2008-07-21T09:30:21.344-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS Tutorial</category><title>CASCADING STYLE SHEETS TUTORIAL PART 2 </title><description>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;</description><link>http://css3examples.blogspot.com/2008/07/cascading-style-sheets-tutorial-part-2.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-118287967247100548</guid><pubDate>Mon, 21 Jul 2008 16:21:00 +0000</pubDate><atom:updated>2008-07-21T09:28:57.909-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">css articles</category><title>CASCADING STYLE SHEETS TUTORIAL </title><description>&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;</description><link>http://css3examples.blogspot.com/2008/07/cascading-style-sheets-tutorial.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-1414387015377579031</guid><pubDate>Mon, 21 Jul 2008 16:17:00 +0000</pubDate><atom:updated>2008-07-21T09:19:32.729-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS Shortcuts</category><title>Top CSS Shortcuts</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/07/top-css-shortcuts.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-4996998775615984031</guid><pubDate>Mon, 21 Jul 2008 16:14:00 +0000</pubDate><atom:updated>2008-07-21T09:16:21.654-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS Shortcuts</category><title>CSS  Shortcuts Tutorial</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/07/css-shortcuts-tutorial.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-607093934935534081</guid><pubDate>Mon, 21 Jul 2008 16:12:00 +0000</pubDate><atom:updated>2008-07-21T09:14:03.311-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS Shortcuts</category><title>CSS: Shortcuts tips</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/07/css-shortcuts-tips.html</link><author>noreply@blogger.com (jon)</author><thr:total>1</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-1705824926248248729</guid><pubDate>Mon, 21 Jul 2008 16:10:00 +0000</pubDate><atom:updated>2008-07-21T09:12:17.680-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">CSS Shortcuts</category><title>CSS Shortcuts</title><description>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.</description><link>http://css3examples.blogspot.com/2008/07/css-shortcuts.html</link><author>noreply@blogger.com (jon)</author><thr:total>2</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-8421352530783940534</guid><pubDate>Fri, 27 Jun 2008 19:10:00 +0000</pubDate><atom:updated>2008-06-27T12:19:29.326-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>Arrow Bullet List Menu</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/arrow-bullet-list-menu.html</link><author>noreply@blogger.com (jon)</author><thr:total>1</thr:total><enclosure length="-1" type="application/octet-stream" url="http://www.dynamicdrive.com/style/csslibrary/category/C5/"/><itunes:explicit>no</itunes:explicit><itunes:subtitle>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! Note: For a version of this menu that dynamically expands and hides its sub menus, see Accordion Menu. Demo: CSS Library Horizontal CSS Menus Vertical CSS Menus Image CSS Form CSS DIVs and containers Links &amp;amp; Buttons Other Browse All CSS Drive CSS Gallery Menu Gallery Web Design News CSS Examples CSS Compressor CSS Forums The two images used: The CSS: Select Code Expand .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; } The HTML: Select Code Expand CSS Library Horizontal CSS Menus Vertical CSS Menus Image CSS Form CSS DIVs and containers Links &amp;amp; Buttons Other Browse All CSS Drive CSS Gallery Menu Gallery Web Design News CSS Examples CSS Compressor CSS Forums</itunes:subtitle><itunes:author>noreply@blogger.com (jon)</itunes:author><itunes:summary>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! Note: For a version of this menu that dynamically expands and hides its sub menus, see Accordion Menu. Demo: CSS Library Horizontal CSS Menus Vertical CSS Menus Image CSS Form CSS DIVs and containers Links &amp;amp; Buttons Other Browse All CSS Drive CSS Gallery Menu Gallery Web Design News CSS Examples CSS Compressor CSS Forums The two images used: The CSS: Select Code Expand .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; } The HTML: Select Code Expand CSS Library Horizontal CSS Menus Vertical CSS Menus Image CSS Form CSS DIVs and containers Links &amp;amp; Buttons Other Browse All CSS Drive CSS Gallery Menu Gallery Web Design News CSS Examples CSS Compressor CSS Forums</itunes:summary><itunes:keywords>Advance CSS3</itunes:keywords></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-4868912464656783321</guid><pubDate>Fri, 27 Jun 2008 19:04:00 +0000</pubDate><atom:updated>2008-06-27T12:08:14.904-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>png transparency problems</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/png-transparency-problems.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-7770494193329738990</guid><pubDate>Fri, 27 Jun 2008 18:53:00 +0000</pubDate><atom:updated>2008-06-27T11:58:15.314-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">About CSS3</category><title>What it's all about...</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/what-its-all-about.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-3919435903378258459</guid><pubDate>Fri, 27 Jun 2008 18:49:00 +0000</pubDate><atom:updated>2008-06-27T11:53:18.970-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>Most used CSS Tricks</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/most-used-css-tricks.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-2489539643154343097</guid><pubDate>Fri, 27 Jun 2008 18:47:00 +0000</pubDate><atom:updated>2008-06-27T11:49:00.405-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>CSS HACKS</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/css-hacks.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-2781342986327800145</guid><pubDate>Fri, 27 Jun 2008 18:44:00 +0000</pubDate><atom:updated>2008-06-27T11:46:56.703-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>CSS and Round Corners: Build Boxes with Curves</title><description>&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; </description><link>http://css3examples.blogspot.com/2008/06/css-and-round-corners-build-boxes-with.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-9076191435287819776</guid><pubDate>Fri, 27 Jun 2008 18:42:00 +0000</pubDate><atom:updated>2008-06-27T11:44:51.032-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>CSS and Round Corners: Build Accessible Menu Tabs</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/css-and-round-corners-build-accessible.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-3996418950834008463</guid><pubDate>Fri, 27 Jun 2008 18:40:00 +0000</pubDate><atom:updated>2008-06-27T11:42:14.884-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>Style Web Forms Using CSS</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/style-web-forms-using-css_27.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-7137943330418896917</guid><pubDate>Fri, 27 Jun 2008 18:36:00 +0000</pubDate><atom:updated>2008-06-27T11:38:24.388-07:00</atom:updated><title>Style Web Forms Using CSS</title><description>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.</description><link>http://css3examples.blogspot.com/2008/06/style-web-forms-using-css.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-28411657468806291</guid><pubDate>Fri, 27 Jun 2008 18:33:00 +0000</pubDate><atom:updated>2008-06-27T11:36:08.947-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>70 Expert Ideas For Better CSS Coding</title><description>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;</description><link>http://css3examples.blogspot.com/2008/06/70-expert-ideas-for-better-css-coding.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-6888832320531696172</guid><pubDate>Fri, 27 Jun 2008 18:19:00 +0000</pubDate><atom:updated>2008-06-27T11:29:10.060-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>Top CSS Tips</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/06/top-css-tips.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-7625731787209363806</guid><pubDate>Fri, 14 Mar 2008 18:53:00 +0000</pubDate><atom:updated>2008-03-14T11:55:27.604-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">W3C CSS3</category><title>Lists: the 'list-style-type', 'list-style-image', 'list-style-position', and 'list-style' properties</title><description>&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;</description><link>http://css3examples.blogspot.com/2008/03/lists-list-style-type-list-style-image.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-3386398547598278161</guid><pubDate>Fri, 14 Mar 2008 18:53:00 +0000</pubDate><atom:updated>2008-03-14T11:53:54.877-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><title>Markers and lists</title><description>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;</description><link>http://css3examples.blogspot.com/2008/03/markers-and-lists.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-2244845219420134415</guid><pubDate>Fri, 14 Mar 2008 18:52:00 +0000</pubDate><atom:updated>2008-03-14T11:53:01.030-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">W3C CSS3</category><title>Counters in elements with 'display: none'</title><description>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.</description><link>http://css3examples.blogspot.com/2008/03/counters-in-elements-with-display-none.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-3156114691490574447</guid><pubDate>Fri, 14 Mar 2008 18:51:00 +0000</pubDate><atom:updated>2008-03-14T11:52:31.298-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">W3C CSS3</category><title>css Counter styles</title><description>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) }</description><link>http://css3examples.blogspot.com/2008/03/css-counter-styles.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-6366036999512912656</guid><pubDate>Fri, 14 Mar 2008 18:51:00 +0000</pubDate><atom:updated>2008-03-14T11:51:57.162-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">W3C CSS3</category><title>Nested counters and scope</title><description>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 }</description><link>http://css3examples.blogspot.com/2008/03/nested-counters-and-scope.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-7681105400300687252.post-4483785848446242067</guid><pubDate>Fri, 14 Mar 2008 18:51:00 +0000</pubDate><atom:updated>2008-03-14T11:51:29.418-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Advance CSS3</category><category domain="http://www.blogger.com/atom/ns#">CSS Text</category><category domain="http://www.blogger.com/atom/ns#">W3C CSS3</category><title>Automatic counters and numbering</title><description>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 }</description><link>http://css3examples.blogspot.com/2008/03/automatic-counters-and-numbering.html</link><author>noreply@blogger.com (jon)</author><thr:total>0</thr:total></item></channel></rss>