<?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>MattPealing &#187; CSS</title>
	<atom:link href="http://www.mattpealing.co.uk/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mattpealing.co.uk</link>
	<description>You Have Arrived at The Matt Pealing Website</description>
	<lastBuildDate>Wed, 04 Aug 2010 15:33:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>IE Leaves a Gap Between Images (Fix)</title>
		<link>http://www.mattpealing.co.uk/ie-leaves-a-gap-between-images-fix.htm</link>
		<comments>http://www.mattpealing.co.uk/ie-leaves-a-gap-between-images-fix.htm#comments</comments>
		<pubDate>Tue, 13 Apr 2010 11:15:01 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.mattpealing.co.uk/?p=400</guid>
		<description><![CDATA[Some of you may have noticed in Internet Explorer 6 or 7 that it can sometimes leave an unwanted gap around some of your images. This also means that IE will leave a gap between the image and any borders applied to it, which can be frustrating for those of us (hopefully most of us) [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you may have noticed in Internet Explorer 6 or 7 that it can sometimes leave an unwanted gap around some of your images. This also means that IE will leave a gap <em>between</em> the image and any borders applied to it, which can be frustrating for those of us (hopefully most of us) who don&#8217;t settle for a &#8220;the client probably won&#8217;t notice&#8221; attitude.</p>
<h2>IE7 / Firefox Comparison</h2>
<p>Notice in the image below how IE7 (and IE6) adds a gap in between the image and the element beneath it, whereas Firefox (end any other half decent browser) does not.</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/04/compare1.jpg"><img class="alignnone size-full wp-image-657" title="compare" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/04/compare1.jpg" alt="" width="575" height="300" /></a></p>
<h2>The Cause</h2>
<p>This is generally caused by line breaks in your code such as the following:</p>
<p><code>&lt;div id="sidebar"&gt;<br />
&lt;a href="event.php"&gt;<br />
&lt;img alt="View Upcoming Shows" src="image/cta-upcoming-show.jpg"&gt;<br />
&lt;/a&gt;<br />
&lt;/div&gt;<br />
&lt;!-- some other element here --&gt;<br />
</code></p>
<h2>The Cure</h2>
<p>But we don&#8217;t want to put those 3 lines of code on one line now do we! We want to keep our code nice and readable. So all we need to do is add one tiny piece of CSS to our stylesheet:</p>
<p><code>#sidebar img {<br />
display: block;<br />
}</code></p>
<p>There we have it! No more strange gaps around images in Internet Explorer. Here how it now looks in the unholy Internet Explorer:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/04/ie-fix.jpg"><img class="alignnone size-full wp-image-406" title="ie-fix" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/04/ie-fix.jpg" alt="" width="285" height="274" /></a></p>
<p>Ok you got me, that was just the Firefox image from before with the IE logo layered over it! But it <em>does</em> work, trust me <img src='http://www.mattpealing.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattpealing.co.uk/ie-leaves-a-gap-between-images-fix.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>5 Simple Tips to Improve Your Web Designs</title>
		<link>http://www.mattpealing.co.uk/5-simple-tips-to-improve-your-web-designs.htm</link>
		<comments>http://www.mattpealing.co.uk/5-simple-tips-to-improve-your-web-designs.htm#comments</comments>
		<pubDate>Sun, 24 Jan 2010 17:31:43 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Design]]></category>

		<guid isPermaLink="false">http://www.mattpealing.co.uk/?p=303</guid>
		<description><![CDATA[I thought I&#8217;d share a few really simple techniques that you can add to your websites to improve their overall design. Once you&#8217;ve read these you&#8217;ll be able to impress everybody at the next house party you go to with your new found knowledge, or even add some to your speech at your friends wedding&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I&#8217;d share a few really simple techniques that you can add to your websites to improve their overall design. Once you&#8217;ve read these you&#8217;ll be able to impress everybody at the next house party you go to with your new found knowledge, or even add some to your speech at your friends wedding&#8230; the possibilities are endless!</p>
<p>Keep in mind that you shouldn&#8217;t overuse these techniques otherwise your designs may get a bit predictable. Also these tips will not necessarily work in every design, make sure you use them appropriately otherwise they may just look really out of place compared to the other elements on the page. Enjoy!</p>
<h2>Overlapping</h2>
<p>I&#8217;ve been using this method a lot in some of my most recent work as I find it can add a lot more depth to even the most basic of designs. It&#8217;s implementation will vary depending on how your website is coded, but you can generally make it happen by using large background images as well as using separate backgrounds for both the <strong>html</strong> and <strong>body</strong> element. Below is an image of one of my clients&#8217; websites without any use of overlapping:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/overlapping-01.jpg"><img title="overlapping-01" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/overlapping-01.jpg" alt="overlapping-01" width="600" height="219" /></a></p>
<p>At the minute the layout of the webpage looks a little mediocre, it&#8217;s obvious that the header is separate to the rest of the page beneath. Let&#8217;s see how it looks if the girl is bigger and overlaps the header:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/overlapping-02.jpg"><img title="overlapping-02" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/overlapping-02.jpg" alt="" width="600" height="219" /></a></p>
<p>Much better! Now that the girl image overlaps the header it&#8217;s hard to tell where the header ends and where the rest of the page begins. You can use this technique as a way of blending elements together, as can be seen in a lot of print design and magazines. Overlapping is a method that is often unexplored in some peoples web designs, but it&#8217;s not actually that hard to pull off!</p>
<h2>Leading</h2>
<p>Pronounced &#8216;ledding&#8217;, this is the method of editing the amount of space in between each line of text on your page. A common mistake of many inexperienced designers is not to take leading into consideration, which can lead to really unattractive and hard-to-understand content. Leading can be edited easily using the CSS property; <strong>line-height</strong>.  Let&#8217;s see some sample text where the leading is left to the browser&#8217;s default value:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/leading-01.png"><img class="size-full wp-image-307 alignnone" title="leading-01" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/leading-01.png" alt="leading-01" width="533" height="222" /></a></p>
<p>Urgh! Not very nice at all. Who&#8217;d want to read up on the history of tin-openers if it used styling like THAT! Let&#8217;s add the following to our beloved CSS:</p>
<p><code> line-height:1.75em;</code></p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/leading-02.png"><img class="alignnone size-full wp-image-315" title="leading-02" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/leading-02.png" alt="leading-02" width="541" height="273" /></a></p>
<p>What a difference that&#8217;s made, if it was in a language I could understand then I&#8217;m sure whatever it says would sink in much easier.</p>
<h2>Kerning</h2>
<p>This affects the spacing in between each letter and can be edited using the <strong>letter-spacing</strong> CSS property. I only tend to edit this in heading elements due to their increased font size. Using this technique will generally depend on how the rest of your design looks so it isn&#8217;t right for every occasion. See a heading without the letter-spacing altered:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/kerning-011.gif"><img class="alignnone size-full wp-image-331" title="kerning-01" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/kerning-011.gif" alt="" width="521" height="211" /></a></p>
<p>That heading looks okay (and will be fine for a lot of designs), but we can always edit the letter-spacing property to give it more of an impact. We only need to add a tiny negative value to bring the letters closer together as the letter-spacing property appears <strong>very sensitive</strong> when using <strong>em</strong>&#8217;s, so make sure you have the supervision of an adult for this bit:</p>
<p><code>letter-spacing:-0.075em;</code></p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/kerning-02.gif"><img class="alignnone size-full wp-image-323" title="kerning-02" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/kerning-02.gif" alt="kerning-02" width="527" height="213" /></a></p>
<p>See how the space between the letters has been reduced? This can look very cool when used appropriately.</p>
<p>Rather than adding a negative value to the CSS, you can always add a positive value to <strong>increase</strong> the kerning like so:</p>
<p><code>letter-spacing:0.075em;</code></p>
<p>However, I don&#8217;t think I&#8217;ve ever needed to use the property in this way as I generally don&#8217;t like this sort of kerning (in the content for a website anyway).</p>
<h2>Indented borders</h2>
<p>This will literally take a matter of seconds and can often make various elements a lot more interesting on a webpage. See below for a sample of an average looking navigation bar, with the <strong>border-color</strong> property set to #31660c:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/indented-borders-01.gif"><img class="alignnone size-full wp-image-332" title="indented-borders-01" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/indented-borders-01.gif" alt="indented-borders-01" width="550" height="39" /></a></p>
<p>We can add a nice little touch by altering the border colour of the other side of each element:</p>
<p><code>border-left:#31660c solid 1px;<br />
border-right:#90b840 solid 1px;</code></p>
<p>This will give an indented look to the list items in the navigation, how very tasty:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/indented-borders-02.gif"><img class="alignnone size-full wp-image-334" title="indented-borders-02" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/indented-borders-02.gif" alt="indented-borders-02" width="550" height="39" /></a></p>
<p>Don&#8217;t forget you can use this technique on all sorts of elements not just navigation lists. Why not live life really dangerously by experimenting with indented borders on images and content areas too!</p>
<h2>Double Borders</h2>
<p>This is especially useful when dealing with image galleries as it can help to contain each thumbnail, rather than just having the images exposed on their own:</p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/double-borders-1.jpg"><img class="size-full wp-image-337 alignnone" title="double-borders-1" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/double-borders-1.jpg" alt="double-borders-1" width="621" height="182" /></a></p>
<p>We can use some really simple CSS add a double border to make the images stand out a bit more, and to show that they are clickable:</p>
<p><code>background:#e1e1e1;<br />
padding:5px;<br />
border:#6d6d6d solid 1px;</code></p>
<p><a href="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/double-borders-2.jpg"><img class="alignnone size-full wp-image-338" title="double-borders-2" src="http://www.mattpealing.co.uk/wp-content/uploads/2010/01/double-borders-2.jpg" alt="double-borders-2" width="621" height="200" /></a></p>
<p>To properly show that the images are clickable you should edit the <strong>hover</strong> pseudo class so that its colour changes to your liking:</p>
<p><code>#featured-items a:hover {</code></p>
<h2>The End</h2>
<p>I hope you&#8217;ve found my first proper blog post useful, any feedback is appreciated so feel free to leave a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattpealing.co.uk/5-simple-tips-to-improve-your-web-designs.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
