<?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>athe.la blog &#187; HTML</title>
	<atom:link href="http://blog.athe.la/category/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.athe.la</link>
	<description>how to internets with style</description>
	<lastBuildDate>Mon, 30 Jan 2012 20:37:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Highlighting the Top n Rows of a Table</title>
		<link>http://blog.athe.la/highlighting-the-top-n-rows-of-a-table/</link>
		<comments>http://blog.athe.la/highlighting-the-top-n-rows-of-a-table/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 12:29:42 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://blog.athe.la/?p=233</guid>
		<description><![CDATA[I just read a great article on css-tricks about how the nth-child selector works.  What really shone out to me was the use of using a negative n value plus a number as in, &#8216;-n+5&#8242;.  What this would do is only select the top 5 rows!  This is very clever and I&#8217;m definitely going to <a href='http://blog.athe.la/highlighting-the-top-n-rows-of-a-table/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I just read a great <a href="http://css-tricks.com/how-nth-child-works/">article</a> on css-tricks about how the nth-child selector works.  What really shone out to me was the use of using a negative n value plus a number as in, &#8216;-n+5&#8242;.  What this would do is only select the top 5 rows!  This is very clever and I&#8217;m definitely going to be using this in the future.</p>
<p>A practical use of this technique is to imagine a high score table with lots of rows each detailing a person&#8217;s high score.  You want to highlight the top three to indicate that these people are the ones to be commended and enlarge the top scorer to emphasise their achievement.  You would use this css:</p>
<pre class="brush: css; title: ; notranslate">
table#highscores tr td {
    background-color: #666; /* default values */
    height: 20px;
}

table#highscores tr:first-child td {
    height: 40px; /* increase the row height of the top scorer */
}

