April 8, 2008

Taming Ordered Lists!

You will find other articles relevant to this document in these sections:
Richard Lee @ 3:33 pm

Ever wanted to have your own stylised numbers in an ordered list? Well using CSS alone this is impossible - as far as i know - but with the help of PHP and list-style-image we can indeed use our own stylised numbers. Anyway here’s how I do it:

<ol>
< ?php
 
var $pets = array('dog', 'cat', 'fish');
 
for($i = 1; $i <= count($pets); $i++) {
echo '
  <li>'.$pets[$i-1].'
';
}
?>
</ol>

Of course you could use something other than a list like this , but that’s not semantic is it? Using the method above will mean even when the user has CSS disabled or images for that matter there will still be numbers!

AMENDUM

Well it appears I am wrong, there is a way of styling ordered lists in purely CSS and it’s so damn simple i cannot believe i overlooked it - Thanks to stylizedweb.com for this snippet and Craig for pointing it out!

ol {
font: italic 1em Georgia, Times, serif;
color: #999999;
}
ol p {
font: normal .8em Arial, Helvetica, sans-serif;
color: #000000;
}
<ol>
  <li>
This is line one</li>
  <li>
Here is line two</li>
  <li>
And last line</li>
</ol>

April 1, 2008

Google GDay

You will find other articles relevant to this document in these sections:
Richard Lee @ 10:53 am

Whilst on google today I stumbled across Google GDay “predict content one day in advance” (http://www.google.com.au/intl/en/gday/index.html)  funny i thought  imagine how handy that would be for footy tipping or picking lotto numbers lol. Anyway for those of you haven’t figured it out already, yes its an April fools joke :P but I wouldn’t be too surprised if we do see something like this in the future :P