<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Design Gala &#187; CSS</title>
	<atom:link href="http://designgala.com/topics/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://designgala.com</link>
	<description>Web Usability, Web Technology, User Experience</description>
	<lastBuildDate>Sat, 11 Jun 2011 02:38:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>CSS 3 Transitions</title>
		<link>http://designgala.com/css-3-transitions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=css-3-transitions</link>
		<comments>http://designgala.com/css-3-transitions/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 02:38:19 +0000</pubDate>
		<dc:creator>manish</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[CSS3 transitions]]></category>

		<guid isPermaLink="false">http://designgala.com/?p=2692</guid>
		<description><![CDATA[Its been sometime since  CSS3 has been introduced, bringing some interesting new presentational techniques along with it. Today, we’ll review the basics of using CSS3 transitions to add an extra layer of polish....]]></description>
			<content:encoded><![CDATA[<p>Its been sometime since  CSS3 has been introduced, bringing some interesting new presentational techniques along with it. Today, we’ll review the basics of using CSS3 transitions  to add an extra layer of polish.</p>
<p>Let’s create a simple example of animating a pop out sign.</p>
<p><a href="http://designgala.com/wp-content/uploads/2011/05/css3_transition.jpg"><img class="alignnone size-full wp-image-2693" src="http://designgala.com/wp-content/uploads/2011/05/css3_transition.jpg" alt="css3 transition image" width="292" height="257" /></a></p>
<p>First Create a Div with images</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&amp;lt;div id=&quot;signpost&quot;&amp;gt;
	&amp;lt;img id=&quot;post&quot; src=&quot;post.png&quot;&amp;gt;
	&amp;lt;img id=&quot;sign&quot; src=&quot;sign.png&quot;&amp;gt;
&amp;lt;/div&amp;gt;</pre>
</div>
</div>
<p>Create the bounding box for the signpost, and give it a relative positioning context to ensure that we can position items absolutely within it.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#signpost</span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">60px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">196px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Next, the post is positioned with a z-index of two, to place it on top of the sign.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#post</span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">79px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">196px</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">2</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Now we place sign underneath the Post and rotate it with our CSS3 transform property</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#sign</span><span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">46px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">80px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">10</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">60</span><span style="color: #00AA00;">;</span>
-webkit-transform-origin<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
-moz-transform-origin<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
&nbsp;
-webkit-transform<span style="color: #00AA00;">:</span> rotate<span style="color: #00AA00;">&#40;</span>86deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
-moz-transform<span style="color: #00AA00;">:</span> rotate<span style="color: #00AA00;">&#40;</span>86deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">z-index</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">1</span><span style="color: #00AA00;">;</span>
-webkit-transition<span style="color: #3333ff;">:-webkit-</span>transform 0.5s ease-in-out<span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>The sign is rotated using transform: rotate(86deg), and is positioned under the post. To ensure that the sign rotates around the proper point, we must change the <strong>transform origin</strong> to the top left corner: 0, 0.</p>
<p><a href="http://designgala.com/wp-content/uploads/2011/05/changeoforigin.jpg"><img class="alignnone size-full wp-image-2694" src="http://designgala.com/wp-content/uploads/2011/05/changeoforigin.jpg" alt="css3 transform" width="100" height="150" /></a></p>
<p>We set the transition to change the transform property over 0.5s with an ease-in-out profile, and on hover, we rotate the sign back to its original orientation.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#signpost</span><span style="color: #3333ff;">:hover </span><span style="color: #cc00cc;">#sign</span><span style="color: #00AA00;">&#123;</span>
	-webkit-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
         -moz-transform<span style="color: #00AA00;">:</span>rotate<span style="color: #00AA00;">&#40;</span>0deg<span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Reference: <a href="http://net.tutsplus.com/">http://net.tutsplus.com</a>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/css-3-transitions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Five free ebooks of webdesign you dont want to miss</title>
		<link>http://designgala.com/five-free-ebooks-of-webdesign-you-dont-want-to-miss/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=five-free-ebooks-of-webdesign-you-dont-want-to-miss</link>
		<comments>http://designgala.com/five-free-ebooks-of-webdesign-you-dont-want-to-miss/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 09:17:22 +0000</pubDate>
		<dc:creator>Design Gala</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Standards]]></category>

		<guid isPermaLink="false">http://designgala.com/?p=2543</guid>
		<description><![CDATA[Whenever i had a free time , i always look for the ebooks in the web.Here i have collected some ebooks which are specially focused for the web designer . Being a designer...]]></description>
			<content:encoded><![CDATA[<p><a href="http://designgala.com/wp-content/uploads/2011/01/ebooks1.jpg"><img src="http://designgala.com/wp-content/uploads/2011/01/ebooks1.jpg" alt="" title="ebooks1" width="347" height="346" class="alignnone size-full wp-image-2544" /></a></p>
<p>Whenever i had a free time , i always look for the ebooks in the web.Here i have collected some ebooks which are specially focused for the web designer . Being a designer you always have to keep the idea about the current trends . Some of these books are online books and some can be downloaded in the pdf format.Reading books is one of the best habit.</p>
<p>1.<a href="http://www.the-web-book.com/index.php" target=" "><strong>The Webbook</strong></a><br />
<a href="http://www.the-web-book.com/index.php" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/webdesign_books_08.jpg" alt="" title="webdesign_books_08" width="640" height="299" class="alignnone size-full wp-image-2546" /></a></p>
<p>If you are a new beginner for web, you can start with this book. This Book contains all the information that is needed to create a Web site , registering a domain name and renting some hosting space, creating your first HTML page, building full online database applications with PHP and MySQL. It also tells about CSS and  Javascript. </p>
<p>2.<strong><a href="http://designingfortheweb.co.uk/book/" target=" ">Designing for the web</a></strong><br />
<a href="http://designingfortheweb.co.uk/book/" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/webdesign_books_01.jpg" alt="" title="webdesign_books_01" width="640" height="355" class="alignnone size-full wp-image-2550" /></a></p>
<p>This book contains five sections, : Getting Started, Research, Typography, Colour, and Layout. Learn solid graphic design theory that you can simply apply to your designs, making the difference from a good design to a great one. and it covers a core aspect of graphic design.</p>
<p>3.<a href="http://www.webstyleguide.com/wsg3/index.html" target=" "><strong>Web Style Guide: Basic Design Principles for Creating Web Sites – 3rd Edition</strong></a><br />
<a href="http://www.webstyleguide.com/wsg3/index.html" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/webdesignbook_08.jpg" alt="" title="webdesignbook_08" width="604" height="200" class="alignnone size-full wp-image-2553" /></a><br />
This book contains 12 sections which covers the basic design principles and most of the aspect of the webdesign. The form designs and applications,multimedia,typography are clearly explained.</p>
<p>4.<strong><a href="http://diveintohtml5.org/" target=" ">Dive into HTML 5</a></strong><br />
<a href="http://diveintohtml5.org/" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/webdesign_books_03.jpg" alt="" title="webdesign_books_03" width="640" height="355" class="alignnone size-full wp-image-2555" /></a></p>
<p>This book is written by MARK PILGRIM.If you can get to the idea about the HTML 5 , this book can be one of the good option.It starts with the history of HTML 5 to the all the standard .</p>
<p>5.<strong><a href="http://www.zeldman.com/2009/04/16/taking-your-talent-to-the-web-is-now-a-free-downloadable-book-from-zeldmancom/" target=" ">Taking your talent to the web</a></strong><br />
<a href="http://www.zeldman.com/2009/04/16/taking-your-talent-to-the-web-is-now-a-free-downloadable-book-from-zeldmancom/" target=" "><img src="http://designgala.com/wp-content/uploads/2011/01/webdesign_books_02.jpg" alt="" title="webdesign_books_02" width="640" height="355" class="alignnone size-full wp-image-2558" /></a></p>
<p>This book was written in 2001 and was rated top five book by amazon.com.This book was written for print designers whose clients want websites, print art directors who’d like to move into full–time web and interaction design, homepage creators who are ready to turn pro, and professionals who seek to deepen their web skills and understanding.</p>
<p>These all books are yours,Enjoy it.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/five-free-ebooks-of-webdesign-you-dont-want-to-miss/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Basic jQuery Tutorial: Change CSS</title>
		<link>http://designgala.com/basic-jquery-tutorial-change-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=basic-jquery-tutorial-change-css</link>
		<comments>http://designgala.com/basic-jquery-tutorial-change-css/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 15:34:10 +0000</pubDate>
		<dc:creator>Mukesh Chapagain</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[class]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=2011</guid>
		<description><![CDATA[In this article, I will be showing you how to add or change css styling. You will be able to add or remove class in HTML elements. VIEW DEMO Here is my html...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2010/02/jquery-logo.png" alt="" width="268" height="268" class="alignleft size-full wp-image-2007" /></p>
<p>In this article, I will be showing you how to add or change css styling. You will be able to add or remove class in HTML elements. </p>
<p><a href="http://www.cssbreak.com/examples/change-css/">VIEW DEMO</a> </p>
<p><span id="more-2011"></span></p>
<p>Here is my html code:</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div&gt;
	&lt;span&gt;Sample text!&lt;/span&gt;
	&lt;br /&gt;
	Testing!
&lt;/div&gt;
&lt;br /&gt;
&nbsp;
&lt;div&gt;Click me&lt;/div&gt;</pre>
</div>
</div>
<p>As you can see above, I have a div with id &#8216;content&#8217;. I have &#8216;Sample text!&#8217; inside span. And I have a div with id &#8216;clickme&#8217;. </p>
<p>Here is CSS class to be used:</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.hover</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">underline</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">cursor</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">pointer</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#003399</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">font-weight</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">bold</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Here is the magical jQuery function :)</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#clickme&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">hover</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">addClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">removeClass</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;hover&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p>Here, &#8216;hover&#8217; function is used. It means that, when we hover on &#8216;Click me&#8217; div then the CSS class &#8216;hover&#8217; is added to the &#8216;clickme&#8217; div. The &#8216;hover&#8217; class will change the color, font-weight, etc. of the div text &#8216;Click me&#8217;.</p>
<p>Now, when we click the &#8216;Click me&#8217; text, then the CSS styling is added to the div &#8216;content&#8217;. The new styling will change the text of div &#8216;content&#8217; to green in color and it also increases the font size. The following jQuery code is used:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;">$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#clickme&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">click</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	$<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#content&quot;</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">css</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><span style="color: #3366CC;">&quot;color&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;green&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;font-size&quot;</span><span style="color: #339933;">:</span><span style="color: #3366CC;">&quot;20px&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre>
</div>
</div>
<p><a href="http://www.cssbreak.com/examples/change-css/">VIEW DEMO</a> </p>
<p>Cheers,</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/basic-jquery-tutorial-change-css/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Essential Best Practices to Improve Markup and CSS</title>
		<link>http://designgala.com/essential-best-practices-to-improve-markup-and-css/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=essential-best-practices-to-improve-markup-and-css</link>
		<comments>http://designgala.com/essential-best-practices-to-improve-markup-and-css/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 11:48:30 +0000</pubDate>
		<dc:creator>S@R0Z</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Designs]]></category>
		<category><![CDATA[Rules]]></category>
		<category><![CDATA[W3 Validation]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1300</guid>
		<description><![CDATA[Whenever we cover CSS articles we&#8217;ve got good response from our reader; for e.g. on one line CSS and Magazine style drop cap first letter with CSS. This makes us to write thorough,...]]></description>
			<content:encoded><![CDATA[<p>Whenever we cover CSS articles we&#8217;ve got good response from our reader; for e.g. on <a href="http://www.designgala.com/one-line-css-magic/">one line CSS</a> and <a href="http://www.designgala.com/magazine-style-drop-cap-first-letter-with-css/">Magazine style drop cap first letter with CSS</a>. This makes us to write thorough, descriptive and clean articles. </p>
<p><img class="alignnone size-full wp-image-1537" src="http://www.designgala.com/wp-content/uploads/2010/01/CSS2.jpg" alt="" width="540" height="404" />. </p>
<p>If you want to develop great looking websites and want that to be easy to maintain you must follow certain rules in writing markup and CSS. Those sites requires high quality markup and styling. The most fundamental principle to remember while designing is separating presentation and the content or style &amp; markup. Separation is the key a good designer need to build a good markup to produce good CSS.</p>
<p><span id="more-1300"></span></p>
<p><strong>1. Treat Markup and CSS as development objects</strong><br />
Good markup and CSS is time consuming to produce and minor changes or mistakes can do serious damage to you work. Like any other development artifacts, CSS files should start with a well structured header. Both markup and CSS files should contains a title, a revision, a time stamp, and a description or any other information the designer wants to keep like copyright and license terms.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">	<span style="color: #808080; font-style: italic;">/************************************/</span>
	 My Site THEME
	 Copyright <span style="color: #cc66cc;">2010</span><span style="color: #00AA00;">,</span> DesignGala
	 URL<span style="color: #00AA00;">:</span> www<span style="color: #6666ff;">.designgala</span><span style="color: #6666ff;">.com</span>
	 AUTHOR<span style="color: #00AA00;">:</span> Mr. S<span style="color: #a1a100;">@R0Z</span>
	 DATE<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">31</span> Jan. <span style="color: #cc66cc;">2010</span>
	 REVISION<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">1.0</span>
	<span style="color: #808080; font-style: italic;">/************************************/</span></pre>
</div>
</div>
<p><strong>2. Build up a library of most used designs </strong><br />
Starting with a blank page every time would not be very effective. It a time consuming process and it would cost a lot. Rather starting from the scratch you can create certain layouts which can be used time and again like:<br />
•  2-column layout<br />
•  3-column layout<br />
•  blog layout<br />
•  print layout etc.</p>
<p><strong>3. Define basic guidelines and naming conventions.</strong><br />
Having a set of basic guidelines for how to write your CSS is recommended because it will make your code more logical and standardized. Basic guidelines can consist of any rule you find valuable for you and your team. I would recommend considering the following:</p>
<p><strong> &#8211; Hyphens Instead of Underscores:</strong> Use lowercase characters to define your class and use “-” or uppercase letters to separate multiple-words classes (e.g. “main-container”, or “mainContainer).</p>
<p><strong> &#8211; Use structural naming: </strong>Properly name your page segments and avoid at all cost to use presentational naming. (E.g. Use sidebar and not right-column). Presentational naming prevents you from having names in your markup that actually describe what the elements are.</p>
<p><strong>4. Use whitespace carefully but have proper indentation</strong><br />
Whitespace, including spaces, tabs, and extra line breaks, is important for readability of your CSS code. However, whitespace does add to page weight and you should be careful not to add whitespace that is not needed.</p>
<p>To make your code easy to read while you work on it and if you provide it for others to maintain use proper indentation. Code that is not well structured can be almost impossible to read so it is worth the effort to maintain some kind of formatting.</p>
<p><strong>Unmanaged CSS</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.div</span> <span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">780px</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><strong>Managed CSS</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.div</span> <span style="color: #cc00cc;">#container</span>
<span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span> <span style="color: #933;">780px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#000000</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span> <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><strong>5. Use Optimized CSS Code</strong><br />
You can optimize the CSS by grouping selectors that have the same properties. Each selector should be separated with a comma rather than writing same code separately.<br />
<strong>E.g.</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">h2<span style="color: #00AA00;">,</span> h3<span style="color: #00AA00;">,</span> p<span style="color: #00AA00;">,</span> .<span style="color: #993333;">block</span> <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1.5em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">10px</span> <span style="color: #933;">25px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #933;">1px</span> <span style="color: #993333;">solid</span> <span style="color: #cc00cc;">#ddd</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#f0f0f0</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">bkg.gif</span><span style="color: #00AA00;">&#41;</span> <span style="color: #993333;">no-repeat</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><strong>6. Use Shorthand properties</strong><br />
Like grouping elements to re-use styles makes you write less code you should always use shorthand properties. Several key CSS properties that you use over and over again support use shorthand: margin, border, padding, background, font, list-style, and even outline.<br />
<strong>E.g.</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* CSS */</span>
p <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-right</span><span style="color: #00AA00;">:</span> <span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-bottom</span><span style="color: #00AA00;">:</span>  <span style="color: #933;">15px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin-left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">//Should be replaced by<span style="color: #00AA00;">:</span>
p <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #933;">5px</span> <span style="color: #933;">10px</span> <span style="color: #933;">15px</span> <span style="color: #933;">20px</span><span style="color: #00AA00;">;</span> <span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><img class="alignnone size-full wp-image-1535" src="http://www.designgala.com/wp-content/uploads/2010/01/shorthand.jpg" alt="" width="380" height="237" /></p>
<p><strong>7. Set up typography in CSS</strong><br />
It should be clear to anyone that applying style (fonts, size, color alignment etc.) directly in the markup is bad practice and not a durable solution. It may look right but it&#8217;s a pain to maintain. Typical Typographic effects in CSS are: Size, Case, Style, Color, Alignment etc.</p>
<p><strong>E.g.</strong></p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* Having only CAPs in headers or menus is typography
and should be left to CSS. */</span>
&nbsp;
&lt;a href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #00AA00;">&gt;</span>FRONT&lt;/a<span style="color: #00AA00;">&gt;</span> <span style="color: #808080; font-style: italic;">/* Not Directly in HTML like this */</span>
&nbsp;
&lt;a href<span style="color: #00AA00;">=</span><span style="color: #ff0000;">&quot;/&quot;</span><span style="color: #00AA00;">&gt;</span>Front&lt;/a<span style="color: #00AA00;">&gt;</span> <span style="color: #808080; font-style: italic;">/* Just content in HTML and Design on CSS */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/* css */</span>
a
<span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><strong>8. Validate &amp; fix the bugs</strong></p>
<blockquote><p>Before putting a new design live you should validate that your CSS is OK and get rid of any mistakes you may have made because even small mistakes in markup and CSS results different outputs in different browsers. A designer should eliminate those bugs to make the product final and perfect. You can use relevant validation tools.</p></blockquote>
<p><strong>Tools</strong><br />
- <a href="http://validator.w3.org/">The W3C Markup Validation Service</a><br />
- <a href="http://xhtml-css.com/">XHTML-CSS Validator</a></p>
<p><strong>9. Document your work</strong><br />
First thing you should take serious is in-line comments in the CSS code. A designer can also make separate documentation of the template s/he is developing.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">&lt;!-- markup --<span style="color: #00AA00;">&gt;</span>
&nbsp;
&lt;!-- This is how you insert documentation in the code --<span style="color: #00AA00;">&gt;</span>
&lt;!-- css --<span style="color: #00AA00;">&gt;</span>
<span style="color: #808080; font-style: italic;">/* In CSS this is how you insert documentation in the code */</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Initialize to 0 *****/</span>
<span style="color: #00AA00;">*</span><span style="color: #00AA00;">&#123;</span>
 <span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
 <span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Style for the page header *****/</span>
&nbsp;
Header<span style="color: #00AA00;">&#123;</span>
	…
	<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #808080; font-style: italic;">/***** Style for the displaying Menu *****/</span>
menu<span style="color: #00AA00;">&#123;</span>
	…
	<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/essential-best-practices-to-improve-markup-and-css/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Important Tips for Web Design</title>
		<link>http://designgala.com/important-tips-for-web-design/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=important-tips-for-web-design</link>
		<comments>http://designgala.com/important-tips-for-web-design/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 08:24:09 +0000</pubDate>
		<dc:creator>S@R0Z</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design Tips]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=1262</guid>
		<description><![CDATA[Website is the best online platform for the promotion of business or services. So the greatest necessity of website is its design. Design needs to be eye catchy and attractive enough so that...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2010/01/webdesign2.jpg" alt="webdesign" width="560"  class="alignnone size-full wp-image-1298" /></p>
<p>Website is the best online platform for the promotion of business or services. So the greatest necessity of website is its design. Design needs to be eye catchy and attractive enough so that the visitors stop by to browse through your site. A visitor hardly stays on a website for less than 5 seconds or so if the design is not catchy. So a web designer has to be careful enough to turn the first impression of the site into a good one. Acquiring designing skill is very important for a beginner which can be developed and polished with rigorous practice.</p>
<p>The web layouts, the look and feel of the website as well as many other things are taken into consideration for website designing. A proper knowledge and skill to use the web designing tools are essential for any web designer.</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/important-tips-for-web-design/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yet another quick CSS tips &amp; tricks</title>
		<link>http://designgala.com/yet-another-quick-css-tips-tricks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=yet-another-quick-css-tips-tricks</link>
		<comments>http://designgala.com/yet-another-quick-css-tips-tricks/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 15:44:31 +0000</pubDate>
		<dc:creator>Rabi Shrestha</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS tricks]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=647</guid>
		<description><![CDATA[After last week article on CSS trips and tricks I am adding some more here. I hope these tips are useful ones. 1. Remove links or textbox hightlight border You can use the...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2009/12/css-books.jpg" alt="" title="css books" width="500"  class="alignright size-full wp-image-1651" />After last week article on <a href="http://www.designgala.com/5-css-tips-tricks/">CSS trips and tricks</a> I am adding some more  here. I hope these tips are useful ones.</p>
<p><strong>1. <a href="http://www.designgala.com/one-line-css-magic/">Remove links or textbox hightlight border</a></strong></p>
<p>You can use the outline property to remove or hide  a border highlighting the elements.  Our author Anish Blon wrote this in his most popular post <a href="http://www.designgala.com/one-line-css-magic/">one line CSS</a> in <a href="http://designgala.com/2008/03/">March 2008.</a></p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">a<span style="color: #00AA00;">,</span> input <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
to remove <span style="color: #993333;">underline</span> from link
a<span style="color: #3333ff;">:link </span><span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">color</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#0000FF</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">text-decoration</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background</span><span style="color: #00AA00;">:</span> <span style="color: #cc00cc;">#FFFFFF</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span><span style="color: #808080; font-style: italic;">/*normal links in the text*/</span></pre>
</div>
</div>
<p><strong>2. Hidden Text</strong></p>
<p>You can hide the text by using the text-indent property as follows. We use hidden text when we&#8217;re using images to replace text but we want to make sure search engine can crawl the keyword.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">a <span style="color: #00AA00;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">text-indent</span><span style="color: #00AA00;">:</span><span style="color: #933;">-999em</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">outline</span><span style="color: #00AA00;">:</span><span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
	<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #933;">100px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><strong>3. CSS Transparency Setting for all browsers</strong><br />
you can use the following opacity hacks features to set transparency for different kinds of browsers</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"> <span style="color: #6666ff;">.transparent_class</span> <span style="color: #00AA00;">&#123;</span>
	filter<span style="color: #00AA00;">:</span>alpha<span style="color: #00AA00;">&#40;</span>opacity<span style="color: #00AA00;">=</span><span style="color: #cc66cc;">50</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>    <span style="color: #808080; font-style: italic;">/* ie  */</span>
	-moz-opacity<span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">;</span>    <span style="color: #808080; font-style: italic;">/* old mozilla browser like netscape  */</span>
	-khtml-opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">;</span>    <span style="color: #808080; font-style: italic;">/* for really really old safari */</span>
	opacity<span style="color: #00AA00;">:</span> <span style="color: #cc66cc;">0.5</span><span style="color: #00AA00;">;</span>    <span style="color: #808080; font-style: italic;">/* css standard, currently it works in most modern browsers like firefox,  */</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p><strong>4. PNG Fix for IE6</strong><br />
Following hacks can be used to fix the PNG fix for IE6</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">.png_hack<span style="color: #00AA00;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">url</span><span style="color: #00AA00;">&#40;</span><span style="color: #ff0000; font-style: italic;">../img/image.png</span><span style="color: #00AA00;">&#41;</span> !important<span style="color: #00AA00;">;</span>
  <span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span><span style="color: #00AA00;">;</span>
  filter<span style="color: #00AA00;">:</span> <span style="color: #993333;">none</span> !important<span style="color: #00AA00;">;</span>
  filter<span style="color: #00AA00;">:</span> progid<span style="color: #3333ff;">:DXImageTransform</span><span style="color: #6666ff;">.Microsoft</span>.AlphaImageLoader<span style="color: #00AA00;">&#40;</span>src<span style="color: #00AA00;">=</span><span style="color: #ff0000;">'img/the_image.png'</span><span style="color: #00AA00;">&#41;</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Please have your say.</p>
<p>[Photo Credit: <a href="http://www.flickr.com/photos/russweakley/45815626/">Russ Weakley</a>]
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/yet-another-quick-css-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>5 CSS tips &amp; tricks</title>
		<link>http://designgala.com/5-css-tips-tricks/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=5-css-tips-tricks</link>
		<comments>http://designgala.com/5-css-tips-tricks/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 04:22:08 +0000</pubDate>
		<dc:creator>Rabi Shrestha</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=576</guid>
		<description><![CDATA[I was searching hacks and tricks on css and found this article which is simple and very useful. I hope this will be informative to others too. 1. Avoid CSS hacks, use future...]]></description>
			<content:encoded><![CDATA[<p>I was searching hacks and tricks on css and found <a href="http://www.queness.com/post/402/15-css-tips-and-tricks">this article </a> which is simple and very useful. I hope this will be informative to others too.</p>
<h3><strong>1. Avoid CSS hacks, use future proof method</strong></h3>
<p>We should avoid using hacks unless there are no other ways to fix it. Because, we will not able to know when those hacks will stop working. The most common way to tackle with different version of IEs is using the if else statement:</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">&lt;!--<span style="color: #00AA00;">&#91;</span>If IE <span style="color: #cc66cc;">5</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
ie <span style="color: #cc66cc;">5</span>
&lt; !<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span>
&nbsp;
&lt;!--<span style="color: #00AA00;">&#91;</span>If lte <span style="color: #cc66cc;">6</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
ie <span style="color: #cc66cc;">6</span> and <span style="color: #993333;">lower</span>
&lt; !<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span>
&nbsp;
&lt;!--<span style="color: #00AA00;">&#91;</span>If gte <span style="color: #cc66cc;">7</span><span style="color: #00AA00;">&#93;</span><span style="color: #00AA00;">&gt;</span>
ie <span style="color: #cc66cc;">7</span> or <span style="color: #993333;">higher</span>
&lt; !<span style="color: #00AA00;">&#91;</span>endif<span style="color: #00AA00;">&#93;</span>--<span style="color: #00AA00;">&gt;</span></pre>
</div>
</div>
<h3><strong>2. Use group selector</strong></h3>
<p>Using group selector is a good practise to minimize your coding effort and also save a few bytes out of your style sheet. We can group the selector to avoid repeating declaring the same properties for different elements</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">h1<span style="color: #00AA00;">,</span> h2<span style="color: #00AA00;">,</span> h3<span style="color: #00AA00;">,</span> h4<span style="color: #00AA00;">,</span> h5<span style="color: #00AA00;">,</span> h6 <span style="color: #00AA00;">&#123;</span>
<span style="color: #000000; font-weight: bold;">font-family</span><span style="color: #00AA00;">:</span>arial<span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">0.5em</span> <span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<h3><strong>3. Center elements</strong></h3>
<p>It&#8217;s easy to center an element, for Firefox and Safari, we only need to specify the width and margin left and right set to auto. However, you will need to specify text-align to center in the parent element for IE.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">body <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #993333;">center</span><span style="color: #00AA00;">;</span>  <span style="color: #808080; font-style: italic;">/* for ie   */</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">800px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span> <span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">text-align</span><span style="color: #00AA00;">:</span><span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<h3><strong>4. CSS Positioning</strong></h3>
<p>This is something I&#8217;ve just discovered it few weeks ago. Set the abolute position within a container. #item will appear inside the #container exactly 200px from the left and 50px from the top.</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #cc00cc;">#container</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">500</span><span style="color: #00AA00;">;</span> <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">300</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
&nbsp;
<span style="color: #cc00cc;">#item</span> <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">absolute</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">left</span><span style="color: #00AA00;">:</span> <span style="color: #933;">200px</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">:</span> <span style="color: #933;">50px</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<h3><strong>5. Text transform</strong></h3>
<p>This is something I discovered long time ago, CSS has the ability to transform text to lowercase, uppercase and capitalized the first character of a word. w3schools CSS &#8211; Text transform</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">h1 <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">uppercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
h2 <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">capitalize</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span>
p <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">text-transform</span><span style="color: #00AA00;">:</span><span style="color: #993333;">lowercase</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>Please have your say.
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/5-css-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Create a simple calendar using javascript</title>
		<link>http://designgala.com/create-a-simple-calendar-using-javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=create-a-simple-calendar-using-javascript</link>
		<comments>http://designgala.com/create-a-simple-calendar-using-javascript/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 16:05:16 +0000</pubDate>
		<dc:creator>Rabi Shrestha</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=467</guid>
		<description><![CDATA[When i started my first project as programmer , i was told to put a calendar at the sidebar of the webpage.At that time, one of my friend help me with the code.This...]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.designgala.com/wp-content/uploads/2009/11/calen.jpg" alt="calen" title="calen" width="200" height="169" class="alignright size-full wp-image-469" /><br />
When i started my first project as programmer , i was told to put a calendar at the sidebar of the webpage.At that time, one of my friend help me with the code.This time I googled it and found one very simple and good sample of creating a <a href="http://www.dynamicdrive.com/dynamicindex7/basiccalendar.htm" target=" ">calendar </a>using JavaScript.I hope this will be helpful to others also .<br />
There are few simple steps for creating a calendar</p>
<p><strong>Step 1</strong>:<br />
Insert the following codes into the HEAD section of your webpage:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>style type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/css&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
.<span style="color: #660066;">main</span> <span style="color: #009900;">&#123;</span>
width<span style="color: #339933;">:</span>200px<span style="color: #339933;">;</span>
border<span style="color: #339933;">:</span>1px solid black<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #660066;">month</span> <span style="color: #009900;">&#123;</span>
background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span>black<span style="color: #339933;">;</span>
font<span style="color: #339933;">:</span>bold 12px verdana<span style="color: #339933;">;</span>
color<span style="color: #339933;">:</span>white<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #660066;">daysofweek</span> <span style="color: #009900;">&#123;</span>
background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span>gray<span style="color: #339933;">;</span>
font<span style="color: #339933;">:</span>bold 12px verdana<span style="color: #339933;">;</span>
color<span style="color: #339933;">:</span>white<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #660066;">days</span> <span style="color: #009900;">&#123;</span>
font<span style="color: #339933;">-</span>size<span style="color: #339933;">:</span> 12px<span style="color: #339933;">;</span>
font<span style="color: #339933;">-</span>family<span style="color: #339933;">:</span>verdana<span style="color: #339933;">;</span>
color<span style="color: #339933;">:</span>black<span style="color: #339933;">;</span>
background<span style="color: #339933;">-</span>color<span style="color: #339933;">:</span> lightyellow<span style="color: #339933;">;</span>
padding<span style="color: #339933;">:</span> 2px<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
.<span style="color: #660066;">days</span> #today<span style="color: #009900;">&#123;</span>
font<span style="color: #339933;">-</span>weight<span style="color: #339933;">:</span> bold<span style="color: #339933;">;</span>
color<span style="color: #339933;">:</span> red<span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span>
&nbsp;
&nbsp;
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;basiccalendar.js&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #006600; font-style: italic;">/***********************************************
* Basic Calendar-By Brian Gosselin at http://scriptasylum.com/bgaudiodr/
* Script featured on Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/</span>
&nbsp;
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<p><strong>Step 2</strong>:<br />
Download <a href="http://www.designgala.com/demos/calendar/basiccalendar.js" target=" ">basiccalendar.js</a> (by right clicking, and selecting &#8220;Save As&#8221;), and upload to your webpage directory.</p>
<p><strong>Step 3</strong>:<br />
Finally, insert the below script where you wish the calendar to appear on your page:</p>
<div class="wp_syntax">
<div class="code">
<pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span><span style="color: #339933;">&gt;</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> todaydate<span style="color: #339933;">=</span><span style="color: #003366; font-weight: bold;">new</span> Date<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #003366; font-weight: bold;">var</span> curmonth<span style="color: #339933;">=</span>todaydate.<span style="color: #660066;">getMonth</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #CC0000;">1</span> <span style="color: #006600; font-style: italic;">//get current month (1-12)</span>
<span style="color: #003366; font-weight: bold;">var</span> curyear<span style="color: #339933;">=</span>todaydate.<span style="color: #660066;">getFullYear</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #006600; font-style: italic;">//get current year</span>
&nbsp;
document.<span style="color: #000066; font-weight: bold;">write</span><span style="color: #009900;">&#40;</span>buildCal<span style="color: #009900;">&#40;</span>curmonth <span style="color: #339933;">,</span>curyear<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;main&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;month&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;daysofweek&quot;</span><span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;days&quot;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span></pre>
</div>
</div>
<p><a href="http://www.designgala.com/demos/calendar/try.html"target=" ">Click here</a> to see an DEMO</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/create-a-simple-calendar-using-javascript/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>DIV height problem in IE</title>
		<link>http://designgala.com/div-height-problem-in-ie/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=div-height-problem-in-ie</link>
		<comments>http://designgala.com/div-height-problem-in-ie/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:38:17 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[min-height bug IE]]></category>
		<category><![CDATA[minimum height bug]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=321</guid>
		<description><![CDATA[When I was trying to create a division using  DIV tag and fix a height to value below 12px in IE,  the height didn't go below about 12px in the webpage. After trying and testing a lot, I googled and found that it was minimum height bug in Internet Explorer.]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-329" title="box2" src="http://www.designgala.com/wp-content/uploads/2009/11/box2.jpg" alt="box2" width="300" height="162" />When I was trying to create a division using  DIV tag and fix a height to value below 12px in IE, the height didn&#8217;t go below about 12px in the webpage. After trying and testing a lot, I googled and found that it was minimum height bug in Internet Explorer.</p>
<p>There are couple of ways to fix this min-height bug:</p>
<h3><strong>Solution 1: Put a comment inside the div</strong></h3>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div style=&quot;height: 10px;&gt;&lt;!-- --&gt;&lt;/div&gt;</pre>
</div>
</div>
<p>If the above solution doesn’t solve the problem then:</p>
<h3><strong>Solution 2: Put &amp;nbsp; inside the div and add this to its style</strong></h3>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;">div<span style="color: #cc00cc;">#seperator</span> <span style="color: #00AA00;">&#123;</span> <span style="color: #000000; font-weight: bold;">font-size</span><span style="color: #00AA00;">:</span><span style="color: #933;">1px</span><span style="color: #00AA00;">;</span>line-<span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #cc66cc;">0</span><span style="color: #00AA00;">;</span><span style="color: #00AA00;">&#125;</span></pre>
</div>
</div>
<p>And specify the actual height using the tag</p>
<p>For example: if we need to set a height of 5px then</p>
<div class="wp_syntax">
<div class="code">
<pre class="html" style="font-family:monospace;">&lt;div id=&quot;seperator&quot; style=&quot;height:5px;&quot;&gt;&amp;nbsp;&lt;/div&gt;</pre>
</div>
</div>
<p>This it it. My problem was fixed. :)
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/div-height-problem-in-ie/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The CSS Box model</title>
		<link>http://designgala.com/the-css-box-model/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-css-box-model</link>
		<comments>http://designgala.com/the-css-box-model/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 01:54:05 +0000</pubDate>
		<dc:creator>rob</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[box model]]></category>
		<category><![CDATA[css box]]></category>

		<guid isPermaLink="false">http://www.designgala.com/?p=287</guid>
		<description><![CDATA[Designing a layout of webpage using CSS is now a most popular and challenging among the web designer. The layout Design without a table have allowed us to add more features and control...]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-289" title="box1" src="http://www.designgala.com/wp-content/uploads/2009/10/box1.jpg" alt="box1" width="300" height="162" /></p>
<p>Designing a layout of webpage using CSS is now a most popular and challenging among the web designer. The layout Design without a table have allowed us to add more features and control over the page.</p>
<p>While creating the box using CSS, it is necessary to understand the four terms MARGIN , BORDER , PADDING and ACTUAL CONTENTS.</p>
<p>Explanation of the different parts:</p>
<ul>
<li><strong style="font-weight: bold;">Margin</strong> – This is an area around the border. [ outside the border]</li>
<li><strong style="font-weight: bold;">Border</strong> &#8211; A border that lies around the padding and content.</li>
<li><strong style="font-weight: bold;">Padding</strong> – This is an area around the content. [inside the border]</li>
<li><strong style="font-weight: bold;">Content</strong> &#8211; The content of the box, where text and images appear.</li>
</ul>
<p>We have different types of tags to control these parts.</p>
<ul>
<li><strong>Margin tag</strong> – This tag clears an area      around the border. The margin does not have a background color, and it is      completely transparent.</li>
<li><strong>Border tag</strong> &#8211; A border tag adds border      around the padding and content. The border is affected by the background      color of the box.</li>
<li><strong>Padding tag</strong> – This tag clears an area      around the content. The padding is affected by the background color of the      box.</li>
</ul>
<p>In order to set the width and height of an element correctly in all browsers, you need to know how the box model works.</p>
<hr size="1" />
<h2>Width and Height of an Element</h2>
<p>When we specify the width and height properties of an element with CSS, we are just setting the width and height of the actual content area. To know the full size of the element, we must also add the padding, border and margin tags.</p>
<p>The total width of the element in the example below is 300px:</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">250px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span></pre>
</div>
</div>
<p>Let&#8217;s do the math:<br />
250px (width)<br />
+ 20px (left and right padding)<br />
+ 10px (left and right border)<br />
+ 20px (left and right margin)<br />
= 300px</p>
<p>Imagine that we only had 250px of space. Let&#8217;s make an element with a total width of 250px:</p>
<div class="wp_syntax">
<div class="code">
<pre class="css" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">width</span><span style="color: #00AA00;">:</span><span style="color: #933;">220px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">padding</span><span style="color: #00AA00;">:</span><span style="color: #933;">10px</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">border</span><span style="color: #00AA00;">:</span><span style="color: #933;">5px</span> <span style="color: #993333;">solid</span> <span style="color: #993333;">gray</span><span style="color: #00AA00;">;</span>
<span style="color: #000000; font-weight: bold;">margin</span><span style="color: #00AA00;">:</span><span style="color: #933;">0px</span><span style="color: #00AA00;">;</span></pre>
</div>
</div>
<p>The total width of an element should always be calculated like this:</p>
<p>Total element width = width + left padding + right padding + left border + right border + left margin + right margin</p>
<p>The total height of an element should always be calculated like this:</p>
<p>Total element height = height + top padding + bottom padding + top border + bottom border + top margin + bottom margin</p>
<div id="fb-root"></div>
<p><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><!-- Do not remove --></p>
]]></content:encoded>
			<wfw:commentRss>http://designgala.com/the-css-box-model/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

