<?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>Robert Lawson &#187; Blog</title>
	<atom:link href="http://www.robert-lawson.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robert-lawson.co.uk</link>
	<description>Front End Developer &#38; Web Designer &#124; HTML CSS</description>
	<lastBuildDate>Mon, 23 Jan 2012 07:06:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Twitter.com login form using CSS3 and jQuery</title>
		<link>http://www.robert-lawson.co.uk/twitter-form-css3-jquery/</link>
		<comments>http://www.robert-lawson.co.uk/twitter-form-css3-jquery/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 20:44:48 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.robert-lawson.co.uk/?p=613</guid>
		<description><![CDATA[If you have seen the new twitter.com log in form you will of seen the cool effects they have for the different states. I thought this would be a good opportunity to try and re create the form myself. I have tried to stick to the twitter form as much as possible without ripping off [...]]]></description>
			<content:encoded><![CDATA[<p>If you have seen the new twitter.com log in form you will of seen the cool effects they have for the different states. I thought this would be a good opportunity to try and re create the form myself. I have tried to stick to the twitter form as much as possible without ripping off all their code, I wanted to use my own techniques to accomplish it.<br />
<span id="more-613"></span><br />
See a <a href="http://www.robert-lawson.co.uk/demos/twitter" target="_blank">demo</a> of the finished product.</p>
<p>I started off with a simple markup.</p>
<pre class="qoate-code">
&lt;div class="login clearfix"&gt;&lt;form id="twitter" action="#" method="get" name="twitter"&gt;
&lt;fieldset&gt;
&lt;div class="holder"&gt;&lt;span&gt;Username&lt;/span&gt; &lt;input type="text" name="uname" /&gt;&lt;/div&gt;
&lt;div class="holder"&gt;&lt;span&gt;Password&lt;/span&gt; &lt;input type="text" name="pword" /&gt;&lt;/div&gt;
&lt;div class="holder btn"&gt;&lt;input type="submit" name="signin" value="Sign In" /&gt;&lt;/div&gt;&lt;/fieldset&gt;
&lt;/form&gt;&lt;/div&gt;
</pre>
<p><img class="alignleft size-full wp-image-617" title="twitter-stage-1" src="http://www.robert-lawson.co.uk/wp-content/uploads/2011/04/twitter-stage-1.jpg" alt="twitter-stage-1" width="460" height="300" /></p>
<p>After this I added some basic form styling and a blue background to get that twitter feel.</p>
<pre class="qoate-code">
.login {
background-color:#53718b;
padding:50px;
text-align:center;
}

form#twitter {
width:400px;
margin:0 auto;
}

.holder {
float:left;
width:160px;
position:relative;
}

.holder.btn {
width:70px;
}

.holder span{
position:absolute;
font-size:10px;
color:#86888b;
left:15px;
top:6px;
text-shadow:1px 1px #fff;
}
</pre>
<p><img class="alignleft size-full wp-image-621" title="twitter-stage-2" src="http://www.robert-lawson.co.uk/wp-content/uploads/2011/04/twitter-stage-2.jpg" alt="twitter-stage-2" width="460" height="300" /></p>
<p>After this I began to use some CSS3 effects to spice up the input boxes, Gradients, Box Shadow, Text-Shadow and Border Radius, yep there all here.</p>
<pre class="qoate-code">
form#twitter input[type=text] {
padding:8px 6px;
font-size:10px;
color:#5f6061;

text-shadow:1px 1px #fff;

-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px; /* future proofing */

-khtml-border-radius: 3px; /* for old Konqueror browsers */
border:0 none;

-moz-box-shadow:inset 0 1px 0 #3c556a, inset 0 -1px 0 #e4eaef;
-webkit-box-shadow:inset 0 1px 0 #3c556a, inset 0 -1px 0 #e4eaef;
box-shadow:inset 0 1px 0 #3c556a, inset 0 -1px 0 #e4eaef;

background-color:#d4dee5;

width:140px;
}

