<?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>CreativityDen &#187; Tutorials</title> <atom:link href="http://blog.creativityden.com/category/tutorials/feed/" rel="self" type="application/rss+xml" /><link>http://blog.creativityden.com</link> <description>creative crazy!</description> <lastBuildDate>Tue, 01 Jun 2010 10:58:26 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>Having fun with transparency</title><link>http://blog.creativityden.com/having-fun-with-transparency/</link> <comments>http://blog.creativityden.com/having-fun-with-transparency/#comments</comments> <pubDate>Fri, 28 May 2010 19:07:24 +0000</pubDate> <dc:creator>Liam McCabe</dc:creator> <category><![CDATA[Showcases]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[css]]></category> <category><![CDATA[transparency]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=4333</guid> <description><![CDATA[Web design continues to grow and advance with new features constantly being brought forward through browsers, programming and markup languages. Being creative doesn&#8217;t necessarily being the first to use these new features but instead being the first one to experiment. Take a look at the border-radius property, on first glance it just just rounds off [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/main1.png" alt="" title="main" width="525" height="228" class="aligncenter size-full wp-image-4401" /></p><p>Web design continues to grow and advance with new features constantly being brought forward through browsers, programming and markup languages. Being creative doesn&#8217;t necessarily being the first to use these new features but instead being the first one to experiment. Take a look at the border-radius property, on first glance it just just rounds off corners, but when you begin to <a
href="http://blog.creativityden.com/the-hidden-power-of-border-radius-2/">delve deeper and experiment</a> you realise that the property can do much more than just round off corners. To be creative you don&#8217;t have to magically spark new ideas all the time, sometimes its about working with what you have and &#8216;thinking outside the box&#8217;. In this post I shall be sharing and explaining a number of creative uses of transparency in web design.</p><p><span
style="color: #e11a1a;">This post has an autoplaying video for the example hinted above, be warned, I know some of you can hate autoplaying flash videos (including me) but this one is okay, just some relaxing music while you read.</span></p><p><span
id="more-4333"></span></p><h3>The Principle</h3><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/principle.png" alt="" title="principle" width="519" height="403" class="aligncenter size-full wp-image-4352" style="padding: 30px 0 0 0;" /></p><p>The principle is fairly simple. As with Photoshop if you imagine a website is divided into layers. One div will appear on top of another, whilst another div may appear below. If some areas of a div are transparent you will be able to see what is behind that div. You could have an animation going on in the background for example but only display a select area using transparency in the foreground.</p><h3>The Showcase</h3><p>Not many people have experimented with this concept. A few have played with opacity to reveal elements and/or a, background behind but few have used transparency for a specific purpose. Although there are a few creative uses out there.</p><h4>FRESH01</h4><p><a
href="http://fresh01.co.za/"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/fresh.png" alt="" title="fresh" width="793" height="145" class="alignnone size-full wp-image-4348" style="margin-left: -90px;"/></a></p><p>The first website that demonstrates a creative use of transparency is <a
href="http://fresh01.co.za/">FRESH01</a>. Designed by <a
href="http://adiirockstar.com/">Adii</a> of WooThemes. The website features a fixed header navigation bar and two transparent circles either side of the main content. Inside these two circles various elements are displayed, from dates of posts and category icons to a dashed pattern which weaves left and right as you scroll.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/fresh01.png" alt="" title="fresh01" width="523" height="427" class="aligncenter size-full wp-image-4366" /></p><p>Above you can see how the idea comes into play. There is a background and foreground and whatever you would like to be displayed in the foreground you place in the circles. Why use transparency for this? I guess it would be very hard to recreate the weaving dashed line any other way.</p><h4>We Bleed Design</h4><p><a
href="http://www.webleeddesign.com/"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/wbdlogo.png" alt="" title="wbdlogo" width="327" height="304" class="aligncenter size-full wp-image-4358" /></a></p><p>If there is one website that has appeared the most on CreativityDen it would have to be Bryan&#8217;s We Bleed Design. The clever concept gives the user such a fun experience that entices them to revisit the site again and again. By using a fixed image in the background and playing with transparency with foreground, scrolling down the website has never been so fun. With the addition of some jQuery and automatic scrolling you can enjoy browsing the website without even draggin the scrollbar down.</p><p>Below you will see a small portion of the website. It is an image with a number of transparent areas so whatever is displayed behind comes through. The image is quite large.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/play_mural.png" alt="" title="play_mural" width="377" height="3126" class="aligncenter size-full wp-image-4368" /></p><h4>Massive Blue</h4><p><a
href="http://www.massiveblue.com/"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/massiveblue.png" alt="" title="massiveblue" width="288" height="88" class="alignleft size-full wp-image-4349" /></a></p><p><a
href="http://blog.creativityden.com/an-interview-with-freelance-web-designer-sam-brown/">Sam Brown</a> has also used a little transparency in his new portfolio design. Alongside a CSS3 transition you will notice the background change colour but also the logo.</p><div
class="clear"></div><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/massivebluelarge.png" alt="" title="massivebluelarge" width="610" height="400" class="alignnone size-full wp-image-4396" /></p><h4>Think Geek</h4><p>A final example of a creative use of transparency is ThinkGeek&#8217;s footer. The footer uses a transparent gradient image to replace the background image. A very cool effect indeed. If you are interested in seeing how this effect was achieved then head over to <a
href="http://css-tricks.com/video-screencasts/68-think-geek-background-fade-technique/">CSS Tricks</a>. Chris did a wonderful screencast on the matter.</p><p><a
href="http://www.thinkgeek.com/"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/thinkgeek.png" alt="" title="thinkgeek" width="430" height="344" class="aligncenter size-full wp-image-4350" /></a></p><h3>Is that it?</h3><p>A question you should always ask yourself. The answer should always be no because there are no limits to how creative you can be. I have been no more creative then the above designers, I have simply used the same effect but with a video as the background. The transparent area could be anything you want but for this example I just set it as text.</p><div
id="transparentvideotext" style="position: relative; display: block; height: 400px;"><div
style="position: absolute; top: 0; left: 0;"><p><object
width="610" height="351"><param
name="allowfullscreen" value="true" /><param
name="allowscriptaccess" value="always" /><param
name="wmode" value="transparent"><param
name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11798871&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=1&amp;loop=1" /><embed
src="http://vimeo.com/moogaloop.swf?clip_id=11798871&amp;server=vimeo.com&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1&amp;autoplay=1&amp;loop=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="610" height="351" wmode="transparent"></embed></object></p></div><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/video.png" alt="" title="video" width="610" height="351" style="position: absolute; top: 15px; left: 0; z-index: 999; border-radius: 0; -webkit-border-radius: 0; -moz-border-radius: 0;" /></p></div><p>Pretty cool eh?</p><p>The possibilities are endless when it comes to transparency. For a number of months now I have had the idea of achieving a similar effect as <a
href="http://greyscalegorilla.com/blog/2009/06/how-to-use-simple-shapes-and-masks-to-make-an-entire-animation/">GrayScaleGorilla&#8217;s mask animation</a> using jQuery. Maybe you could give it a go. <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/having-fun-with-transparency/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Create a pixel perfect subscription box using CSS3</title><link>http://blog.creativityden.com/create-a-pixel-perfect-subscription-box-using-css3/</link> <comments>http://blog.creativityden.com/create-a-pixel-perfect-subscription-box-using-css3/#comments</comments> <pubDate>Wed, 19 May 2010 16:59:46 +0000</pubDate> <dc:creator>Liam McCabe</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[css3]]></category> <category><![CDATA[form]]></category> <category><![CDATA[gradient]]></category> <category><![CDATA[shadow]]></category> <category><![CDATA[subscribe]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=4235</guid> <description><![CDATA[Today I will show how to create the above subscription box using simple HTML markup and a few advanced CSS3 properties. I believe CSS3 is the future and the sooner you can jump on the CSS3 band wagon the better. All the stylish shadows and gradients used are rendered using CSS properties which can be [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/main.png" alt="" title="main" width="604" height="278" class="aligncenter size-full wp-image-4236" /></p><p>Today I will show how to create the above subscription box using simple HTML markup and a few advanced CSS3 properties. I believe CSS3 is the future and the sooner you can jump on the CSS3 band wagon the better. All the stylish shadows and gradients used are rendered using CSS properties which can be experimented with to produce some fantastic results.</p><p><span
id="more-4235"></span></p><h3>The HTML</h3><p>The following HTML was used to create the subscription box. Bear in mind this will have no function, I am merely showing you how to design rather than code.</p><pre class="brush: xml;">
&lt;html&gt;
&lt;head&gt;
	&lt;title&gt;CSS3 Subscription box&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
	&lt;div id=&quot;container&quot;&gt;
		&lt;h1&gt;Subscribe&lt;/h1&gt;
		&lt;form name=&quot;input&quot; action=&quot;#&quot; method=&quot;post&quot;&gt;
			&lt;input type=&quot;text&quot; name=&quot;email&quot; value=&quot;Email Address&quot; onclick=&quot;value=''&quot;/&gt;
			&lt;input type=&quot;submit&quot; value=&quot;Sign up&quot; id=&quot;submit&quot;/&gt;
		&lt;/form&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre><h3>The beauty of CSS3</h3><p>The main CSS3 properties I will be looking at today are the text-shadow property, the box-shadow property and the webkit/moz gradient property.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/properties.png" alt="" title="properties" width="610" height="600" class="aligncenter size-full wp-image-4237" /></p><p>The above image gives a brief explanation to where some of the CSS3 properties have been used, just in case you thought any images were used.</p><h3>The container</h3><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/container.png" alt="" title="container" width="604" height="278" class="aligncenter size-full wp-image-4264" /></p><pre class="brush: css;">
