<?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>Connecting the dots... &#187; CSS</title>
	<atom:link href="http://blog.rajatpandit.com/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rajatpandit.com</link>
	<description>Thoughts on Web Development, Infrastructure and Application Scalability</description>
	<lastBuildDate>Thu, 29 Dec 2011 13:21:11 +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>Tab Menu Using CSS and A Single Sprited Image</title>
		<link>http://blog.rajatpandit.com/2008/09/02/tab-menu-using-css-and-single-sprited-image/</link>
		<comments>http://blog.rajatpandit.com/2008/09/02/tab-menu-using-css-and-single-sprited-image/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 14:07:26 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[tabs]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=64</guid>
		<description><![CDATA[I had to recently do a tabbed interface and I looked up for various implementations for tabbed interface mostly including one big image with a space in the middle or...]]></description>
			<content:encoded><![CDATA[<p>I had to recently do a tabbed interface and I looked up for various implementations for tabbed interface mostly including one big image with a space in the middle or two different images one for the left section of the tab and one for the right tab. The solution that I eventually used was implementing it with just one image but it didnt have the white space in it and also was sprited to show both active and inactive tabs.</p>
<p><strong>Advantages:</strong></p>
<ul>
<li>Smaller image size</li>
<li>Since the tabs (active and inactive) are sprited hence just one http call would get the required images</li>
<li>Add a class &#8220;tabs&#8221; to any list item and mark anchor with class &#8220;active&#8221; to show active tab</li>
</ul>
<p><strong>Preview:</strong><br />
<a href="http://blog.rajatpandit.com/wp-content/uploads/2008/09/tabs.png"><img src="http://blog.rajatpandit.com/wp-content/uploads/2008/09/tabs.png" alt="Final tabs" title="tabs" width="500" height="34" class="size-full wp-image-72" /></a></p>
<p><strong>Markup:</strong></p>
<pre class="brush: xml; title: ; notranslate">
&lt;ul id=&quot;p-profile-menu&quot; class=&quot;tabs&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;/fe_dev.php/user/basicprofile&quot; class=&quot;&quot;&gt;&lt;span&gt;Basic&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a class=&quot;active&quot; href=&quot;/fe_dev.php/user/physicalprofile&quot;&gt;&lt;span&gt;Physical Details&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/fe_dev.php/user/socialprofile&quot;&gt;&lt;span&gt;Social Profile&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;/fe_dev.php/user/otherprofile&quot;&gt;&lt;span&gt;Other Aspects&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</pre>
<p><strong>CSS</strong></p>
<pre class="brush: css; title: ; notranslate">
.tabs {
  margin-top:5px;
  margin-left:-1px;
  border-bottom:1px solid #46A7D5;
  padding-bottom:5px;
}
  .tabs li {
    display:inline;
    padding:0 1px;
  }
    .tabs li a {
      text-decoration:none;
      padding-bottom:5px;
      padding-top:3px;
      padding-left:10px;
      background:transparent url('/images/details-tabs.png') no-repeat scroll 0 -105px;
      color:#fff;
    }
    .tabs li a span {
      padding-top:3px;
      padding-right:10px;
      padding-bottom:5px;
      margin-left:2px;
      background:transparent url('/images/details-tabs.png') no-repeat scroll 100% -105px;
    }
    .tabs li a.active {
      border-bottom:1px solid #fff;
      color:#000;
      background-position:0 0px;
    }
    .tabs li a.active span {
      background-position:100% 0px;
    }
</pre>
<p>and the image used was:<br />
<div id="attachment_65" class="wp-caption aligncenter" style="width: 464px"><a href="http://blog.rajatpandit.com/wp-content/uploads/2008/09/details-tabs.png"><img src="http://blog.rajatpandit.com/wp-content/uploads/2008/09/details-tabs.png" alt="Spritied Image for tabs" title="details-tabs" width="454" height="200" class="size-full wp-image-65" /></a><p class="wp-caption-text">Spritied Image for tabs</p></div></p>
<p>Disclaimer: I am sure someone somewhere must have done this before, I am not claiming any credit for this, the idea for this post is to document this solution for anyone to use later.</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2008/09/02/tab-menu-using-css-and-single-sprited-image/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making footer stick to the bottom of the page</title>
		<link>http://blog.rajatpandit.com/2008/06/19/making-footer-stick-to-the-bottom-of-the-page/</link>
		<comments>http://blog.rajatpandit.com/2008/06/19/making-footer-stick-to-the-bottom-of-the-page/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 11:49:36 +0000</pubDate>
		<dc:creator>rp</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[floating footer]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://blog.rajatpandit.com/?p=27</guid>
		<description><![CDATA[Problem for today, had a background which was applied on body which meant that the background titled all the way to the length of the document. The page had a...]]></description>
			<content:encoded><![CDATA[<p>Problem for today, had a background which was applied on body which meant that the background titled all the way to the length of the document. The page had a footer which would appear where the content would end, which would make the background appear below the footer and make it look like something had gone wrong there.</p>
<p><a href="http://blog.rajatpandit.com/wp-content/uploads/2008/06/floatingfooter.jpg"><img class="aligncenter size-medium wp-image-29" title="floatingfooter" src="http://blog.rajatpandit.com/wp-content/uploads/2008/06/floatingfooter-300x105.jpg" alt="Footer appearing where the the content would end. " width="300" height="105" /></a></p>
<p>Obviously a comment problem for people who wants to have a coloured footer and a fancy background. So here&#8217;s the solution I applied, after looking at the solutions available.</p>
<p>The markup.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div id=&quot;container&quot;&gt;
    &lt;div id=&quot;content&quot;&gt;
        foo
    &lt;/div&gt;
&lt;/div&gt;
&lt;div id=&quot;footer&quot;&gt;
    content for footer
&lt;/div&gt;
</pre>
<p>The CSS</p>
<pre class="brush: css; title: ; notranslate">
html {
     height:100%
}
body {
     height:100%
}
#container {
     position:relative;
     min-height:100%;
     _height:100%; /* for IE6 as it doesnt understand min-height */
}
#content {
     padding-bottom:100px; /* assuming your footer height is 100px */
}

#footer {
     position: relative;
     margin-top:-100px;
     /* move the footer up negatively exactly the same height
         as the footer so that its back in the view and always
         appears to rest at the bottom
         of the page */
}
</pre>
<p>Here&#8217;s what it looks like.<br />
<a href='http://blog.rajatpandit.com/wp-content/uploads/2008/06/working-footer.jpg'><img src="http://blog.rajatpandit.com/wp-content/uploads/2008/06/working-footer-300x244.jpg" alt="Example of footer sticking to the bottom of the page." title="working-footer" width="300" height="244" class="aligncenter size-medium wp-image-30" /></a></p>
<p>A relatively straightforward solution, the only slight problem with this is that you would require to know the height of the footer well in advance which means you cant have dynamic content for the footer. If I come across a problem like that and have to figure out a solution for that, I shall post it here.</p>
<p>Credits:<a href="http://www.themaninblue.com/writing/perspective/2005/08/29/"> http://www.themaninblue.com/writing/perspective/2005/08/29/</a></p>
<p><strong>Note</strong>: Following a comment on stumble upon, I just wanted to ensure that the credit link from the &#8220;Blue Man&#8221; is actually there to ensure to give the credit where its due, this blog post is just a note to self so that when i encounter a similar problem i can look back at it or anyone else who has had a similar problem can look at back at it. I am not taking any credit for this solution, infact I think this idea has a flaw in the sense that if you dont know what the height of the footer is going to be , this might not work as expected</p>
<div id="in_post_ad_bottom_1" style="clear:both;margin:0;padding:0;"><div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-bp */
google_ad_slot = "7787511801";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<div class="brp-bp-234">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-4254382394977039";
/* brp-234x60-BP-1 */
google_ad_slot = "9111022353";
google_ad_width = 234;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div></div><div style='clear:both'></div>]]></content:encoded>
			<wfw:commentRss>http://blog.rajatpandit.com/2008/06/19/making-footer-stick-to-the-bottom-of-the-page/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

