<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-231895155465040286</id><updated>2011-04-22T04:51:58.817+05:30</updated><category term='class versus id'/><category term='web technology'/><category term='advance css'/><category term='css design principles'/><category term='css'/><category term='css tips'/><category term='tips'/><category term='chander'/><category term='class'/><category term='css features'/><category term='id'/><category term='css2'/><category term='best css'/><category term='design principles'/><title type='text'>Think Big , Think Unique !!</title><subtitle type='html'>Hi ! I am a Web Developer . I like to Play with CSS and HTML and Internet. But I have Same Interest in Web and Gaphic Designing</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://taknokrat.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://taknokrat.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Chanderkant Jangra</name><uri>http://www.blogger.com/profile/03991982539182021909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm2.static.flickr.com/1357/556078056_c769d6f24e.jpg?v=0'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-231895155465040286.post-1877197130310269431</id><published>2008-01-21T11:13:00.000+05:30</published><updated>2008-01-21T11:22:15.625+05:30</updated><title type='text'>12 most important tips which every designer should know</title><content type='html'>&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;On internet everybody is in hurry, you, as a web designer, should communicate why the visitor should spend time on your designed website. And this message should be communicated very FAST. Often, designers totally concentrate on the good outer look of the site and forget this goal. These are few things which every professional designers should keep in mind while designing the site. These tips not only improves search engine rankings but they also increases user interaction with the site thus higher conversions are achieved.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Page Titles&lt;/strong&gt;: Often designers use WYSISYG editor, editors generally put a default title in the pages which is not relevant. So whenever you design a page make sure that you put appropriate titles that are relevant to the individual pages.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Meta&lt;/strong&gt;&lt;strong&gt; Tags&lt;/strong&gt;: There are generally 2 cases that occurs in relation to meta tags. Either the designers do not insert meta tags on the pages or they insert too many meta tags on the pages which does not offer any real benefit. There are, however, 3 meta tags which must be inserted in every page :-&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style="font-family: verdana;" type="disc"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&amp;lt;meta http-equiv="Content-Type" content="application/xhtml+xml; charset=character set here" /&amp;gt; &lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&amp;lt;meta name="Description" content="small page description here" /&amp;gt; &lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&amp;lt;meta name="Keywords" content="keywords here" /&amp;gt; &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;strong style="font-family: verdana;"&gt;JavaScript Codes&lt;/strong&gt;&lt;span style="font-family:verdana;"&gt;: Many a times it has been seen that designers put JavaScript codes in the source codes of the pages. If possible, put the JavaScript codes in a separate JavaScript file (.js extension) and include it in the html code. &lt;/span&gt; &lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;CSS&lt;/strong&gt;: The styling of web page is recommended to be done in CSS. CSS has many advantage over traditional tags and it also offer cross browser compatibility without much modifications.&lt;/span&gt;&lt;/p&gt;&lt;span style="font-family: verdana;font-family:Times New Roman;font-size:85%;"  &gt;&lt;strong&gt;Frames or Not?&lt;/strong&gt; : Never use frames. It is a strict no. what can be done through frames can also be done in conventional and much better way. Frames affect search engine crawlablity and thus reduces search engine rankings. Also web pages using frames are now being frowned upon.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Consistent Design&lt;/strong&gt;: How will your visitors know they are still on your site if it's pages are not consistent? You can guarantee consistency by placing navigation in the same place on each page and your logo in the same spot at the top of the page. If you have expandable menu items, put them on every page of your site in the same place. Your visitors will expect it to be there and it's not user centered if they have to learn a new navigation system for each section. Use consistent navigation on every page. A different design and way to navigate it for each section is confusing. Also make sure that the breadcrump function is there. It improves user interaction and also improves the ranking by passing PR smoothly to each pages of the site.&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Images with ALT and Title Tags&lt;/strong&gt;: Every image tag you put in a web page should have alt and title attributes. Every alt tag should contain the description of the image. And image title tags should be used to increase the density and relevancy of the page.&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Flash Content&lt;/strong&gt;: Flash sites does not provide much options for optimizing. More over search spiders are having problems crawling flash content. So, a full flash site is never recommended. However flash elements can be embedded into html pages.&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Validate the Pages&lt;/strong&gt;: Validate the web pages to be 100% compliant with the latest W3C standards.&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Relevancy&lt;/strong&gt;: This is the most important element of the pages. As already discussed, on internet everybody is in hurry, you, as a web designer, should communicate why the visitor should spend time on your designed website. And this message should be communicated very FAST. Often, designers totally concentrate on the good outer look of the site and forget the relevancy thing. So, how to make a page relevant?. Just follow simple tips. Suppose you want to design a web page for "web design services", for the document to be relevant you need to take care of four elements.s&lt;/span&gt; &lt;/p&gt;&lt;span style="font-size:85%;"&gt;&lt;/span&gt;&lt;ol style="font-family: verdana;" type="1"&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Title tag&lt;/em&gt;: Give the appropriate and unique title to the web page like "web design services' will fit our example.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Meta&lt;/em&gt;&lt;em&gt; Description &lt;/em&gt;: Now fill the meta description tag with the little description about the content that is going to be placed on the page&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Meta&lt;/em&gt;&lt;em&gt; Keywords &lt;/em&gt;: Put some relevant keywords in the page. Recommended but not necessary. &lt;/span&gt;&lt;/li&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;li style="margin: 0in 0in 0pt;"&gt;&lt;span style="font-size:85%;"&gt;&lt;em&gt;Content&lt;/em&gt;: Content is king. If the page is about web design services then write only about the web design services that you offer and nothing else. If your page is relevant, you visitor will stay else he will bounce to another website.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Site Structure&lt;/strong&gt;: Site Structure is another important thing. So,how to design the structure of the site. Structure your site according to categories and sub categories. The main domain should contain the top category and then there should be subcategories and all the pages related to that subcategory should be placed in that folder. Remember the fact that any (I repeat any) page in the site should be just 2 clicks or a maximum of 3 clicks away from root index page. You will say, okay this is possible in small sites but how come is this possible in bigger sites. Read on:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;/span&gt;&lt;p style="font-family: verdana;"&gt;&lt;span style="font-size:85%;"&gt;&lt;strong&gt;Sitemap&lt;/strong&gt;: Always make a sitemap. A good sitemap is one which allows visitors to reach any page on the site with just 2 or 3 clicks. And that's why good sitemap increases rankings by providing deep crawl ability.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/231895155465040286-1877197130310269431?l=taknokrat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://taknokrat.blogspot.com/feeds/1877197130310269431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=231895155465040286&amp;postID=1877197130310269431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/1877197130310269431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/1877197130310269431'/><link rel='alternate' type='text/html' href='http://taknokrat.blogspot.com/2008/01/12-most-important-tips-which-every.html' title='12 most important tips which every designer should know'/><author><name>Chanderkant Jangra</name><uri>http://www.blogger.com/profile/03991982539182021909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm2.static.flickr.com/1357/556078056_c769d6f24e.jpg?v=0'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-231895155465040286.post-7520136864893539546</id><published>2007-10-25T17:21:00.000+05:30</published><updated>2008-01-21T11:21:25.274+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='css features'/><category scheme='http://www.blogger.com/atom/ns#' term='css design principles'/><category scheme='http://www.blogger.com/atom/ns#' term='css2'/><category scheme='http://www.blogger.com/atom/ns#' term='design principles'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>CSS design principles</title><content type='html'>CSS2, as CSS1 before it, is based on a set of design principles:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Forward and backward compatibility. CSS2 user agents will be able to understand CSS1 style sheets. CSS1 user agents will be able to read CSS2 style sheets and discard parts they don't understand. Also, user agents with no CSS support will be able to display style-enhanced documents. Of course, the stylistic enhancements made possible by CSS will not be rendered, but all content will be presented.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Complementary to structured documents. Style sheets complement structured documents (e.g., HTML and XML applications), providing stylistic information for the marked-up text. It should be easy to change the style sheet with little or no impact on the markup.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Vendor, platform, and device independence. Style sheets enable documents to remain vendor, platform, and device independent. Style sheets themselves are also vendor and platform independent, but CSS2 allows you to target a style sheet for a group of devices (e.g., printers).&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;      Maintainability. By pointing to style sheets from documents, webmasters can simplify site maintenance and retain consistent look and feel throughout the site. For example, if the organization's background color changes, only one file needs to be changed.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;      Simplicity. CSS2 is more complex than CSS1, but it remains a simple style language which is human readable and writable. The CSS properties are kept independent of each other to the largest extent possible and there is generally only one way to achieve a certain effect.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;      Network performance. CSS provides for compact encodings of how to present content. Compared to images or audio files, which are often used by authors to achieve certain rendering effects, style sheets most often decrease the content size. Also, fewer network connections have to be opened which further increases network performance.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;      Flexibility. CSS can be applied to content in several ways. The key feature is the ability to cascade style information specified in the default (user agent) style sheet, user style sheets, linked style sheets, the document head, and in attributes for the elements forming the document body.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;      Richness. Providing authors with a rich set of rendering effects increases the richness of the Web as a medium of expression. Designers have been longing for functionality commonly found in desktop publishing and slide-show applications. Some of the requested rendering effects conflict with device independence, but CSS2 goes a long way toward granting designers their requests.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;      Alternative language bindings. The set of CSS properties described in this specification form a consistent formatting model for visual and aural presentations. This formatting model can be accessed through the CSS language, but bindings to other languages are also possible. For example, a JavaScript program may dynamically change the value of a certain element's 'color' property.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;    Accessibility. Several CSS features will make the Web more accessible to users with disabilities:&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Properties to control font appearance allow authors to eliminate inaccessible bit-mapped text images.&lt;/li&gt;&lt;li&gt;Positioning properties allow authors to eliminate mark-up tricks (e.g., invisible images) to force layout.&lt;/li&gt;&lt;li&gt;          The semantics of !important rules mean that users with particular presentation requirements can override the author's style sheets.&lt;/li&gt;&lt;li&gt;The new 'inherit' value for all properties improves cascading generality and allows for easier and more consistent style tuning.&lt;/li&gt;&lt;li&gt;Improved media support, including media groups and the braille, embossed, and tty media types, will allow users and authors to tailor pages to those devices.&lt;/li&gt;&lt;li&gt;Aural properties give control over voice and audio output.&lt;/li&gt;&lt;li&gt;The attribute selectors, 'attr()' function, and 'content' property give access to alternate content.&lt;/li&gt;&lt;li&gt;Counters and section/paragraph numbering can improve document navigability and save on indenting spacing (important for braille devices). The 'word-spacing' and 'text-indent' properties also eliminate the need for extra whitespace in the document. &lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/231895155465040286-7520136864893539546?l=taknokrat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://taknokrat.blogspot.com/feeds/7520136864893539546/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=231895155465040286&amp;postID=7520136864893539546' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/7520136864893539546'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/7520136864893539546'/><link rel='alternate' type='text/html' href='http://taknokrat.blogspot.com/2007/10/css-design-principles.html' title='CSS design principles'/><author><name>Chanderkant Jangra</name><uri>http://www.blogger.com/profile/03991982539182021909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm2.static.flickr.com/1357/556078056_c769d6f24e.jpg?v=0'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-231895155465040286.post-7562067968350192005</id><published>2007-10-19T12:07:00.000+05:30</published><updated>2007-10-19T12:12:55.655+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='id'/><category scheme='http://www.blogger.com/atom/ns#' term='class versus id'/><category scheme='http://www.blogger.com/atom/ns#' term='chander'/><category scheme='http://www.blogger.com/atom/ns#' term='advance css'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Class vs. ID</title><content type='html'>&lt;p&gt;&lt;span style="font-size:85%;"&gt;The ID attribute of an HTML tag is intended solely to provide a unique identifier. The CLASS attribute, however, was specifically designed to allow authors to assign styles to elements.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size:85%;"&gt;Strictly speaking, no two elements within a document (web page) can have the same ID. Anytime you add an ID attribute to a tag, its value should be different from that of any other element's ID on the page, even if they have different tag names. So a style rule with an ID selector can, at most, only apply to a single element on a page.&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-size:85%;"&gt;So why not just use an inline style instead of an ID selector in a style sheet? Well, you'll probably find it more convenient to keep all your style definitions in one place, rather than scattered throughout the document. And, if the style sheet is external, it can be shared by multiple pages.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:85%;"&gt;The class selector, on the other hand, can be applied to several elements on a page. You can even make rules using the same class name with different tag names. As an example, given the following,&lt;/span&gt;&lt;/p&gt;  &lt;br /&gt;&lt;pre&gt;&lt;span style="font-size:85%;"&gt;h3.this{&lt;br /&gt;color: red;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;p.this{&lt;br /&gt;color: gray;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;h3 class="this"&gt;Danger&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="this"&gt;Proceed with caution!&lt;/p&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;  &lt;p&gt;&lt;span style="font-size:85%;"&gt;the text within the H3 element would be red but the text within the P element would be gray.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/231895155465040286-7562067968350192005?l=taknokrat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://taknokrat.blogspot.com/feeds/7562067968350192005/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=231895155465040286&amp;postID=7562067968350192005' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/7562067968350192005'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/7562067968350192005'/><link rel='alternate' type='text/html' href='http://taknokrat.blogspot.com/2007/10/class-vs-id.html' title='Class vs. ID'/><author><name>Chanderkant Jangra</name><uri>http://www.blogger.com/profile/03991982539182021909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm2.static.flickr.com/1357/556078056_c769d6f24e.jpg?v=0'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-231895155465040286.post-1889574335019797903</id><published>2007-10-09T12:30:00.000+05:30</published><updated>2007-10-09T13:07:23.081+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='best css'/><category scheme='http://www.blogger.com/atom/ns#' term='web technology'/><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='advance css'/><category scheme='http://www.blogger.com/atom/ns#' term='css tips'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Best CSS Tips</title><content type='html'>&lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;px for font sizes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;CSS declarations on one line&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;I've always put my entire declaration on one line. 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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Blocking the Styles&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Browser Support&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;The biggest thing for me is still triggering hasLayout in IE to do float containment and I've been using &lt;code&gt;&lt;span style="font-family:Arial;"&gt;zoom:1&lt;/span&gt;&lt;/code&gt; for that. I like it because it's innocuous and shouldn't mess with anything else. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Containing Floats&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;I just touched on float containment so let's expand on that. My current approach to containing floats is using &lt;code&gt;&lt;span style="font-family:Arial;"&gt;overflow:hidden&lt;/span&gt;&lt;/code&gt; (with possibly &lt;code&gt;&lt;span style="font-family:Arial;"&gt;zoom:1&lt;/span&gt;&lt;/code&gt; for Internet Explorer). No clearing div or use of &lt;code&gt;&lt;span style="font-family:Arial;"&gt;:after&lt;/span&gt;&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Understand Overflow&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Allow Block Elements to Fill Their Space Naturally&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Use CSS Shorthand&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;In shorthand, remember that the properties start at the top and work clockwise. &lt;code&gt;&lt;span style="font-family:Arial;"&gt;margin: &lt;i&gt;top right bottom left&lt;/i&gt;;&lt;/span&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Avoid Unnecessary Selectors&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;Just specify the minimum number of selectors necessary for the style. If you find yourself doing &lt;code&gt;&lt;span style="font-family:Arial;"&gt;ul li {...}&lt;/span&gt;&lt;/code&gt; or &lt;code&gt;&lt;span style="font-family:Arial;"&gt;table tr td {...}&lt;/span&gt;&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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;&lt;span style="font-family:Arial;"&gt;#navigation&lt;/span&gt;&lt;/code&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;Using less selectors will mean less selectors will be needed to override any particular style — that means it's easier to troubleshoot.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Keep it Simple&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &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;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Size text without using pixels&lt;/span&gt;&lt;/strong&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;If you’re wondering how some designers get font sizes to work using em as a unit rather than px, it’s easy. There is a trick that was written about a while ago (maybe on &lt;st1:state st="on"&gt;&lt;st1:place st="on"&gt;ALA&lt;/st1:place&gt;&lt;/st1:state&gt;) that resets the font sizes for the entire site so that 1.0em is the same as 10px.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;body { font-size: 62.5% }&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;Simply throw the font-size: 62.5% bit into your body styling and you’re done. Now you can use ems to sizes your fonts rather than pixels. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;So your paragraph styles might look something like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;p { font-size: 1.2em; line-height: 1.5em; }&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;You might be wondering why it matters how you size fonts? Any major site needs to be able to withstand a user enlarging text (old people use the web too!), and setting absolute sizes is not good practice.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;&lt;span style=""&gt; &lt;/span&gt;Make your code easy to read&lt;/span&gt;&lt;/strong&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;When I was looking at some of the CSS code, I noticed that he separated his heading tags nicely. It looked something like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;h1 {}&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;    h1#logo { font-size: 2em; color: #000; }&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;h2 {}&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;    h2.title { font-size: 1.8em; font-weight: normal; }&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;Quickly scanning the CSS for the different heading tags is a breeze if you use this technique. It is also helpful if you’re sharing code or working on a large site where you are using the same heading tags (say, h2) in multiple places since you’ll be able to style each one independently and not worry about child classes inheriting attributes from the parent class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;I also use similar techniques for paragraph tags, anchor tags, and any other tag that requires multiple classes to look correct in every instance.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;&lt;span style=""&gt; &lt;/span&gt;Separate code into blocks&lt;/span&gt;&lt;/strong&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;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.&lt;br /&gt;This is how I usuall break down my site:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;/* Structure */&lt;/span&gt;&lt;/code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;This is where I’d put the primary site structure divs and classes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;/* Typography */&lt;/span&gt;&lt;/code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;This is where I would list things like paragraphs, headings, and other miscellaneous font styles such as small and strong tags.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;/* Links */&lt;/span&gt;&lt;/code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;This one is simple - all the styling for anchor tags.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;/* Lists, images, etc. */&lt;/span&gt;&lt;/code&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;This is where I would style images, lists, and any other elements that didn’t fit into the rest of the section. If I have an unordered list for the navigation I might setup a new section for navigation and setup all the styles for the navigation, including the list and link styles, in this section - it makes editing the navigation much easier.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Stop using so many divs!&lt;/span&gt;&lt;/strong&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;This has been echoed by a lot of coders and standards nuts, and while I don’t think there is anything wrong with using a lot of block level elements, I laugh a little when I see someone style their article headlines using a div rather than a heading tag. Some people even style their bylines using a div! Try using the small tag or the a span for goodness sake.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;span style="color: rgb(255, 132, 0);font-family:Arial;font-size:10;"  &gt;Style everything at once&lt;/span&gt;&lt;/strong&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;I noticed that I was typing “margin: 0; padding: 0;” in just about every element. I remembered seeing someone use “*” to style everything on a page at once. I decided it didn’t make much sense to define margin and padding over and over when I always gave them the same parameters.&lt;br /&gt;It’s easy to do:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="font-family:Arial;"&gt;* { margin: 0; padding: 0; }&lt;/span&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;span style=""&gt;Now you only have to define margin and padding on elements where you actually &lt;/span&gt;&lt;em&gt;&lt;span style=";font-family:Arial;font-size:10;"  &gt;want&lt;/span&gt;&lt;/em&gt;&lt;span style=""&gt; some.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/231895155465040286-1889574335019797903?l=taknokrat.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://taknokrat.blogspot.com/feeds/1889574335019797903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=231895155465040286&amp;postID=1889574335019797903' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/1889574335019797903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/231895155465040286/posts/default/1889574335019797903'/><link rel='alternate' type='text/html' href='http://taknokrat.blogspot.com/2007/10/best-css-tips.html' title='Best CSS Tips'/><author><name>Chanderkant Jangra</name><uri>http://www.blogger.com/profile/03991982539182021909</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://farm2.static.flickr.com/1357/556078056_c769d6f24e.jpg?v=0'/></author><thr:total>0</thr:total></entry></feed>
