<?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>Sunils blog &#187; CSS Gallery</title>
	<atom:link href="http://www.myhtmlworld.com/tag/css-gallery/feed" rel="self" type="application/rss+xml" />
	<link>http://www.myhtmlworld.com</link>
	<description>myhtmlworld.com</description>
	<lastBuildDate>Mon, 14 Nov 2011 09:27:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Unobstructive image gallery listing using CSS</title>
		<link>http://www.myhtmlworld.com/web-development/image-gallery-listing-using-css.html</link>
		<comments>http://www.myhtmlworld.com/web-development/image-gallery-listing-using-css.html#comments</comments>
		<pubDate>Sun, 01 Mar 2009 17:57:09 +0000</pubDate>
		<dc:creator>Sunil</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[CMS Gallery]]></category>
		<category><![CDATA[CSS Gallery]]></category>
		<category><![CDATA[Image Gallery]]></category>
		<category><![CDATA[inline-block]]></category>
		<category><![CDATA[Sitemap]]></category>
		<category><![CDATA[Unobstructive image gallery]]></category>
		<category><![CDATA[Video Gallery]]></category>

		<guid isPermaLink="false">http://www.myhtmlworld.com/?p=183</guid>
		<description><![CDATA[CSS development requires some special treatment when it developing for a CMS website. Usually while creating image gallery, video gallery or some type of sitemap design, it needs some extra care. Otherwise it will become mess up the entire template. Some designs are looks like this…  This gallery is simple. It has fixed width and [...]]]></description>
			<content:encoded><![CDATA[<p>CSS development requires some special treatment when it developing for a CMS website. Usually while creating image gallery, video gallery or some type of sitemap design, it needs some extra care. Otherwise it will become mess up the entire template. Some designs are looks like this… </p>
<div id="attachment_184" class="wp-caption aligncenter" style="width: 310px"><a class="thickbox" title="gallery-flowers" rel="same-post-183" href="http://www.myhtmlworld.com/wp-content/uploads/2009/03/gallery-flowers.jpg"></a><p class="wp-caption-text">Image Gallery</p></div>
<p>This gallery is simple. It has fixed width and height. We can easily style this by putting this code. </p>
<pre lang="CSS">ul.gallery, ul.gallery li, ul.gallery p{
margin:0;
padding:0;
list-style:none;
font:12px/16px Arial, Helvetica, Verdana;
}

ul.gallery li{
float:left;
width:80px;
height:80px;
margin:20px 20px 0 0;
}</pre>
<p>Enough! Your gallery is ready!!</p>
<p><strong>But!!!</strong></p>
<p>Assume that each flower have a lot of description. Or the flowers name is little bit bigger. How we can manage with CSS? if the description is little bit lengthy it may looks like this&#8230; </p>
<div id="attachment_185" class="wp-caption aligncenter" style="width: 310px"><a class="thickbox" title="gallery-flowers-crapped" rel="same-post-183" href="http://www.myhtmlworld.com/wp-content/uploads/2009/03/gallery-flowers-crapped.jpg"></a><p class="wp-caption-text">Image Gallery Crapped</p></div>
<p>Here comes a simple solution to prevent this.<br />
 </p>
<pre lang="CSS">Ul.gallery li{
margin:20px 20px 0 0;
width: 80px;
min-height: 80px;
border: 1px solid #000;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
_height: 80px;
}</pre>
<p>I am now trying to explain this code a little bit. I hope you are an intermediate level of CSS programmer. So I am not explaining each line of code. You people may be doubtful about the following properties.</p>
<p><strong>display:-moz-inline-stack;</strong> what does it mean? Mozilla Firefox2 doesn’t support inline-block at all, but they have -moz-inline-stack which is about the same. That’s why we are using –moz-inline-stack.</p>
<p>The next line code is <strong>display:inline-block</strong>. As it sees it is an inline block is placed inline (ie. on the same line as adjacent content), but it behaves as a block.</p>
<p><strong>zoom:1</strong> Zoom property is non existent property in modern browsers.  But here we are using this for fix has layout problem of Internet Explorer. It will fix the absence of inline-block in Internet Explorer. <strong>*display:inline</strong> is also needs to fix this.</p>
<p>Hope you know the margin, width, min-height, vertical-align, properties of CSS. And the underscore hack of ie6.</p>
<p>And definitely it is not a valid CSS. But it will work with most of the browsers.</p>
<p>Here goes the final code</p>
<p><strong>CSS</strong></p>
<pre lang="CSS">ul.gallery, ul.gallery li, ul.gallery p{
margin:0;
padding:0;
list-style:none;
font:12px/16px Arial, Helvetica, Verdana;
}

ul.gallery p{
text-align:center;
}

ul.gallery li{
margin:20px 20px 0 0;
width: 80px;
min-height: 80px;
border: 1px solid #000;
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
_height: 80px;
}</pre>
<p><strong>HTML</strong></p>
<pre lang="HTML">
<ul class="gallery">
<li>

Yellow Rose
</li>
<li>Red Rose!! waooo it is a nice rose</li>
<li>

Flower
</li>
<li>

Yellow Rose
</li>
<li>

Red Rose
</li>
<li>

Flower
</li>
<li>

Yellow Rose
</li>
<li>

Red Rose
</li>
<li>

Flower
</li>
</ul>
</pre>
<p> </p>
<p>Download the <a href="http://www.myhtmlworld.com/wp-content/sources/css-image-gallery.zip">source code</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.myhtmlworld.com/web-development/image-gallery-listing-using-css.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