#container
	{
		text-align: center;

		padding: 20px;

		background: -webkit-gradient(linear, left top, left bottom, from(#243d63), to(#1a2638));
		background: -moz-linear-gradient(top,  #243d63,  #1a2638);

		border-radius: 20px;
		-moz-border-radius: 20px;
		-webkit-border-radius: 20px;

		-webkit-box-shadow: 0px 1px 0px #000;

		border: 1px #1a2638 solid;
	}
</pre><p>The CSS3 properties used above will be explained individually later in this post</p><h3>The header</h3><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/header.png" alt="" title="header" width="280" height="81" class="aligncenter size-full wp-image-4240" /></p><pre class="brush: css;">
	h1
	{
		font-size: 50px;

		margin: 0;
		padding: 0;
		color: #fff;
		font-family: Arial;

		text-shadow: 0px 2px 3px #000;
	}
</pre><p>The above CSS was used to style the header. Fairly simple stuff. The font size is 50 pixels high, the color is white (#fff) and the font is Arial. The first CSS3 property used is the text-shadow property. It has four attributes. The first two position the shadow. &#8217;0px 2px&#8217; would mean zero pixels down and 2 pixels right. These two values can also be negative to position the shadow to the left and up. the third value of &#8217;3px&#8217; is the size of the shadow or blurriness. Lastly, the final value is the colour.</p><h3>The input box</h3><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/input.png" alt="" title="input" width="372" height="80" class="aligncenter size-full wp-image-4241" /></p><pre class="brush: css;">
	input
	{
		font-size: 16px;

		width: 350px;
		padding: 20px;

		border: none;

		border-radius: 10px;
		-moz-border-radius: 10px;
		-webkit-border-radius: 10px;

		text-shadow: 1px 1px 0px #fff;

		-webkit-box-shadow: -1px -1px 0px #000;

		background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#efefef));
		background: -moz-linear-gradient(top,  #ffffff,  #efefef);
	}
</pre><p>There are a number of CSS3 properties used to style the input box. The first is border-radius which rounds off any corner of an element. The larger the value the more rounded the element. You can also round off individual corners by specifying four values, with the first being the top left corner and the last, the bottom left corner (clockwise motion).</p><p>The text shadow property we have seen before. The box-shadow has exactly the same attributes but is used to add a shadow to a specific area rather than text. By setting the blurriness to 0px, you are practically duplicating the area. I have positioned the shadow 1px above and to the left of the original area to create an inner shadow effect.</p><p>The last property adds a gradient between two specified colors. As the gradient property can be a bit extensive, feel free to read the <a
href="http://webkit.org/blog/175/introducing-css-gradients/">official article regarding this property</a>.</p><h3>The Button</h3><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/05/button.png" alt="" title="button" width="165" height="84" class="aligncenter size-full wp-image-4242" /></p><p>The button makes use of three CSS states. The normal state, the hover state and the active state.</p><h4>Normal state</h4><pre class="brush: css;">
	input#submit
	{
		cursor: pointer;
		color: #fff;
		font-weight: bold;

		width: 140px;
		margin-left: 20px;

		text-shadow: 0px 1px 2px #000;

		-webkit-box-shadow: -1px -1px 0px #4bc824, 1px 1px 0px #000;

		background: -webkit-gradient(linear, left top, left bottom, from(#369a18), to(#205f0d));
		background: -moz-linear-gradient(top,  #369a18,  #205f0d);
	}
</pre><p>Nothing you haven&#8217;t seen before, however it is possible to have multiple shadows by adding a comma between attributes. I have used two shadows here to create a highlight and a drop shadow effect.</p><h4>Hover state</h4><pre class="brush: css;">

	input#submit:hover
	{
		background: -webkit-gradient(linear, left top, left bottom, from(#46b725), to(#205f0d));
		background: -moz-linear-gradient(top,  #46b725,  #205f0d);
	}
</pre><p>The hover state just sees a lighter start color to the gradient.</p><h4>Active state</h4><pre class="brush: css;">
	input#submit:active
	{
		-webkit-box-shadow: -1px -1px 0px #000;

		background: -webkit-gradient(linear, left top, left bottom, from(#46b725), to(#205f0d));
		background: -moz-linear-gradient(top,  #46b725,  #205f0d);
	}
</pre><p>The active state has an inner shadow effect giving the impression that the button has been pressed.</p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/create-a-pixel-perfect-subscription-box-using-css3/feed/</wfw:commentRss> <slash:comments>22</slash:comments> </item> <item><title>Design and build a personal mini-site</title><link>http://blog.creativityden.com/design-and-build-a-personal-mini-site/</link> <comments>http://blog.creativityden.com/design-and-build-a-personal-mini-site/#comments</comments> <pubDate>Tue, 30 Mar 2010 08:58:10 +0000</pubDate> <dc:creator>Ben Bodien</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[business]]></category> <category><![CDATA[card]]></category> <category><![CDATA[personal]]></category> <category><![CDATA[portfolio]]></category> <category><![CDATA[vcard]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=3576</guid> <description><![CDATA[Personal mini-sites (or vCard sites) are simple one page websites that have become extremely popular over the last couple of years. They serve as brief personal introductions to the owner, and launch pads to their profiles and content on popular web sites and applications. They typically share the following properties. A single page, with JavaScript [...]]]></description> <content:encoded><![CDATA[<p><a
href="http://benbodien.info"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/thumb1.jpg" alt="" width="610" height="200" class="alignnone size-full wp-image-4151" /></a><p>Personal mini-sites (or vCard sites) are simple one page websites that have become extremely popular over the last couple of years. They serve as brief personal introductions to the owner, and launch pads to their profiles and content on popular web sites and applications.</p><div
class="clear"></div><p><span
id="more-3576"></span></p><p>They typically share the following properties.</p><ul><li>A single page, with JavaScript often being used extensively to switch between sections</li><li>A mini biography (sometimes as brief as just a few words describing where the owner&#8217;s job title and place of work)</li><li>Lists of interests and hobbies</li><li>Links to websites, social networks and profiles on various other popular websites</li><li>Contact details (email addresses, phone numbers), and sometimes a contact form</li><li>A personal touch to design aesthetics and navigation interaction</li></ul><p><em>This article is more of a high-level overview of my design and build process when creating my own mini-site, rather than an in depth tutorial that goes line by line on technical details. If you&#8217;d like to find out more about a particular aspect of the site, jump straight into the code and take a look, and if you have any questions then you can either leave a comment here or get in touch with me directly.</em></p><h3>A brief history</h3><p>I produced my first personal mini site in 2005, in the form of a web based CV while I was seeking a full-time job. I wanted something that stood out from the crowd of template based Word document CVs, and as someone working with web technologies, what better medium for my CV than a website? It was a very basic site without any fancy JavaScript, and as it was effectively my CV, the content focused heavily on my skills and interests (all of which have since either evolved slightly or changed completely).</p><p>I landed a full-time job (with a little assistance from my site, although it was mostly my suave interview technique that won it for me), and I promptly forgot about the site altogether.</p><p><a
href="http://timvandamme.com/"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/tim.jpg" alt="" width="474" height="437" class="aligncenter size-full wp-image-4154" /></a></p><p>Fast forward a few years, and <a
href="http://timvandamme.com/">Tim Van Damme</a> launched his mini-site that resembles a rolodex card. The look and feel of the site was and still is remarkable, and it spawned a huge wave of similar sites, ranging from inspired derivations to horrendous rip-offs. After being inspired by Tim&#8217;s site, and some of the amazing work that was listed on Tim&#8217;s <a
href="http://timvandamme.com/wall-of-fame">Wall of Fame</a> (now no longer being updated), I decided it was time to tear down my old mini-site and put something new together.</p><h3>Concept Development</h3><p>With the popularity of Tim&#8217;s design and the many hundreds of spin-offs based on his work which followed a similar structure, it was clear to me that the &#8220;card&#8221; metaphor had been done to death. I wanted something different, so I started planning.</p><p>I&#8217;m a strong believer that design work should always start on paper, and usually with words rather than graphical forms. My first step was to identify the content I&#8217;d have on my site, because of course you can&#8217;t expect to be able design something until you know what its purpose is. The content outline came out like this:</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/1.jpg" alt="" width="610" height="695" class="alignnone size-full wp-image-4071" /></p><ol><li>Mini biography, with a bit of personal background and covering my hobbies and interests</li><li>Photographs I&#8217;ve taken, since that&#8217;s a major hobby and I have a bunch of shots I&#8217;m really proud of on Flickr</li><li>Links to profiles and presences on other web sites and apps</li><li>Contact methods (probably email and Skype)</li></ol><h3>The Design</h3><p>When designing, it&#8217;s always important to know your preferred aesthetic style and your specific areas of expertise, and to play to those strengths. I&#8217;m actually rather hopeless when it comes to conjuring up graphical interface wizardry in Photoshop, so I tend to rely on my weapons of choice:</p><ul><li>Clean, simple but well structured layouts</li><li>Strong typography (<a
href="http://informationarchitects.jp/the-web-is-all-about-typography-period/">let the type be the interface</a>)</li><li>Close attention to detail in visual hierarchy, spacing, colouration, and so on</li></ul><p>Once you can identify your core strengths as a designer, you&#8217;ll know where your comfort zone is and where you can impress, and also where you might to practise a bit more (like me and graphical interface elements).</p><p>I then started to play around with some layout ideas, focusing mainly on how the navigation between content sections would work, since this was pretty much the main aspect of the site, and would probably be the only element (besides my name) on the page.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/2.jpg" alt="" width="610" height="705" class="alignnone size-full wp-image-4072" /></p><p>I was starting to settle on the idea of having really big type for the navigation, with the content for each section revealed when the relevant heading was clicked. JavaScript accordions are often mis-used, but I decided that if avoided the cliches of accordion headings wrapped in glossy bars and over-engineered transition effects, and turned almost the entire page into one big accordion, then it might be quite an interesting way of categorising my content.</p><div
class="clear"></div><h3>The Process</h3><p>For a design this straightforward, I pretty much bypassed Photoshop altogether, going from rough sketches on paper directly to TextMate and Firefox/Firebug. My workflow for starting a new project goes as follows:</p><ol><li>Set up site folder structure, open up HTML templates and CSS Reset (I use a modified version of Eric Meyer&#8217;s Reset Reloaded).</li><li>Write the markup as cleanly as possible, entering content as I go</li><li>Write CSS, starting with the site&#8217;s layout and then working down from the top of the page</li><li>Refine and polish the CSS, making changes to the markup where necessary</li><li>Add any images required</li><li>More rounds of cleaning up</li></ol><p>This got me to a stage where I had the content for the about section (which I liberally styled with some typographic treatment), the social networks and the contact sections sorted.  That just left the Photography section which is the most complex.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/3.jpg" alt="" width="610" height="696" class="alignnone size-full wp-image-4073"></p><p>Rather than go for a more typical JavaScript image gallery with sideways scrolling between items, I wanted to make use of the excellent <a
title="jQuery Masonry plugin homepage" href="http://desandro.com/resources/jquery-masonry/">jQuery Masonry plugin</a> to display a nicely tiled layout of image thumbnails, which are of varying sizes. With some help from Marc, the in-house development wizard at <a
title="Neutron Creations homepage" href="http://neutroncreations.com">Neutron Creations</a> who put together some jQuery to pull my photos with specific tags from the Flickr API, this eventually turned out almost exactly as I envisioned on paper.</p><div
class="clear"></div><h3>Design refresh</h3><p>After living with the design for a few months and continuing to work on other projects, I started getting bored of Helvetica. I&#8217;d been overusing it a bit, and was on the lookout for a replacement typeface for my site when I found FF Enzo Web on Typekit. It has a lovely technical, almost stencilled feel to it that&#8217;s reminiscent of architectural draftsman&#8217;s hand lettering which I&#8217;ve always admired.</p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/design-and-build-a-personal-mini-site/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Fixing Transparency in IE6</title><link>http://blog.creativityden.com/fixing-transparency-in-ie6/</link> <comments>http://blog.creativityden.com/fixing-transparency-in-ie6/#comments</comments> <pubDate>Tue, 09 Mar 2010 07:42:57 +0000</pubDate> <dc:creator>Brian Rhinehart</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[fix]]></category> <category><![CDATA[ie6]]></category> <category><![CDATA[image]]></category> <category><![CDATA[opacity]]></category> <category><![CDATA[png]]></category> <category><![CDATA[transparency]]></category> <category><![CDATA[transparent]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=3794</guid> <description><![CDATA[You&#8217;ve created this really great design and everything looks just like the treatment the client approved in all other standards compliant browsers, but then they come back and say &#8220;By the way, it has to work in Internet Explorer 6 as well.&#8221; Great, here comes hours of debugging and a separate style sheet on top [...]]]></description> <content:encoded><![CDATA[<p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/ftii-ie-logo.jpg" alt="IE6 Logo" /></p><p>You&#8217;ve created this really great design and everything looks just like the treatment the client approved in all other standards compliant browsers, but then they come back and say &ldquo;By the way, it has to work in Internet Explorer 6 as well.&rdquo; Great, here comes hours of debugging and a separate style sheet on top of that. And what are you supposed to do about all those 24bit PNGs with transparency you&#8217;ve used?</p><p><span
id="more-3794"></span></p><h3>History</h3><p>I have tried several solutions like using the <code>AlphaImageLoader</code> filter in an IE6 specific style sheet, TwinHelix&#8217;s IE PNG Fix, Unit Interactive&#8217;s Unit PNG Fix and a number of others, but none of the fixes worked for every situation. These solutions worked well except when used with <code>background-position</code>, <code>background-repeat</code> and elements with the <code>a:hover</code> pseudo-class.</p><h3>A better solution</h3><p><a
href="http://www.dillerdesign.com/experiment/DD_belatedPNG/">DD_belatedPNG</a>, written by Drew Diller, is a Javascript library that uses Microsoft&#8217;s implementation of VML (Vector Markup Language) instead of Microsoft&#8217;s <code>AlphaImageLoader</code> filter. It works by adding a line of CSS to the document via the DOM which acts as a MSIE-proprietary behavior (Javascript expression) that gets bound to the elements on the fly.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/ftii-button.jpg" alt="Buttons" width="610" height="70" class="aligncenter size-full wp-image-3855" /></p><p>I&#8217;ve used it on a number of sites and have found that transparent images used with <code>background-position</code>, <code>background-repeat</code> and <code>a:hover</code> behave and display identically to modern browsers.</p><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/ftii-background-repeat.jpg" alt="Background Repeat" width="610" height="150" class="aligncenter size-full wp-image-3859" /></p><h3>Usage</h3><p>Implementing the fix is pretty straightforward, albeit you&#8217;ll want to use a conditional comment to keep other browsers from loading unnecessary code.</p><ol><li><a
href="http://dillerdesign.com/experiment/DD_belatedPNG/">Download</a> a copy of the Javascript file.</li><li>Refer to the file in your code (see code example below). <em>It&#8217;s good practice to put Javascript at the end of the document just before the closing <code>&lt;/body&gt;</code> tag.</em></li><li>Next, add a function that calls to <code>DD_belatedPNG.fix()</code></li><li>Replace <strong>your_argument</strong> with either a CSS selector <code>('.class')</code>, DOM element <code>('a, div, ul')</code> or even a group of selectors <code>('.class, .class-two, #id')</code>.</li></ol><h4>Code Example</h4><pre class="brush: php; html-script: true;">
&lt;!--[if IE 6]&gt;
&lt;script type=&quot;text/javascript&quot; src=&quot;DD_belatedPNG.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
DD_belatedPNG.fix('your_argument');
&lt;/script&gt;
&lt;![endif]--&gt;
</pre><h3>A little advice</h3><p><img
src="http://blog.creativityden.com/wp-content/uploads/2010/03/ftii-signs.jpg" alt="Road Signs" width="300" height="170" class="aligncenter size-full wp-image-3857" /></p><p>I would caution against just using DOM elements as this triggers the fix() for every reference of the element in the HTML document, including elements that do not contain transparent PNGs. If you do decide to use them, absolutely <strong>do not</strong> use <code>('body')</code> as an argument. Just don&#8217;t, Chicken Little, the sky is falling, the whole bad enchilada.</p><h3>Last bit</h3><p>There are still a few issues, like <code>&lt;tr&gt;</code>, <code>&lt;td&gt;</code> and <code>&lt;input type="image"/&gt;</code> not working, but for the most part this is the best solution to transparent images in IE6 that I have found to date.</p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/fixing-transparency-in-ie6/feed/</wfw:commentRss> <slash:comments>12</slash:comments> </item> <item><title>Creating Isometric Graphics in Illustrator</title><link>http://blog.creativityden.com/creating-isometric-graphics-in-illustrator-2/</link> <comments>http://blog.creativityden.com/creating-isometric-graphics-in-illustrator-2/#comments</comments> <pubDate>Mon, 08 Mar 2010 19:29:48 +0000</pubDate> <dc:creator>Peter Hinton</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[3D in Illustrator]]></category> <category><![CDATA[3D View]]></category> <category><![CDATA[Ilsometric]]></category> <category><![CDATA[Isometric in Illustrator]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=3741</guid> <description><![CDATA[A recent trend, particularly amongst Flash-based websites has been to create an experience based around the isometric representation. Isometric illustrations provide a 3D view where no matter where an element is within the image it remains in scale, unlike the true 3D perspective where objects reduce in size towards the background.In this article you will learn the two common methods used for creating isometric illustrations and how to create them in Illustrator.]]></description> <content:encoded><![CDATA[<p>A recent trend, particularly with Flash-based websites has been to create an experience based around the isometric representation. Isometric illustrations provide a 3D view where no matter where an element is within the image it remains in scale, unlike the true 3D perspective where objects reduce in size towards the background.</p><p><img
class="alignnone size-full wp-image-3781" src="http://blog.creativityden.com/wp-content/uploads/2010/03/main1.jpg" alt="" width="610" height="200" /></p><p>In this article you will learn the two common methods used for creating isometric illustrations and how to create them in Illustrator.</p><p><span
id="more-3741"></span></p><p>There are two common methods to choose from when you want to create the feel of an isometric drawing; either truly accurate isometric, or the 2:1 pixel ratio.</p><h3>Method 1: Truly Accurate Isometric</h3><p>If you are creating a technical drawing or icon set this is probably the method for you, the final image will match the true isometric representation.</p><h4>Step 1: Create 2D outlines</h4><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method01-a.jpg" alt="" /></p><h4>Step 2: Scale the design vertically by 86.602%.</h4><p>Object &gt; Transform &gt; Scale</p><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method01-b.jpg" alt="" /></p><h4>Step 3: Shear (or ‘skew’ in other programs) by 30 degrees.</h4><p>Object &gt; Transform &gt; Shear</p><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method01-c.jpg" alt="" /></p><h4>Step 4: Rotate the design by either 30 or -30 degrees.</h4><p>Object &gt; Transform &gt; Rotate</p><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method01-d.jpg" alt="" /></p><h4>Step 5: Add the details &amp; finish the image.</h4><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method01-final.jpg" alt="" /></p><h3>Method 2: The 2:1 Pixel Ratio</h3><p>If you are creating a piece of artwork or a media presentation then the 2:1 pixel ratio method provides the illusion of isometric even through it isn&#8217;t truly accurate, the major advantage if you decide to choose this route is that it is a far quicker technique to produce from.</p><p>I recently launched the <a
href="http://www.worldofteleware.com">World of TeleWare</a> micro-site; an interactive cityscape where users can explore the companies solutions through a series of animations and illustrations. I used the 2:1 method to create this project due to the sheer scale of the project and the scheduled timescale.</p><h4>Step 1: Create 2D outlines</h4><p>Object &gt; Transform &gt; Rotate</p><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method01-a.jpg" alt="" /><br
/> Using the &#8216;Direct Selection Tool&#8217;</p><h4>Step 2: Rotate the design by 45 degrees.</h4><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method02-b.jpg" alt="" /></p><h4>Step 3: Drag the top &amp; bottom points on a 2:1 pixel ratio.</h4><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method02-c.jpg" alt="" /></p><h4>Step 4: Add the details &amp; finish the image.</h4><p><img
class="aligncenter size-full" src="http://blog.creativityden.com/wp-content/uploads/2010/03/method02-final.jpg" alt="" /></p><h3>Comparing the Methods</h3><p>Here is a side-by-side image showing the difference between the two methods.</p><p><img
class="aligncenter size-full wp-image-3782" src="http://blog.creativityden.com/wp-content/uploads/2010/03/methods.jpg" alt="" width="500" height="340" /></p><p>I hope you have found this article useful. My next few entries will document how you can export illustrations to Flash and create eye-catching animations &amp; interactive micro-sites.</p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/creating-isometric-graphics-in-illustrator-2/feed/</wfw:commentRss> <slash:comments>18</slash:comments> </item> <item><title>The hidden power of border-radius</title><link>http://blog.creativityden.com/the-hidden-power-of-border-radius-2/</link> <comments>http://blog.creativityden.com/the-hidden-power-of-border-radius-2/#comments</comments> <pubDate>Wed, 03 Feb 2010 21:39:10 +0000</pubDate> <dc:creator>Liam McCabe</dc:creator> <category><![CDATA[Featured]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[border]]></category> <category><![CDATA[border-radius]]></category> <category><![CDATA[circle]]></category> <category><![CDATA[circles]]></category> <category><![CDATA[css]]></category> <category><![CDATA[css3]]></category> <category><![CDATA[curve]]></category> <category><![CDATA[radius]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=3266</guid> <description><![CDATA[Circles and Curvy Shapes with CSS3 So hopefully after reading &#8211; Understanding CSS – Padding, Positioning and CSS3 &#8211; you understand the basics of CSS and have been experimenting with other properties. It is important to remember that some properties will allow you to achieve effects that aren&#8217;t necessarily stated. In this post we will [...]]]></description> <content:encoded><![CDATA[<div
class="block"><div
class="image"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/venn-150x150.jpg" alt="" title="venn" width="150" height="150" class="alignnone size-thumbnail wp-image-3285" /></div><div
class="description"><strong>Circles and Curvy Shapes with CSS3</strong></p><p>So hopefully after reading &#8211; <a
href="http://blog.creativityden.com/understanding-css-padding-positioning-and-css3/">Understanding CSS – Padding, Positioning and CSS3</a> &#8211; you understand the basics of CSS and have been experimenting with other properties. It is important to remember that some properties will allow you to achieve effects that aren&#8217;t necessarily stated. In this post we will explore the property border-radius and how it can be used to create circles, semi-cricles and quarter-circles. It also has the potential to produce some terrific designs using just CSS &#8211; no images.</p></div></div><p><span
id="more-3266"></span></p><h3>The property</h3><pre class="brush: css;">
.round
{
    border-radius: 5px; /* all corners have a radius of 5px */
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;

    border-radius: 5px 4px 3px 2px; /* corner values go clockwise so, first value is the top left, second, the top right, third, bottom right and fourth, bottom left */
}
</pre><p>Jean of <a
href="http://www.catswhocode.com/">Cats Who Code</a> recently wrote an <a
href="http://www.catswhocode.com/blog/10-ways-to-make-internet-explorer-act-like-a-modern-browser">excellent article which included ways to achieve rounded corners in IE</a>.</p><h3>Circles</h3><h4>A filled circle</h4><p>To render a circle using the border-radius property, simply set the border-radius value to half the width/height. Both width and height should be the same.</p><div
id="attachment_3270" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/circle.jpg" alt="" title="circle" width="300" height="300" class="size-full wp-image-3270" /><p
class="wp-caption-text">A beautifully rendered circle.</p></div><pre class="brush: css;">
#circle
{
		width: 200px;
		height: 200px;
		background-color: #a72525;
		-webkit-border-radius: 100px;
}
</pre><h4>A bordered circle</h4><div
id="attachment_3272" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/circleborder.jpg" alt="" title="circleborder" width="300" height="300" class="size-full wp-image-3272" /><p
class="wp-caption-text">An unfilled circle with border</p></div><pre class="brush: css;">
#circle
{
		width: 200px;
		height: 200px;
		background-color: #efefef; /* Can be set to transparent */
      	border: 3px #a72525 solid;
		-webkit-border-radius: 100px;
}
</pre><p>Due to the way border-radius doesn&#8217;t curve the filled area as well, values for border thickness work well up to 4-5px depending on the size of the circle.</p><h4>Examples of circles with different borders</h4><div
id="attachment_3275" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/circledash.jpg" alt="" title="circledash" width="300" height="300" class="size-full wp-image-3275" /><p
class="wp-caption-text">An unfilled circle with a dashed border</p></div><pre class="brush: css;">
#circle
{
		width: 200px;
		height: 200px;
		background-color: #efefef; /* Can be set to transparent */
      	border: 3px #a72525 dashed;
		-webkit-border-radius: 100px 100px 100px 100px;
}
</pre><h3>Semi Circles and Quarter Circles</h3><h4>Semi-circle</h4><p>To create a semi circle, the width value most be half of the height value. The radius border for the top left and bottom left or top right and bottom right then have to have a value greater than that of the width. A semi-circle of the top and bottom section work much in the same way but with the height being half of the width and with the bottom right and bottom left or the top right and top left have values greater than the height</p><div
id="attachment_3277" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/semicircle.jpg" alt="" title="semicircle" width="300" height="300" class="size-full wp-image-3277" /><p
class="wp-caption-text">Look! A semi-circle</p></div><pre class="brush: css;">
#semicircle
{
		width: 100px;
		height: 200px;
		background-color: #a72525;
		-webkit-border-radius: 200px 0 0 200px;
}
</pre><h4>Quarter circle</h4><p>Very simple to achieve, just set a corner value to the same value as the width/height.<br
/><div
id="attachment_3278" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/quartercircle.jpg" alt="" title="quartercircle" width="300" height="300" class="size-full wp-image-3278" /><p
class="wp-caption-text">A quarter circle.</p></div></p><pre class="brush: css;">
#quartercircle
{
		width: 200px;
		height: 200px;
		background-color: #a72525;
		-webkit-border-radius: 200px 0 0 0;
}
</pre><h4>With different borders</h4><div
id="attachment_3280" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/semiquarter.jpg" alt="" title="semiquarter" width="550" height="300" class="size-full wp-image-3280" /><p
class="wp-caption-text">Same border techniques can be used.</p></div><h3>Overlapping</h3><p>By overlapping two circles you can create some interesting shapes. When overlapping make sure the shape on top has the same colour as the body background colour. You also need to use the position and z-index property to position one circle above the other. Z-index simply relates to layers. An element with a z-index of 1 will overlap an element with a z-index of 0 so long as they are positioned on top of each other.</p><div
id="attachment_3282" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/curvy.jpg" alt="" title="curvy" width="300" height="300" class="size-full wp-image-3282" /><p
class="wp-caption-text">Produce a wonderful arch effect</p></div><pre class="brush: css;">
	#wrapper
	{
		width: 1000px;
		margin: auto;
		position: relative;
	}
	#circle
	{
		position: absolute;
		top: 100px;
		left: 0;
		z-index: 0;
		width: 200px;
		height: 200px;
		background-color: #a72525;
		-webkit-border-radius: 100px;
	}

	#circle1
	{
		position: absolute;
		top: 105px;
		left: 5px;
		z-index: 1;
		width: 200px;
		height: 200px;
		background-color: #efefef;
		-webkit-border-radius: 100px;
	}
</pre><h3>Have some fun</h3><p>These are just a couple effects that I managed to achieve. I am sure you could produce some exceptional art using these techniques. Why not give it a try? <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><h4>Moon</h4><div
id="attachment_3283" class="wp-caption aligncenter" style="width: 310px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/moon.jpg" alt="" title="moon" width="300" height="300" class="size-full wp-image-3283" /><p
class="wp-caption-text">A nice little crescent moon</p></div><h4>Colour venn diagram</h4><div
id="attachment_3285" class="wp-caption aligncenter" style="width: 361px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/02/venn.jpg" alt="" title="venn" width="351" height="351" class="size-full wp-image-3285" /><p
class="wp-caption-text">A Venn Diagram</p></div> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/the-hidden-power-of-border-radius-2/feed/</wfw:commentRss> <slash:comments>107</slash:comments> </item> <item><title>Understanding CSS &#8211; Padding, Positioning and CSS3</title><link>http://blog.creativityden.com/understanding-css-padding-positioning-and-css3/</link> <comments>http://blog.creativityden.com/understanding-css-padding-positioning-and-css3/#comments</comments> <pubDate>Sun, 31 Jan 2010 16:32:38 +0000</pubDate> <dc:creator>KayRoseDesign</dc:creator> <category><![CDATA[Articles]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[css]]></category> <category><![CDATA[css3]]></category> <category><![CDATA[positioning]]></category> <category><![CDATA[understanding css]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=3227</guid> <description><![CDATA[Using CSS3 In Your Daily Coding! As my first CreativityDen post I&#8217;ve decided to show you all, (mainly beginners to CSS), how to use it effectively in you designs. One of the most frustrating things when coding a website can be not having the skills to bring your .PSD file to life, it happens to [...]]]></description> <content:encoded><![CDATA[<div
class="block"><div
class="image"> <img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/preview.png" alt="" title="preview" width="150" height="150" class="alignnone size-full wp-image-3252" /></div><div
class="description"> <strong>Using CSS3 In Your Daily Coding!</strong></p><p>As my first CreativityDen post I&#8217;ve decided to show you all, (mainly beginners to CSS), how to use it effectively in you designs. One of the most frustrating things when coding a website can be not having the skills to bring your .PSD file to life, it happens to most of us, (unless your like me and you learnt to code first), but it doesn&#8217;t have to be that way anymore.</p><p>These methods are trial and error, not every effect works in every design, which is why not every well done site has drop shadow and rounded corners everywhere, so be careful when and where you use them.</p></div></div><p><span
id="more-3227"></span></p><h3>What Exactly Will This Post Do For You?</h3><p> <strong>Please Note: All images in this article are screenshots taken directly from the browser window, no photoshoping here!</strong></p><p> With the release of CSS3, which is now being used more frequently, I&#8217;ve put this little article together for more of a beginner. However you never know, there may be a few tricks you don&#8217;t know.</p><p> I&#8217;m also going to be giving advice on such things as Padding, Margin, Borders and Background Colors, and how to us them effectively.</p><p> It&#8217;s starting to annoy me when people are making something huge out CSS3, yes it is a big evolution in the world of styling a page. However it can be a bit intimidating, so just think of it as normal CSS that you&#8217;ve never used before, because that&#8217;s all it is.</p><p> So as my first post on Creativity Den I am going to cover the CSS tricks that&#8217;ll improve your designs. Taking them from pretty good to awesome! The first thing i would like to cover is the box-shadow effect. It&#8217;s just an easy way of using drop shadow in CSS without using messy background images.</p><h3>The Box Shadow Effect</h3><pre class="brush: css;">
/*Here be the awesome drop shadow/box shadow effect for the web*/
#someRealyCoolDiv {
	width:500px;
	margin:0px auto;
	box-shadow:0px 0px 10px #000;
	-moz-box-shadow:0px 0px 10px #000;
	-webkit-box-shadow:0px 0px 10px #000;
}
</pre><h4>Explanation:</h4><p> <strong>box-shadow:</strong> This is the actual CSS3 specific code for implementing the shadow effect.</p><p> <strong>-moz-box-shadow:</strong> This targets FireFox which doesn&#8217;t understand the standard box-shadow.</p><p> <strong>-webkit-box-shadow:</strong> This targets Safari &amp; Google Chrome mainly, it uses the -webkit- selector which is the advanced CSS3&#8230;let&#8217;s say &#8216;package&#8217;, that Safari uses.<br
/> <em>Please Note: Goolge Chrome is terrible at rendering box-shdow effects!</em></p><div
id="attachment_3234" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/box_shadow.jpg" alt="" title="Box Shadow" width="550" height="250" class="size-full wp-image-3234" /><p
class="wp-caption-text">The Box Shadow Effect</p></div><hr
/><h3>Using Margin, Padding, Borders &amp; Background Colors Successfully</h3><p>We&#8217;ve all made sites or seen sites that could be beautiful, but unfortunately aren&#8217;t because of one small issue: <strong>The overall CSS aesthetics.</strong> Here&#8217;s what some people will have:</p><pre class="brush: css;">
/*POOR/LAZY WORK*/
#someRealyCoolDiv2 {
	width:500px;
	margin:0px auto;
	border:1px solid #000;
	background:#fff;
}
</pre><div
id="attachment_3236" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/margin_padding_poor.jpg" alt="" title="Poor Use Of Margin &amp; Padding" width="550" height="250" class="size-full wp-image-3236" /><p
class="wp-caption-text">Poor Use Of Margin &#038; Padding</p></div><p> Now as you can see, that&#8217;s just terrible, let&#8217;s make it allot better with really basic CSS:</p><pre class="brush: css;">
/*AWESOME/VERY WELL PADDED WORK*/
#someRealyCoolDiv2 {
	width:500px;
	margin:0px auto;
	padding:30px;
	border:1px solid #ccc;
	background:#E6E6E6;
}
</pre><div
id="attachment_3237" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/margin_padding_good.jpg" alt="" title="Good Use Of Margin &amp; Padding." width="550" height="250" class="size-full wp-image-3237" /><p
class="wp-caption-text">Good Use Of Margin &#038; Padding.</p></div><p> There we have it, you see how much cleaner it looks already? &#8211; All I&#8217;ve done is basically add some padding, a little margin, lightened the border and made the background color slightly darker than it was. Which gives a more stylistic effect, but it&#8217;s  mainly because you should, (almost), never use pure white or pure black in a design. The reason being that they&#8217;re both very powerful on the wide spectrum of colors, and strain the eyes when viewing.</p><hr
/><h3>The Text-Shadow Effect</h3><p> Yes, this is practically the same as the box-shadow effect however the effect is for text and the code is written differently. Also the biggest difference is that this effect has two uses.</p><pre class="brush: css;">
/*TEXT-SHADOW WITH A SHADOW LIKE EFFECT*/
#h2 {
	text-shadow:5px 5px 10px #000;
}
</pre><div
id="attachment_3240" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/text_shadow_1.jpg" alt="" title="The Classic Drop Shadow Effect." width="550" height="250" class="size-full wp-image-3240" /><p
class="wp-caption-text">The Classic Drop Shadow Effect.</p></div><p> That&#8217;s the first way of using it, the two 5px values represent the position, the first is left and right and the second is up and down, then the 10px represents the amount of blur wanted. The second is my personal preference: The engraving effect. All you need to do is create a Div with a BG color of #333333 then add a H2 tag with a color of #000000, (you know when i said <em>almost</em> never? yeah, this is the exception), then to that H2 tag add the following code:</p><pre class="brush: css;">
/*TEXT-SHADOW WITH AN ENGRAVE LIKE EFFECT*/
#h2 {
	color:#000000;
	text-shadow:-1px 1px #333;
}
</pre><p> I haven&#8217;t a added a blur amount so the drop shadow stays like the normal text but is moved slightly down, and slightly left, Now you should see something like the following, and by that i mean exactly like the following:</p><div
id="attachment_3241" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/text_shadow_2.jpg" alt="" title="The Engrave Text Effect." width="550" height="250" class="size-full wp-image-3241" /><p
class="wp-caption-text">The Engrave Text Effect.</p></div><hr
/><h3>Working With Positioning</h3><p> OK understanding this can be tricky at first, but just remember that each element is static to begin with and once changed to being relative, absolute or fixed you can accept four different parameters: Top, Right, Bottom and Left.</p><h4>Relative Positioning</h4><p> This is the easiest one to deal with, nothing to fancy going on here, HOWEVER, relative positioning is the base for the other two. A relatively positioned element means that it&#8217;s positioned relatively to it&#8217;s normal position. Don&#8217;t get it? yeah me neither, here&#8217;s a better explanation: All elements on a page are positioned static by default. Changing an elements positioning to relative means it can be moved around on top of other elements while it&#8217;s original position is kept, (like having it&#8217;s seat saved <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ).</p><h4>Absolute Positioning</h4><p> Now, this one seems to confuse people quite allot, it&#8217;s quite simple actually. Here we go: An absolutely positioned element is like a relative element BUT it doesn&#8217;t really notice the other elements around it. (you know, the whole &#8220;Having it&#8217;s seat saved thing&#8230;&#8221;). It just floats around on its merry way.</p><p> It is positioned according to which element that surrounds it is set to relative, i.e. If the surrounding Div is set to relative then it&#8217;ll go 50px from the left of that Div &#8211; If no relative value is set in any Div that surrounds it, it&#8217;ll go 50px from the browser window edge.</p><h4>Fixed Positioning &#8211; The Evil Child Of Positioning!</h4><p> Yes, you read correctly, fixed positioning is the hardest to grasp for most. It&#8217;s this simple: A fixed element can sit on top of everything else, (try and stick to one fixed element per page!), <a
href="http://jeffrey-way.com/">here&#8217;s a perfect example of fixed positioning in action</a>, by the master of web development, Jeffrey Way! &#8211; look at the huge bar along the bottom of the screen.</p><h4>Positioning Examples:</h4><pre class="brush: css;">
#container {
	width:500px;
	position:relative;
	border:1px solid #ccc;
	background:#e6e6e6;
}

.awesomeDiv1 {
	width:250px;
	position:relative;
	left:50px;
	top:0px;
	border:1px solid #666;
	background:#999;
}

.awesomeDiv2 {
	width:250px;
	position:absolute;
	top:100px;
	left:50px;
	border:1px solid #666;
	background:#999;
}

.awesomeDiv3 {
	width:100%;
	position:fixed;
	left:0px;
	bottom:0px;
	border:1px solid #666;
	background:#999;
}
</pre><h4>Explaining Needed!</h4><p> OK, pretty basic code going on here, just a #container Div holding three smaller Div&#8217;s, .awesomeDiv1, .awesomeDiv2 and .awesomeDiv3.</p><p> What you&#8217;ll see if you attempt to use this code is that the first two will be pretty much one after the other in the container Div. You&#8217;ll also notice that the #container Div is only wrapping around the first Div, why? Well as i said earlier, the Absolute positioning is basically in a world of its own, so it doesn&#8217;t see any other elements, hence no other elements see it!</p><p> Then the bar at the bottom, if you make the #container Div 1000px high you&#8217;ll see that the fixed Div, .awesomeDiv3, is still in its position and hasn&#8217;t moved.</p><hr
/><h3>Rounded Corners &#8211; Border Radius</h3><p> Yes i do realize that this has been posted many times over but I thought it was worth adding. Border-radius is a way making the corners of a div, input, textarea etc&#8230; Have a rounded corners effect like in photoshop. Here&#8217;s how:</p><pre class="brush: css;">
/*BORDER-RADIUS - PHPTOSHOP LIKE EFFECT*/
#awesomeDiv {
	border-radius:10px;
	-moz-border-radius:10px;
	-webkit-border-radius:10px;
}
/*THE OTHER METHOD*/
#awesomeDiv2 {
	border-radius:0px 10px 0px 10px;
	-moz-border-radius:0px 10px 0px 10px;
	-webkit-border-radius:0px 10px 0px 10px;
}
</pre><div
id="attachment_3242" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2010/01/rounded_corners.jpg" alt="" title="Rounded Corners With Some CSS3." width="550" height="250" class="size-full wp-image-3242" /><p
class="wp-caption-text">Rounded Corners With Some CSS3.</p></div><p> If your wondering what the difference is, here&#8217;s an explanation: Each 10px/0px value is equal to one corner of the div, it goes like this, Top, Right, Bottom and Left. As you can see it goes round in a clockwise motion. So in my example the top left corner will be straight, the top right will be rounded, the bottom right will be straight and the bottom left will be rounded.</p><p>If your finding it difficult to remember what each value is for just start at the top left corner, (which seems like the most logical corner to start with anyway), and then just go around in a clockwise motion.</p><hr
/><h3>Header &amp; Paragraph Typography</h3><p> This is an area that I&#8217;ve seen many people struggle with, mainly because most designers/developers don&#8217;t take much notice of typography&#8230;or they just don&#8217;t care. Either way, I see sites on a regular basis that could be awesome, (yes, even with good Margin, Padding, Borders &amp; Background Color), which lack in one very important area <strong>Typography</strong>.</p><h4>Crappy Web Page Typography:</h4><pre class="brush: css;">
/*This is a little crappy by my standards*/
h1 {
	font-family:Arial;
	font-size:40px;
	color:#000;
}

h2 {
	font-family:Arial;
	font-size:30px;
	color:#000;
}

h3 {
	font-family:Arial;
	font-size:20px;
	color:#000;
}

p {
	font-family:Arial;
	font-size:14px;
	color:#000;
}
</pre><h4>Good Page Typography:</h4><pre class="brush: css;">
/*This is a pretty good by my standards*/
h1 {
	margin:10px 0px 10px 0px;
	font-family:Arial;
	font-size:2.5em;
	color:#252525;
}

h2 {
	margin:10px 0px 10px 0px;
	font-family:Arial;
	font-size:1.88em;
	color:#333;
}

h3 {
	margin:10px 0px 10px 0px;
	font-family:Arial;
	font-size:1.25em;
	color:#4c4c4c;
}

p {
	margin:0px 0px 20px 0px;
	font-family:Arial;
	font-size:0.88;
	color:#4c4c4c;
	line-height:1.6em;
}
</pre><h4>Explanation:</h4><p> First off we&#8217;ve said goodbye to the Pixel values for all the elements, this is something you&#8217;ll hear alot: <strong>Use EM&#8217;s instead of Pixels for text elements</strong>, It&#8217;s one of those <em>best practices.</em> (I actually use both from time to time, but never on the same project).</p><p> Now i know how some people feel about using Margin inside of text elements as i have done, however i ask you this, if it makes your website look awesome and it validates then why not?</p><hr
/><h3>Conclusion Time</h3><p> I hope you&#8217;ve enjoyed my little article, it should have shown you that taking your time with each and every project is a very valued idea, be sure to spread the word by doing some Re-Tweeting, Digging &amp; Bumping!</p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/understanding-css-padding-positioning-and-css3/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>How to create a fluid grid with jQuery</title><link>http://blog.creativityden.com/fluid-grid-using-jquery/</link> <comments>http://blog.creativityden.com/fluid-grid-using-jquery/#comments</comments> <pubDate>Mon, 14 Dec 2009 13:12:27 +0000</pubDate> <dc:creator>Rendian Therianto</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[fluid]]></category> <category><![CDATA[grid]]></category> <category><![CDATA[jquery]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=2567</guid> <description><![CDATA[Fluid Design Grid-based layout is probably the more preferred way to style up a webpage to give it more magazine-like look and feel. This tutorial is about how to use CSS and Javascript to create a fluid grid-based layout (See demo here). The algorithm/procedure used in this tutorial is very simple and straightforward. There are [...]]]></description> <content:encoded><![CDATA[<div
class="block"><div
class="image"><img
class="alignnone size-thumbnail wp-image-2570" src="http://blog.creativityden.com/wp-content/uploads/2009/12/tut-preview-150x150.png" alt="" width="150" height="150" /></div><div
class="description"><strong>Fluid Design</strong></p><p>Grid-based layout is probably the more preferred way to style up a webpage to give it more magazine-like look and feel. This tutorial is about how to use CSS and Javascript to create a fluid grid-based layout (<a
href="http://rtherianto.net/toolbox/fluidgrid/index.html">See demo here</a>). The algorithm/procedure used in this tutorial is very simple and straightforward. There are more advanced algorithms out there which can handle multiple scenarios. But the purpose is to understand the basic logic on how to create such layout. So here it goes&#8230;</p></div></div><p><span
id="more-2567"></span></p><h2>Step 1: Preparing the HTML</h2><p>First we need to create a basic HTML structure. Here&#8217;s one example:</p><pre class="brush: xml;">
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;Fluid grid&lt;/title&gt;
		&lt;script type=&quot;text/javascript&quot; src=&quot;script/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;01&lt;/span&gt;This is box number 1...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;02&lt;/span&gt;This is box number 2...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;03&lt;/span&gt;This is box number 3...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;04&lt;/span&gt;This is box number 4...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;05&lt;/span&gt;This is box number 5...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;06&lt;/span&gt;This is box number 6...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;07&lt;/span&gt;This is box number 7...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;08&lt;/span&gt;This is box number 8...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;09&lt;/span&gt;This is box number 9...&lt;/p&gt;&lt;/div&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre><p>The divs will be our items, articles, posts, or whatever you call it.</p><p>For better understanding of the layout, it is recommended to replace the sample text &#8216;This is box number&#8230;&#8217; with a longer one. Preferably varies in length between one box to another. The illustration images in this tutorial will be using randomly generated text for the box content.</p><h2>Step 2: Style up a little bit</h2><p>Then for each step, just write some text describing the step and provide an image which is less than 600px wide.</p><pre class="brush: xml;">
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style/reset.css&quot; /&gt;
&lt;style type=&quot;text/css&quot;&gt;
	body {
		position: relative;
		width: 100%;
	}
	.box {
		background-color: #F0F0F0;
		color: #888;
		font-family: Arial, Tahoma, serif;
		font-size: 13px;
	}
	.box p {
				padding: 10px;
			}
	.box span {
		float: left;
		font-size: 26px;
		font-weight: bold;
	}
	div.alt {
		background-color: #CCC;
	}
&lt;/style&gt;
</pre><p>At this point, the page will look like this:</p><div
id="attachment_2571" class="wp-caption aligncenter" style="width: 510px"><img
class="size-full wp-image-2571" src="http://blog.creativityden.com/wp-content/uploads/2009/12/tut-raw.png" alt="" width="500" height="313" /><p
class="wp-caption-text">With no jQuery</p></div><h2>Step 3: The Javascript</h2><h3>3.1: The attributes</h3><p>For the sake of usability, we will create a namespace to avoid conflicts with other scripts/libraries using the same variable names. Let&#8217;s use myFluidGrid as our namespace:</p><pre class="brush: xml;">
&lt;script type=&quot;text/javascript&quot;&gt;
	var myFluidGrid = {
		COLNUMBER : 2, // Minimum column number.
		COLMARGIN : 10, // Margin (in pixel) between columns/boxes.
		COLWIDTH : 240 // Fixed width of all columns.
	};
&lt;/script&gt;
</pre><h3>3.2: The method</h3><pre class="brush: jscript;">
doLayout : function() {
	var self = this;
	var pointer = 0;
	var arr = [];
	var columns = Math.max(this.COLNUMBER, parseInt($('body').innerWidth() / (this.COLWIDTH + this.COLMARGIN)));

	$('.box').css('position', 'absolute').css('width', this.COLWIDTH  + 'px');
	$('.box').each(function() {
		var tempLeft = (pointer * (self.COLWIDTH + self.COLMARGIN));
		$(this).css('left', tempLeft + 'px');

		var tempTop = 0;
		if (arr[pointer]) { tempTop = arr[pointer];	}
		$(this).css('top', tempTop + 'px');

		arr[pointer] = tempTop + $(this).outerHeight() + self.COLMARGIN;
		pointer++;
		if (pointer === columns) { pointer = 0; }
	});
}
</pre><p>What we do here is basically we grab all boxes and set their width value with the default setting (COLWIDTH). Then we do an iteration to process each boxes.</p><p>Inside the loop, we calculate the new left and top position for each box. Defining the left position is easy using the pointer variable. Pointer is our current column position. Just multiply pointer with the box&#8217;s width (plus margin). Don&#8217;t forget to increase pointer at the end of each iteration (or reset it when it reaches the maximum column number).</p><p>Setting the top position is the tricky one. That&#8217;s where arr variable comes in handy. It basically stores the bottom position of the last box put on each column. For example: if we put box 1 in column 1 with left=0 and top=0, and box 1 has 80px height. Then arr[0] will be 80 + box margin. This arr[0] is then used as a top position for the box under box 1. See illustration below for details:</p><div
id="attachment_2572" class="wp-caption aligncenter" style="width: 510px"><img
class="size-full wp-image-2572" src="http://blog.creativityden.com/wp-content/uploads/2009/12/tut-calculation.png" alt="" width="500" height="140" /><p
class="wp-caption-text">Calculating positions</p></div><p>At this point the value of arr will be [0]=&gt;(80 + box margin), [1]=&gt;(69 + margin), [2]=&gt;(81 + margin). The next box (box 4) will use arr[0] as its top position. And it goes on until the very last box.</p><p>Finally, we attach doLayout function to window onload and onresize event using this piece of code:</p><pre class="brush: jscript;">
$(window).ready(function() {
	myFluidGrid.doLayout();
}).resize(function() {
	myFluidGrid.doLayout();
});
</pre><h2>Step 4: Putting it all together</h2><p>Here&#8217;s the final code:</p><pre class="brush: xml;">
&lt;html&gt;
	&lt;head&gt;
		&lt;title&gt;Fluid grid&lt;/title&gt;
		&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style/reset.css&quot; /&gt;
		&lt;style type=&quot;text/css&quot;&gt;
			body {
				position: relative;
				width: 100%;
			}
			.box {
				background-color: #F0F0F0;
				color: #888;
				font-family: Arial, Tahoma, serif;
				font-size: 13px;
			}
			.box p {
				padding: 10px;
			}
			.box span {
				float: left;
				font-size: 26px;
				font-weight: bold;
			}
			div.alt {
				background-color: #CCC;
			}
		&lt;/style&gt;
		&lt;script type=&quot;text/javascript&quot; src=&quot;script/jquery-1.3.2.min.js&quot;&gt;&lt;/script&gt;
		&lt;script type=&quot;text/javascript&quot;&gt;
			var myFluidGrid = {
				COLNUMBER : 2, // Minimum column number.
				COLMARGIN : 10, // Margin (in pixel) between columns/boxes.
				COLWIDTH : 240, // Fixed width of all columns.
				doLayout : function() {
					var self = this;
					var pointer = 0;
					var arr = [];
					var columns = Math.max(this.COLNUMBER, parseInt($('body').innerWidth() / (this.COLWIDTH + this.COLMARGIN)));

					$('.box').css('position', 'absolute').css('width', this.COLWIDTH  + 'px');
					$('.box').each(function() {
						var tempLeft = (pointer * (self.COLWIDTH + self.COLMARGIN));
						$(this).css('left', tempLeft + 'px');

						var tempTop = 0;
						if (arr[pointer]) { tempTop = arr[pointer];	}
						$(this).css('top', tempTop + 'px');

						arr[pointer] = tempTop + $(this).outerHeight() + self.COLMARGIN;
						pointer++;
						if (pointer === columns) { pointer = 0; }
					});
				}
			};
			$(window).ready(function() {
				myFluidGrid.doLayout();
			}).resize(function() {
				myFluidGrid.doLayout();
			});
		&lt;/script&gt;
	&lt;/head&gt;
	&lt;body&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;01&lt;/span&gt;This is box number 1...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;02&lt;/span&gt;This is box number 2...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;03&lt;/span&gt;This is box number 3...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;04&lt;/span&gt;This is box number 4...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;05&lt;/span&gt;This is box number 5...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;06&lt;/span&gt;This is box number 6...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;07&lt;/span&gt;This is box number 7...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box alt&quot;&gt;&lt;p&gt;&lt;span&gt;08&lt;/span&gt;This is box number 8...&lt;/p&gt;&lt;/div&gt;
		&lt;div class=&quot;box&quot;&gt;&lt;p&gt;&lt;span&gt;09&lt;/span&gt;This is box number 9...&lt;/p&gt;&lt;/div&gt;
	&lt;/body&gt;
&lt;/html&gt;
</pre><p>At the end, your page will look pretty much like this illustration below: (try resizing the browser window to see how the fluidity works)</p><p><a
href="http://rtherianto.net/toolbox/fluidgrid/index.html">Demo</a></p><div
id="attachment_2573" class="wp-caption aligncenter" style="width: 510px"><a
href="http://rtherianto.net/toolbox/fluidgrid/index.html"><img
class="size-full wp-image-2573" src="http://blog.creativityden.com/wp-content/uploads/2009/12/tut-final.png" alt="" width="500" height="313" /></a><p
class="wp-caption-text">End result, nice and fluid!</p></div><h2>Final words</h2><p>Hopefully this tutorial will give you better understanding on how to create a very simple fluid grid layout. Later on you can make modification such as using dynamic box width instead of static. That&#8217;s it for now. Any suggestions, comments, and critics are welcomed.</p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/fluid-grid-using-jquery/feed/</wfw:commentRss> <slash:comments>77</slash:comments> </item> <item><title>Create a funky most commented section for your blog!</title><link>http://blog.creativityden.com/create-a-funky-most-commented-section-for-your-blog/</link> <comments>http://blog.creativityden.com/create-a-funky-most-commented-section-for-your-blog/#comments</comments> <pubDate>Thu, 10 Dec 2009 21:39:34 +0000</pubDate> <dc:creator>Liam McCabe</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[blog]]></category> <category><![CDATA[coloful]]></category> <category><![CDATA[color]]></category> <category><![CDATA[commented]]></category> <category><![CDATA[comments]]></category> <category><![CDATA[most]]></category> <category><![CDATA[post]]></category> <category><![CDATA[posts]]></category> <category><![CDATA[sidebar]]></category> <category><![CDATA[wordpress]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=2042</guid> <description><![CDATA[Snaaazzzy! After Engadget redesigned their website a few weeks ago, I noticed how their sidebar contained some unique methods of displaying posts. A nice featured posts section, a fancy calendar and an awesome most commented, digg and twitter section. Using the amount of comments to determine the width and having each post a different color [...]]]></description> <content:encoded><![CDATA[<div
class="block"><div
class="image"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/12/thumb.jpg" alt="" title="thumb" width="150" height="150" class="alignnone size-full wp-image-2049" /></div><div
class="description"><strong>Snaaazzzy!</strong></p><p>After <a
href="http://www.engadget.com/">Engadget</a> redesigned their website a few weeks ago, I noticed how their sidebar contained some unique methods of displaying posts. A nice featured posts section, a fancy calendar and an awesome most commented, digg and twitter section. Using the amount of comments to determine the width and having each post a different color to produce a rainbow, I thought was an awesome idea. So I had a go at making the most commented section for CreativityDen. It turned out pretty well, so I decided to share it with you! All credit goes to <a
href="http://www.codeandtheory.com/">Code and Theory</a>.</p></div></div><p><span
id="more-2042"></span></p><h3>Colorful comment section</h3><p>The colorful comment section developed and designed for wordpress blogs.<br
/><div
id="attachment_2046" class="wp-caption aligncenter" style="width: 560px"><img
class="size-full wp-image-2046" title="mostcommented" src="http://blog.creativityden.com/wp-content/uploads/2009/12/mostcommented1.jpg" alt="Colourful comments" width="550" height="250" /><p
class="wp-caption-text">Colourful comments</p></div></p><h3>Querying and displaying the most commented posts</h3><p>The code is fairly simple. Firstly, it queries the database, finding the x most commented posts between two given dates. It then loops through the posts calculating the width and color of each post. I have tried to make the code as readable as possible, but if you have any problems do not hesitate to leave a comment. I am currently learning php myself so anyone who can improve this code, please share your improved version <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><h4>My Version</h4><p>My attempt is referred to as &#8216;spaghetti code&#8217; &#8211; don&#8217;t use it! Instead use Dylan&#8217;s improved version below mine. I shall leave my version up so you can see the mistakes I made and how Dylan cleaned my mess up. <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><pre class="brush: php; html-script: true;">
&lt;h2&gt;Most commented&lt;/h2&gt;

&lt;ul id=&quot;most_commented&quot;&gt;

&lt;?php

#Fetch the five most commented posts between the 1st of January 2009 to the 31st of December 2009
$result = $wpdb-&gt;get_results(&quot;SELECT comment_count,ID,post_title, post_date FROM $wpdb-&gt;posts WHERE post_date BETWEEN '2009-01-01' AND '2009-12-31' ORDER BY comment_count DESC LIMIT 0 , 5&quot;);

#Declare counter variable
$i = 1;

#Loop through each post
foreach ($result as $topfive)
{
    $postid = $topfive-&gt;ID;
    $title = $topfive-&gt;post_title;
    $commentcount = $topfive-&gt;comment_count;

    #My hacky way of finding the number of comments on the most commented post
    if ($i == 1) {$mostcomments = $commentcount;}

    if ($commentcount != 0)
    {

    #Display our results
    echo '&lt;li style=&quot;width:';
    #Determine the width for each post, the width of my sidebar was 260px, you will need to change this value to the width of sidebar (don't forget padding etc).
    echo round((260/$mostcomments)*$commentcount,1).'px; '; 

    #Change the color for each post - hex values - change these values to have different colors
    echo 'background-color:#';
    if ($i == 1) echo 'c32a2a';
    elseif ($i == 2) echo 'c37d2a';
    elseif ($i == 3) echo 'bac32a';
    elseif ($i == 4) echo '8fc32a';
    elseif ($i == 5) echo '4ec32a';

    echo ' ;&quot;&gt; ';

    #Display the post title with a link to the post
    echo '&lt;a href=&quot; ';
    echo get_permalink($postid);
    echo ' &quot;&gt; ';
    echo $title;
    echo '&lt;/a&gt;';

    #Display the comment number
    echo '&lt;div class=&quot;comment_no&quot;&gt;';
    echo $commentcount;
    echo '&lt;/div&gt;&lt;/li&gt;';

    }

$i++;

}

?&gt;

&lt;/ul&gt;
</pre><h4>Dylan&#8217;s much improved version</h4><pre class="brush: php; html-script: true;">
&lt;h2&gt;Most commented&lt;/h2&gt;

&lt;ul id=&quot;most_commented&quot;&gt;

&lt;?php

# Fetch the five most commented posts in the last 12 months
$result = $wpdb-&gt;get_results(&quot;SELECT comment_count,ID,post_title, post_date FROM $wpdb-&gt;posts WHERE post_date BETWEEN NOW() AND DATE_SUB(NOW(), INTERVAL 12 MONTH) ORDER BY comment_count DESC LIMIT 5&quot;);

# Initialize $mostcomments
$mostcomments = FALSE;

# Initialize the colors.  Change these values to have different colours
$colors = array(
	'#c32a2a',
	'#c37d2a',
	'#bac32a',
	'#8fc32a',
	'#4ec32a');

#Loop through each post
foreach ($result as $i=&gt;$topfive)
{
    $postid = $topfive-&gt;ID;
    $title = $topfive-&gt;post_title;
    $commentcount = $topfive-&gt;comment_count;

	# store the most comments in the first iteration, as a non-zero value evaluates to TRUE
	$mostcomments = ($mostcomments) ? $mostcomments : $commentcount;

    if ($commentcount != 0)
    {
		#Determine the width for each post, the width of my sidebar was 260px, you will need to change this value to the width of sidebar (don't forget padding etc).
		$width = round((260/$mostcomments)*$commentcount,1).'px; ';

		# use $i to correlate to an element in $colors rather than 5 if() statements
		$background_color = $colors[$i];

		# Get the permalink for this post
		$permalink = get_permalink($postid);

		# Use heredocs to output, to save on 1001 echo statements
		# Closing COUNT; is intentionally indented weird (see docs for why)
		echo &lt;&lt;&lt;COUNT
			&lt;li style = &quot;width:$width;background-color:$background_color;&quot;&gt;
				&lt;a href = &quot;$permalink&quot;&gt;$title&lt;/a&gt;
				&lt;div class = &quot;comment_no&quot;&gt;$commentcount&lt;/div&gt;
			&lt;/li&gt;
COUNT;
    }
}

?&gt;

&lt;/ul&gt;
</pre><p>I decided to insert this code into my sidebar, however you can put it anywhere on your blog.</p><h3>Add a little CSS</h3><pre class="brush: css;">
#most_commented a {
        color: #000;
        font-size: 14px;
}

#most_commented a:hover {
        color: #fff;
}

#most_commented li {
        position: relative;
        min-height: 40px;
        opacity: 0.9;
        margin: 0 0 -15px 0 !important;
        padding: 15px 10px 15px 10px !important;
}

#most_commented li .comment_no {
        position: absolute;
        top: 12px;
        right: -11px;
        padding: 5px;
        color: #efefef;
        background-color: #101010;
        -moz-border-radius: 5px;
        -webkit-border-radius: 5px;
}
</pre><h3>Done! Easy as pie</h3><p>Stay tuned! I plan on implementing this for most viewed posts and most tweeted/dugg posts <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/create-a-funky-most-commented-section-for-your-blog/feed/</wfw:commentRss> <slash:comments>22</slash:comments> </item> <item><title>Design a pixel perfect menu &#8211; MetaLab style</title><link>http://blog.creativityden.com/design-a-pixel-perfect-menu-metalab-style/</link> <comments>http://blog.creativityden.com/design-a-pixel-perfect-menu-metalab-style/#comments</comments> <pubDate>Wed, 02 Dec 2009 19:00:05 +0000</pubDate> <dc:creator>Liam McCabe</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[css]]></category> <category><![CDATA[design]]></category> <category><![CDATA[menu]]></category> <category><![CDATA[metalab]]></category> <category><![CDATA[navigation]]></category> <category><![CDATA[perfect]]></category> <category><![CDATA[pixel]]></category> <category><![CDATA[stylish]]></category> <category><![CDATA[web]]></category><guid
isPermaLink="false">http://blog.creativityden.com/?p=1903</guid> <description><![CDATA[Perfection I&#8217;m a big fan of pixel perfect design. So much so that whenever I visit MetaLab&#8217;s website my jaw drops in awe. The attention to detail is unbelievable. So I tried to replicate the style by designing a pixel perfect navigation menu. I was surprised at how easy it was to produce replicate , [...]]]></description> <content:encoded><![CDATA[<div
class="block"><div
class="image"><a
href="http://blog.creativityden.com/logos-logos-logos/quotekid/" rel="attachment wp-att-1681"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/thumb2.jpg" alt="thumb" title="thumb" width="150" height="150" class="alignnone size-full wp-image-2165" /></a></div><div
class="description"><strong>Perfection</strong></p><p>I&#8217;m a big fan of pixel perfect design. So much so that whenever I visit <a
href="http://www.metalabdesign.com/">MetaLab&#8217;s website</a> my jaw drops in awe. The attention to detail is unbelievable. So I tried to replicate the style by designing a pixel perfect navigation menu. I was surprised at how easy it was to produce replicate , it&#8217;s because of this that I decided to write up my process. If you&#8217;re into this type of design then I strongly recommend reading this tutorial. It should definitely get you on the right track.</div></div><p><span
id="more-1903"></span></p><h3>Step 1</h3><p>Let&#8217;s get started! Boot up photoshop and create a new canvas. Set width to 550px and height to 250px. Press OK and you should have a brand spanking new canvas ready to draw your pixel perfect menu. If the canvas doesn&#8217;t have a background then go ahead and press Shift + F5 and fill the layer to white. I added a radial blur to spice mine up a bit.<br
/><div
id="attachment_2134" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/1.jpg" alt="Start off with a nice background" title="1" width="550" height="250" class="size-full wp-image-2134" /><p
class="wp-caption-text">Start off with a nice background</p></div></p><h3>Step 2</h3><p>Grab the marquee tool (M) and draw a rectangle from one side two the other. Create a new layer by pressing Ctrl + Shift + N and fill the area with any colour. Double click the newly create layer and add a gradient overlay. I chose a linear gradient with a dark and lighter shade of red. Also add a black outer stroke, and set opacity to 90ish percent (if you used different colours for your gradient overlay then you may have to lower this).<br
/><div
id="attachment_2135" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/2.jpg" alt="Add a background for our menu" title="2" width="550" height="250" class="size-full wp-image-2135" /><p
class="wp-caption-text">Add a background for our menu</p></div></p><h3>Step 3</h3><p>To add a shine to any object in photoshop is fairly simple. Hover your cursor over the thumbnail of the menu background layer whilst holding Ctrl. The cursor should change to a one with a dashed box on top of it. Left click to select the area of the menu background.Now grab the marquee tool, hold alt and draw a rectangle that covers the bottom half of the menu background. You should now just have the top section selected. Create a new layer, fill the selection with white and reduce opacity to 2%.<br
/><div
id="attachment_2136" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/3.jpg" alt="Add a shine" title="3" width="550" height="250" class="size-full wp-image-2136" /><p
class="wp-caption-text">Add a shine</p></div></p><h3>Step 4</h3><p>Now onto the menu itself, select the rounded rectangle tool (U) and draw a button onto your menu background. The colour of the rectangle is up to you. I just made mine a lighter shade of red. Now to add some crisp borders. Double click on the rounded rectangle layer and add a white outer stroke and reduce opacity down to around 20%. Now add a black inner glow with the opacity set to 80% (again, play with these values until you&#8217;re satisfied). Set the choke to 100% and size to 1. I also added a gradient overlay, from dark to light red (very subtle).<br
/><div
id="attachment_2137" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/4.jpg" alt="Add a pixel perfect button" title="4" width="550" height="250" class="size-full wp-image-2137" /><p
class="wp-caption-text">Add a pixel perfect button</p></div></p><h3>Step 5</h3><p>To make the selected/pressed state you just add a black inner shadow with an opacity of 60%, angle of 90 degrees, distance of 3 and size of 3. Add some text with a black drop shadow, an opacity of 20%, distance of 1, spread of 100 and size of 1.<br
/><div
id="attachment_2138" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/5.jpg" alt="Add an inner shadow" title="5" width="550" height="250" class="size-full wp-image-2138" /><p
class="wp-caption-text">Add an inner shadow</p></div></p><h3>Step 6</h3><p>To make the normal state, select the area of the button using the method in step 3. With the button selected click on select from the top menu, choose modify and then contract. Contract the selection by 1px. With the gradient tool (G), select or create a gradient that starts from white with 100% opacity to white with 0% opacity. In a new layer, draw this gradient from the top to the bottom of the selection. Now contract the selection again by 1px and press the delete key. Set the layer to overlay and reduce the opacity until you are happy.<br
/><div
id="attachment_2139" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/6.jpg" alt="Add another pixel perfeect button, this time with a shiny edge" title="6" width="550" height="250" class="size-full wp-image-2139" /><p
class="wp-caption-text">Add another pixel perfect button, this time with a shiny edge</p></div></p><h3>Step 7</h3><p>Repeat steps 4,5 and 6 to add more buttons to the menu and that&#8217;s it! Easy <img
src='http://blog.creativityden.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> I hope you enjoyed this tutorial. If you have any queries then please feel free to leave a comment. I will try to respond as soon as possible.<br
/><div
id="attachment_2140" class="wp-caption aligncenter" style="width: 560px"><img
src="http://blog.creativityden.com/wp-content/uploads/2009/11/7.jpg" alt="Continue to add buttons for each link" title="7" width="550" height="250" class="size-full wp-image-2140" /><p
class="wp-caption-text">Continue to add buttons for each link</p></div></p> ]]></content:encoded> <wfw:commentRss>http://blog.creativityden.com/design-a-pixel-perfect-menu-metalab-style/feed/</wfw:commentRss> <slash:comments>30</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (user agent is rejected)
Database Caching 4/23 queries in 0.637 seconds using disk

Served from: blog.creativityden.com @ 2010-09-10 13:27:14 -->