<?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>Vince Cutting &#187; css</title>
	<atom:link href="http://www.vincecutting.co.uk/category/css/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vincecutting.co.uk</link>
	<description>Sharing web design and development ideas</description>
	<lastBuildDate>Fri, 20 Mar 2009 20:21:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fancy Unordered Lists (bullet points) using CSS</title>
		<link>http://www.vincecutting.co.uk/fancy-unordered-lists-bullet-points-using-css.html</link>
		<comments>http://www.vincecutting.co.uk/fancy-unordered-lists-bullet-points-using-css.html#comments</comments>
		<pubDate>Fri, 20 Mar 2009 20:20:57 +0000</pubDate>
		<dc:creator>Vince Cutting</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[bullets]]></category>
		<category><![CDATA[lists]]></category>

		<guid isPermaLink="false">http://www.vincecutting.co.uk/?p=68</guid>
		<description><![CDATA[Have you ever wanted to add fancy bullet points to your unordered lists in your(x)HTML but never knew how? The truth is, it&#8217;s actually really easy to achieve. All you need to do is add a CSS class to your unordered list and then use your CSS to add your chosen image as the bullet [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever wanted to add fancy bullet points to your unordered lists in your(x)HTML but never knew how? The truth is, it&#8217;s actually really easy to achieve. All you need to do is add a CSS class to your unordered list and then use your CSS to add your chosen image as the bullet points. In this post I&#8217;ll walk you through this step by step. First lets take a quick look at the list we&#8217;re going to be creating:</p>
<ul class="list-tick">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<p><span id="more-68"></span></p>
<h2>Step 1: Create your unordered list, ensuring you use a classname for the ul. </h2>
<p>OK the first step is to create your unordered list as normal, and to specify a classname on the ul element. In this example i am using a class name of &#8220;tick-list&#8221; as I&#8217;ll be using a tick image for my bullet point. The HTML code should look something like this:-</p>
<div class="geshi no html4strict">
<ol>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;ul</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;list-tick&quot;</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;li&gt;</span></span>This is the first list item<span class="sc2"><span class="kw2">&lt;/li&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;li&gt;</span></span>This is the second list item<span class="sc2"><span class="kw2">&lt;/li&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;li&gt;</span></span>and this is the third list item<span class="sc2"><span class="kw2">&lt;/li&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/ul&gt;</span></span></div>
</li>
</ol>
</div>
<h2>Step 2: Add the CSS to specify your image to be used as a bullet point</h2>
<p>With our HTML list in place we now need to use our CSS to control how it will look. The following CSS will remove the default margin and padding for both the ul and li elements, remove the standard unordered list bullet points, indent the list items using some padding on the left, and finally place your chosen image as a background in the padded are at the left of the list item. Your CSS for this particular list should look something like this:-</p>
<div class="geshi no css">
<ol>
<li class="li1">
<div class="de1">ul<span class="re1">.list-tick</span> <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">margin</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">padding</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">ul<span class="re1">.list-tick</span> li <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">margin</span><span class="sy0">:</span> <span class="nu0">0</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">padding</span><span class="sy0">:</span> <span class="re3">2px</span> <span class="nu0">0</span> <span class="re3">2px</span> <span class="re3">16px</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">list-style</span><span class="sy0">:</span> <span class="kw2">none</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">background</span><span class="sy0">:</span> <span class="kw2">url</span><span class="br0">&#40;</span><span class="st0">&#39;../images/list_icons/tick1.jpg&#39;</span><span class="br0">&#41;</span> <span class="kw2">no-repeat</span> <span class="kw1">top</span> <span class="kw1">left</span><span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<h2>Step 3: Dont forget to add your bullet/tick image to your server where your CSS can find it.</h2>
<p>Of course the above HTML and CSS will not work without the image you want to use actually being available, so make sure you have them available on your server where your CSS can find them &#8211; you&#8217;ll also want to make sure that your image(s) are scaled down appropriately prior to using them, I have scaled down my bullet images to 12px x 12px so they should fit nicely beside standard sized text.</p>
<h2>Step 4: View your fancy new list</h2>
<p>OK, with the first 3 steps now completed, you should be ready to view you fancy new unordered list with customized bullet points, like so: </p>
<ul class="list-tick">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<h2>Step 5: Experiment with different images</h2>
<p>You can add as many different customised list classes and images as you like to your website. Below are a few more examples:-<br />
List with a &#8216;list-pin1&#8242; CSS class</p>
<ul class="list-pin1">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<p>Another list with a &#8216;list-pin2&#8242; CSS class</p>
<ul class="list-pin2">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<p>List with a &#8216;list-cross&#8217; CSS class</p>
<ul class="list-cross">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<p>List with a &#8216;list-note&#8217; CSS class</p>
<ul class="list-note">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<p>List with a &#8216;list-mark&#8217; CSS class</p>
<ul class="list-mark">
<li>This is the first list item</li>
<li>This is the second list item</li>
<li>and this is the third list item</li>
</ul>
<p>So, use your imagination, you can add bigger images if you&#8217;d like, you&#8217;ll probabally need uo use bigger li text though or more padding. Let me know if you come up with any stunning lists of your own.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vincecutting.co.uk/fancy-unordered-lists-bullet-points-using-css.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to center a website accross all browsers using CSS</title>
		<link>http://www.vincecutting.co.uk/how-to-center-a-website-accross-all-browsers-using-css.html</link>
		<comments>http://www.vincecutting.co.uk/how-to-center-a-website-accross-all-browsers-using-css.html#comments</comments>
		<pubDate>Tue, 21 Oct 2008 22:23:41 +0000</pubDate>
		<dc:creator>Vince Cutting</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[center]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[webpage]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://www.vincecutting.co.uk/?p=46</guid>
		<description><![CDATA[Now I&#8217;m not sure about you, but I really do hate websites that are stuck on the left of the screen, and from talking to a few friends, I know I&#8217;m not alone with this pet hate. The thing is, that many beginner site designers may also dislike this left alignment, but simply do not [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.vincecutting.co.uk/wp-content/uploads/css-icon.jpg" alt="CSS" title="css-icon" width="150" height="100" class="alignleft size-full wp-image-66" />Now I&#8217;m not sure about you, but I really do hate websites that are stuck on the left of the screen, and from talking to a few friends, I know I&#8217;m not alone with this pet hate. The thing is, that many beginner site designers may also dislike this left alignment, but simply do not know how to make their site appear in the center of the screen, but others may have centered their site absolutely perfect in their favourite browser, but are totally unaware that it may not be centered in others.<br />
<span id="more-46"></span><br />
Today, I&#8217;d like to share my own method of centering your website in any browser using CSS &#8211; I&#8217;m going to be using CSS in the head of the HTML document today for simplicity, although ideally you should place it into an external/linked stylesheet on your own pages.</p>
<p>The trick to centering pages in all browsers is using what&#8217;s commonly known as a &#8216;wrapper&#8217;, applying some auto margin to that div in the CSS, and then using a small workaround so that the wrapper is centered in IE.</p>
<p>I&#8217;m going to start by using a basic outline template, demonstrating the basic page structure and illustrating what I mean buy the wrapper &#8211; which is commonly just a div to contain everything in.</p>
<div class="geshi no html4strict">
<ol>
<li class="li1">
<div class="de1"><span class="sc0">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; </span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc0"> &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;html&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc2"><span class="kw2">&lt;head&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;meta</span> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">&quot;Content-Type&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;text/html; charset=utf-8&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;title&gt;</span></span>Title<span class="sc2"><span class="kw2">&lt;/title&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;meta</span> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;robots&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;index, follow&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;meta</span> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;keywords&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;meta</span> <span class="kw3">name</span><span class="sy0">=</span><span class="st0">&quot;description&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;&quot;</span> <span class="sy0">/</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;style</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;body, html {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; margin: 0;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; padding: 0;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;}</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;#wrapper {</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; width: 800px; /* your wrapper obviously needs a width otherwise it will be 100% */</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; margin: 0 auto; /* This is the proper way to center in a standards compliant browser */</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;}</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;/* This is the IE workaround*/</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;body { text-align: center; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;#wrapper { text-align: left; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;/*Now to just add some colour to see it in action*/</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;body { background: #000; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;#wrapper { background: #fff; color: #000; }</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;/style&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc2"><span class="kw2">&lt;/head&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc2"><span class="kw2">&lt;body&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;div</span> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;wrapper&quot;</span><span class="kw2">&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="sc2"><span class="kw2">&lt;h1&gt;</span></span>Title<span class="sc2"><span class="kw2">&lt;/h1&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp;<span class="sc2"><span class="kw2">&lt;p&gt;</span></span>Content to go here.<span class="sc2"><span class="kw2">&lt;/p&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="sc2"><span class="kw2">&lt;/div&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;<span class="sc2"><span class="kw2">&lt;/body&gt;</span></span></div>
</li>
<li class="li1">
<div class="de1"><span class="sc2"><span class="kw2">&lt;/html&gt;</span></span></div>
</li>
</ol>
</div>
<p>Now you can see the structure is fairly simple &#8211; the wrapper is just a div with a id of &#8220;wrapper&#8221;, which we specify a width for, and then set the margins to &#8220;0 auto&#8221;, which means no pixels for top and bottom margins, and auto for left and right margins. the auto value for margins basically gives the left and right edges equal space between the edge of the wrapper div and the edge of the browser window.</p>
<p>Next, we have to add the workaround for IE6, because it doesn&#8217;t understand auto as a value for margin. We basically do this by using text-align:center for the body to center the div on the page, but this will also center everything inside the div too, so we then have to re-align this to the left again using text-align:left for the div itself.</p>
<p>I&#8217;ve applied some background colours to the body and the div, so that you can see the centering effect for yourself &#8211; go ahead and try it for your own pages, and test it in different browsers&#8230;enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vincecutting.co.uk/how-to-center-a-website-accross-all-browsers-using-css.html/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
	</channel>
</rss>
<!---->?>