<?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>Jeepstone &#187; CSS</title>
	<atom:link href="http://www.jeepstone.co.uk/tag/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeepstone.co.uk</link>
	<description>The home of Pete Jones</description>
	<lastBuildDate>Mon, 02 Aug 2010 11:12:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>CSS Nested Ordered Lists</title>
		<link>http://www.jeepstone.co.uk/2008/12/10/css-nested-ordered-lists/</link>
		<comments>http://www.jeepstone.co.uk/2008/12/10/css-nested-ordered-lists/#comments</comments>
		<pubDate>Wed, 10 Dec 2008 14:31:05 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[nested]]></category>
		<category><![CDATA[ordered list]]></category>

		<guid isPermaLink="false">http://www.jeepstone.co.uk/?p=28</guid>
		<description><![CDATA[It seems very silly that with all of the power of CSS and the push for semantic HTML, that the ordered list in HTML has fairly basic functionality, or rather, it&#8217;s missing something that is useful on most websites that are built these days.
Let&#8217;s take our standard Terms and Conditions. Normally this is broken down, [...]]]></description>
			<content:encoded><![CDATA[<p>It seems very silly that with all of the power of CSS and the push for semantic HTML, that the ordered list in HTML has fairly basic functionality, or rather, it&#8217;s missing something that is useful on most websites that are built these days.<span id="more-28"></span></p>
<p>Let&#8217;s take our standard Terms and Conditions. Normally this is broken down, contract-style, into Section 1 then Sub Section 1.4 etc. Now in HTML we represent this as:<code><br />
&lt;ol&gt;<br />
&lt;li&gt;Why are HTML Ordered lists rubbish?<br />
&lt;ol&gt;<br />
&lt;li&gt;Bad HTML<br />
&lt;ol&gt;<br />
&lt;li&gt;This could be badly nested HTML&lt;/li&gt;<br />
&lt;li&gt;or have other problems such as<br />
&lt;ol&gt;<br />
&lt;li&gt;poorly typed&lt;/li&gt;<br />
&lt;li&gt;cake in the keyboard&lt;/li&gt;<br />
&lt;li&gt;developer is drunk&lt;/li&gt;<br />
&lt;/ol&gt;<br />
&lt;/li&gt;<br />
&lt;li&gt;or maybe even just tiredness&lt;/li&gt;<br />
&lt;/ol&gt;<br />
&lt;/li&gt;<br />
&lt;/ol&gt;<br />
&lt;/li&gt;<br />
&lt;/ol&gt;</code></p>
<p>This is nice and proper HTML but the numerals are just single figures rather than being 1.3.2.</p>
<h2>CSS 2.1 to the rescue</h2>
<p>Thankfully there is a solution (for some browsers) in the form of CSS 2.1. In CSS 2.1, you can define <a href="http://www.w3.org/TR/CSS21/generate.html">counters</a>. These allow us to store the current level and populate it as we loop through the nested lists. With a bit of jiggery pokery, we can then output the number before the list item.</p>
<p><code><br />
ol {<br />
counter-reset: item;<br />
}<br />
ol li:before {<br />
content: counters(item, ".") ". ";<br />
counter-increment: item;<br />
}<br />
</code></p>
<p>Now when you render this in Firefox/Safari you get nicely numbered list items.</p>
<h2>Drawbacks</h2>
<p>There are some drawbacks. It appears that IE (how did we know that was coming?) breaks at the statement. This means that anything appearing after it will not work, so put it at the end of your stylesheet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeepstone.co.uk/2008/12/10/css-nested-ordered-lists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Rounded Corners (in IE6 as well!)</title>
		<link>http://www.jeepstone.co.uk/2008/12/09/css-rounded-corners-in-ie6-as-well/</link>
		<comments>http://www.jeepstone.co.uk/2008/12/09/css-rounded-corners-in-ie6-as-well/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 14:08:30 +0000</pubDate>
		<dc:creator>Pete</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[IE6]]></category>
		<category><![CDATA[rounded corners]]></category>

		<guid isPermaLink="false">http://www.jeepstone.co.uk/?p=24</guid>
		<description><![CDATA[DD Roundies is a new slant on the age-old CSS Rounded corners functionality that amost every web designer wants, but very few have as it&#8217;s a pain to implement. Currently the options are:
Four Corners (aka Top and Tail)
In this method, the background acts as our rounded element, and we place images in elements within the [...]]]></description>
			<content:encoded><![CDATA[<p><a title="A new approach to rounded corners" href="http://dillerdesign.com/experiment/DD_roundies/">DD Roundies</a> is a new slant on the age-old <strong>CSS Rounded corners</strong> functionality that amost every web designer wants, but very few have as it&#8217;s a pain to implement.<span id="more-24"></span> Currently the options are:</p>
<h2>Four Corners (aka Top and Tail)</h2>
<p>In this method, the background acts as our rounded element, and we place images in elements within the container. In the simplest form, this can be just a top div, bottom div and a bit for your content. The problem with this is that it&#8217;s fixed width, which is where the 4 corners comes in allowing the container to resize. This is an acceptable, if HTML heavy way of tackling the problem as you often need more than one image to satisfy the numerous corners. Take a look at these <a href="http://kalsey.com/2003/07/rounded_corners_in_css/">rounded CSS corners</a>.</p>
<h2>Four Corners &#8211; One Image</h2>
<p>This is a more complex CSS fix for the problem, but it&#8217;s not so good with transparent images where you need a PNG/transparency. In this instance, <a href="http://www.schillmania.com/projects/dialog2/">fluid rounded corners</a> is a good way of acheiveing the effect and can look quite cool, despite some extra HTML. However, it&#8217;s not much use in IE6 as IE&#8217;s background positioning is pants so you need to defer to transparent GIFs, which is not much use where you have drop shadows.</p>
<h2>Rounded CSS Corners that work in IE as well!</h2>
<p>A little while ago I found a link to a site by Drew Diller. Drew had noticed that IE&#8217;s VML will allow you to draw a border around an HTML element. This means that you can use your nice CSS 2.1 and get rounded corners in IE. It also makes sure that it only draw the borders in IE, leaving you to implement your own rounded corners in CSS 2.1 compatible browsers such as Firefox and Safari. For instance, you could do the following:</p>
<div id="round">
<p>Here is a container.</p></div>
<p>In your CSS you can put the following:<br />
<code><br />
#round {<br />
border: 1px solid #000;<br />
-moz-border-radius:5px;<br />
-webkit-border-radius:5px;<br />
}<br />
</code><br />
Which will give you a nice rounded box in Firefox and Safari.</p>
<p>You can then use Drew Diller&#8217;s script to put them in for IE. Simple!</p>
<h3>Drawbacks</h3>
<p>Currently, the script doesn&#8217;t support HTML form elements (it&#8217;s difficult to append HTML to a form element). However, Drew tells me that he&#8217;s working on a fix at the moment, which will be greatly received.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jeepstone.co.uk/2008/12/09/css-rounded-corners-in-ie6-as-well/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