table#highscores tr:nth-child(-n+3) td {
    background-color: #889; /* emphasise the top three */
}
</pre>
</pre>
<p>Unforunately and unsurprisingly, this doesn't work in the most popular<span style="color: #ff00ff;">*</span> browser in the world, Internet Explorer 8 and below.  For those, you'll have to use <a href="http://www.jquery.com">jQuery</a> and its implementation of nth-child.  Like what was mentioned in the article on css-tricks though, this technique shouldn't really be used for fundamental website design where the layout or usability would be effected by it not being implemented.  Allowing the website to degrade gracefully for browsers with no implementation is key.</p>
<p><span style="color: #ff00ff;">*</span> <em>By most popular, I really mean most widely-used.  I doubt that a large proportion of the internet population are using IE8 because they actually prefer IE8 to other browsers or they wouldn't switch if they had the opportunity, such as business users whose systems are locked down</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/highlighting-the-top-n-rows-of-a-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Emphasising Primary Actions on User Input Forms</title>
		<link>http://blog.athe.la/emphasising-primary-actions-on-user-input-forms/</link>
		<comments>http://blog.athe.la/emphasising-primary-actions-on-user-input-forms/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 22:43:22 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=169</guid>
		<description><![CDATA[A pretty simple philosophy: If you make the primary action on a form or web page stand out, users will be more likely to click it. By emphasising these buttons or actions you are attempting to draw the user&#8217;s focus toward it.  And by primary action, I mean the submit, send, save etc buttons; actions <a href='http://blog.athe.la/emphasising-primary-actions-on-user-input-forms/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>A pretty simple philosophy: If you make the primary action on a form or web page stand out, users will be more likely to click it. By emphasising these buttons or actions you are attempting to draw the user&#8217;s focus toward it.  And by primary action, I mean the submit, send, save etc buttons; actions where the user is making progress. Secondary actions could be buttons like back, undo or cancel</p>
<p>There are a number of ways to emphasise the primary action. One of the easiest and yet still effective methods is to colour the button brightly to draw attention. Similarly you could reduce the saturation of the cancel button. The human eye is drawn to areas of colour which stand out from the page. Also culturally the colour green is associated with a positive action and so if the user is in a hurry or just speedily going through the form, when they see the green button they will know it&#8217;s the button that submits the information. Chances are that they won&#8217;t actually read the text of the button!</p>
<p><a rel="attachment  wp-att-203" href="http://blog.athe.la/2010/02/emphasising-primary-actions-on-user-input-forms/omg-aliens/"><img class="aligncenter size-full  wp-image-203" title="facebook blue send" src="http://blog.athe.la/wp-content/uploads/2010/01/omg-aliens.png" alt="" width="618" height="360" /></a></p>
<p><span id="more-169"></span>Notice how the send button is all bright and cheery in the facebook-blue colour whereas the cancel button is grey and boring.  Other methods are also just as effective such as using a text link for the cancel action instead of a button.  This is the one I much prefer as it informs the user that by pressing the link, it&#8217;s not going to post anything they&#8217;ve typed in on the form.  Perhaps less tech-savvy users might think the cancel button would perform some function if they typed in their order details and requested to &#8216;Cancel&#8217; the order.  A link would completely resolve any issues as a normal web user knows that a link just redirects to a different page (in most cases).</p>
<p>Below we see a text link being used to give the user the opportunity to cancel the submission and return to where they came from.</p>
<p><a rel="attachment  wp-att-204" href="http://blog.athe.la/2010/02/emphasising-primary-actions-on-user-input-forms/omg-watches/"><img class="aligncenter size-full wp-image-204" title="omg-watches" src="http://blog.athe.la/wp-content/uploads/2010/01/omg-watches.png" alt="" width="433" height="490" /></a></p>
<p>Also it might be worth noting that rarely is the &#8216;reset&#8217; button used on forms now.  I don&#8217;t know why it ever caught on in the first place anyway&#8230; Who wants to fill out an entire form and then scroll to the bottom and press reset?  It provides functionality that I&#8217;m sure was never used and when it was used it was never intended(!)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/emphasising-primary-actions-on-user-input-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Vertically Align Text Within an Element</title>
		<link>http://blog.athe.la/how-to-vertically-align-text-within-an-element/</link>
		<comments>http://blog.athe.la/how-to-vertically-align-text-within-an-element/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 12:33:14 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[quick tip]]></category>
		<category><![CDATA[usability]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=154</guid>
		<description><![CDATA[Just thought I’d let you all know of a quick trick to get your text to vertically align within an element without using nasty padding or margin hacks. If you know that your element is going to be a certain height, then you can use the css attribute ‘line-height’ and give it the same value <a href='http://blog.athe.la/how-to-vertically-align-text-within-an-element/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Just thought I’d let you all know of a quick trick to get your text to vertically align within an element without using nasty padding or margin hacks. If you know that your element is going to be a certain height, then you can use the css attribute ‘line-height’ and give it the same value as the height of the object. Please note that this will only work where there is only a single line of text.</p>
<p><a rel="attachment wp-att-155" href="http://blog.athe.la/2010/01/how-to-vertically-align-text-within-an-element/7lb8k/"><img class="aligncenter size-full wp-image-155" title="My Buy Holiday button" src="http://blog.athe.la/wp-content/uploads/2010/01/7lb8k.png" alt="" width="128" height="48" /></a></p>
<p>The background colour I&#8217;m using is #EFF8F8</p>
<p>Here I have a pseudo-button and actually it&#8217;s just a text link within a &lt;p&gt;. Here’s the HTML and css:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;p class=&quot;actionbutton&quot;&gt;&lt;a href=&quot;/BuyingAndSelling/BuyHoliday&quot;&gt;Buy Holiday&lt;/a&gt;&lt;/p&gt;
</pre>
<pre class="brush: css; title: ; notranslate">

p.actionbutton
{
margin:0 auto 1em auto; /*center the button on the page*/
text-align:center;
width:124px;
height:44px;
}

p.actionbutton a
{
line-height:44px; /* same height as actionbutton element */
font-size:1.2em;
display:block; /* makes the whole area clickable rather than just the text */
text-decoration:none;
color:Black;
background-image: url('smartbutton.gif');
}

/*rollover*/
p.actionbutton a:hover
{
color:DarkOrange;
background-image: url('smartbutton-down.gif');
}
</pre>
<p>Here are the source images for you to play around with</p>
<div id="attachment_160" class="wp-caption alignleft" style="width: 134px"><a rel="attachment wp-att-160" href="http://blog.athe.la/2010/01/how-to-vertically-align-text-within-an-element/luoi1/"><img class="size-full wp-image-160 " title="normal button" src="http://blog.athe.la/wp-content/uploads/2010/01/luoi1.gif" alt="" width="124" height="44" /></a><p class="wp-caption-text">Normal button state</p></div>
<p><div id="attachment_161" class="wp-caption alignleft" style="width: 134px"><a rel="attachment wp-att-161" href="http://blog.athe.la/2010/01/how-to-vertically-align-text-within-an-element/s7cr5/"><img class="size-full wp-image-161 " title="rollover button" src="http://blog.athe.la/wp-content/uploads/2010/01/s7cr5.gif" alt="" width="124" height="44" /></a><p class="wp-caption-text">On mouse rollover</p></div><br />
<br style="clear:both"/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/how-to-vertically-align-text-within-an-element/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