form#twitter input[type=submit] {
padding:6px;

font-weight:bold;

text-shadow:1px 1px #fff;

-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border-radius: 5px; /* future proofing */
-khtml-border-radius: 5px; /* for old Konqueror browsers */

border:0 none;

-moz-box-shadow:inset 0 -1px 0 #5f666c;
-webkit-box-shadow:inset 0 -1px 0 #5f666c;
box-shadow:inset 0 -1px 0 #5f666c;

/* Firefox 3.6+ */
background-image: -moz-linear-gradient(#fff, #d1d4d6);

/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#d1d4d6), to(#fff));

/* Safari 5.1+, Chrome 10+ */
background-image: -webkit-linear-gradient(#fff, #d1d4d6);

/* Opera 11.10+ */
background-image: -o-linear-gradient(#fff, #d1d4d6);

background-color:#fff;

cursor:pointer;

}
</pre>
<p><img class="alignleft size-full wp-image-624" title="twitter-stage-3" src="http://www.robert-lawson.co.uk/wp-content/uploads/2011/04/twitter-stage-3.jpg" alt="twitter-stage-3" width="460" height="300" /></p>
<p>Next step was to add the &#8216;hover&#8217; and &#8216;focus&#8217; states for the input elements. The focus state now have 3 variations of the box shadow effect, 2 insets, top and bottom and one large outer glow.</p>
<pre class="qoate-code">
form#twitter input[type=text]:hover {
background-color:#dce4ea;
}

form#twitter input[type=text]:focus {
color:#5f6061;
background-color:#ecf1f4;

-moz-box-shadow:inset 0 1px 0 #7394b0, inset 0 -1px 0 #fff, 0 0 8px #fff;
-webkit-box-shadow:inset 0 1px 0 #7394b0, inset 0 -1px 0 #fff, 0 0 8px #fff;
box-shadow:inset 0 1px 0 #7394b0, inset 0 -1px 0 #fff, 0 0 8px #fff;
}
</pre>
<p>I also added some &#8216;hover&#8217; and &#8216;active&#8217; states on the submit button.</p>
<pre class="qoate-code">
form#twitter input[type=submit]:hover {
/* Firefox 3.6+ */
background-image: -moz-linear-gradient(#e7eaec, #d1d4d6);

/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#d1d4d6), to(#e7eaec));

/* Safari 5.1+, Chrome 10+ */
background-image: -webkit-linear-gradient(#e7eaec, #d1d4d6);

/* Opera 11.10+ */
background-image: -o-linear-gradient(#e7eaec, #d1d4d6);

}

form#twitter input[type=submit]:active {
/* Firefox 3.6+ */
background-image: -moz-linear-gradient(#d1d4d6, #fff);

/* Safari 4+, Chrome 1+ */
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#d1d4d6));

/* Safari 5.1+, Chrome 10+ */
background-image: -webkit-linear-gradient(#d1d4d6, #fff);

/* Opera 11.10+ */
background-image: -o-linear-gradient(#d1d4d6, #fff);
}
</pre>
<p><img class="alignleft size-full wp-image-625" title="twitter-stage-4" src="http://www.robert-lawson.co.uk/wp-content/uploads/2011/04/twitter-stage-4.jpg" alt="twitter-stage-4" width="460" height="300" /></p>
<p>That is the main styling done, the last piece is to add the transition effect that twitter has for when a user begins to type data into the input boxes. For this I call upon a simple jQuery snippet to check to see if the user is typing data.</p>
<pre class="qoate-code">
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"&gt;&lt;/script&gt;

&lt;script type="text/javascript"&gt;// &lt;![CDATA[

	$('.holder input').keypress(function() {
  		$(this).parent().addClass('hassome')
	});

// ]]&gt;&lt;/script&gt;
</pre>
<p>What this is doing is targeting the input boxes and using the listener &#8216;keypress&#8217; to detect if a user is using the input box. If so then the class &#8216;hassome&#8217; is being added to the parent element which then has this styling.</p>
<pre class="qoate-code">
.holder.hassome span{
font-size:0px;
opacity: 0;
/* Firefox */
-moz-transition: font-size 0.5s 0.1s, opacity 0s 0s;
/* WebKit */
-webkit-transition: font-size 0.5s 0.1s, opacity 0s 0s;
/* Opera */
-o-transition: font-size 0.5s 0.1s, opacity 0s 0s;
/* Standard */
transition: font-size 0.5s 0.1s, opacity 0s 0s;
}
</pre>
<p>So to make the text fade out I am using the CSS3 property &#8216;transition&#8217; to change the font-size property to 0px over a duration of 0.5s and also changing the opacity down to 0.</p>
<p>See a <a href="http://www.robert-lawson.co.uk/demos/twitter" target="_blank">demo</a> of the finished product.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robert-lawson.co.uk/twitter-form-css3-jquery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The difference a week can make for SEO</title>
		<link>http://www.robert-lawson.co.uk/the-difference-a-week-can-makefor-seo/</link>
		<comments>http://www.robert-lawson.co.uk/the-difference-a-week-can-makefor-seo/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 12:33:07 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.robert-lawson.co.uk/?p=595</guid>
		<description><![CDATA[This revised version of my site has been up for less than a week now and already seems to have shot up the Google rankings for various keyword searches. I had been using the All In One SEO pack before but decided to switch to Yoast as it offers alot more options and control on [...]]]></description>
			<content:encoded><![CDATA[<p>This revised version of my site has been up for less than a week now and already seems to have shot up the Google rankings for various keyword searches. I had been using the <a title="all in one" href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;cd=1&amp;ved=0CB8QFjAA&amp;url=http%3A%2F%2Fwordpress.org%2Fextend%2Fplugins%2Fall-in-one-seo-pack%2F&amp;rct=j&amp;q=all%20in%20one%20wordpress&amp;ei=OICtTf6RJIqw8gOZt5nzAQ&amp;usg=AFQjCNEO3o9HGinjlPNJaI6ghTEC5YE5ZQ&amp;sig2=ynKwjZKDUpcyqY3y6dDG8g&amp;cad=rja" target="_blank">All In One SEO pack</a> before but decided to switch to <a title="yoast" href="http://www.google.co.uk/url?sa=t&amp;source=web&amp;cd=2&amp;ved=0CCoQFjAB&amp;url=http%3A%2F%2Fwordpress.org%2Fextend%2Fplugins%2Fwordpress-seo%2F&amp;rct=j&amp;q=yoast%20wordpress&amp;ei=IICtTYW8NIyv8QPl073yAQ&amp;usg=AFQjCNEV2rzmYGeTzocfPA4ux307_MGBUw&amp;sig2=XQYuFEVK_VMnj8neh_ei5Q&amp;cad=rja" target="_blank">Yoast</a> as it offers alot more options and control on individual posts/categories than All In One, Yoast also comes with built in XML sitemap generator and a breadcrumb module as standard.</p>
<p>Anyone looking for another option I would recommend it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robert-lawson.co.uk/the-difference-a-week-can-makefor-seo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New website</title>
		<link>http://www.robert-lawson.co.uk/new-website/</link>
		<comments>http://www.robert-lawson.co.uk/new-website/#comments</comments>
		<pubDate>Thu, 14 Apr 2011 15:27:03 +0000</pubDate>
		<dc:creator>robert</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.robert-lawson.co.uk/?p=514</guid>
		<description><![CDATA[Hello, welcome to my new blog, hopefully this site will remain active this time and be kept up to date with all sorts of ramblings. It is still very much a work in progress so keep checking back!]]></description>
			<content:encoded><![CDATA[<p>Hello, welcome to my new blog, hopefully this site will remain active this time and be kept up to date with all sorts of ramblings. It is still very much a work in progress so keep checking back!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robert-lawson.co.uk/new-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

