<?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>James Tombs &#187; Development</title>
	<atom:link href="http://jamestombs.co.uk/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://jamestombs.co.uk</link>
	<description>Development blog from James Tombs about PHP, XHTML + CSS and Drupal</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:15:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Creating a grid of images for an album in Drupal 6 with pagination</title>
		<link>http://jamestombs.co.uk/2010-03-10/creating-a-grid-of-images-for-an-album-in-drupal-6-with-pagination/1106</link>
		<comments>http://jamestombs.co.uk/2010-03-10/creating-a-grid-of-images-for-an-album-in-drupal-6-with-pagination/1106#comments</comments>
		<pubDate>Wed, 10 Mar 2010 13:12:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1106</guid>
		<description><![CDATA[Following on from the original tutorial on creating a grid of images for an album in Drupal 6, a few people asked how to add pagination on to this for large albums.
Unfortunately from what I can tell Drupal&#8217;s pagination function only works with SQL queries so we are unable to use the existing data available [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from the original tutorial on <a href="http://jamestombs.co.uk/2009-06-25/creating-a-grid-of-images-for-an-album-in-drupal/1046">creating a grid of images for an album in Drupal 6</a>, a few people asked how to add pagination on to this for large albums.</p>
<p>Unfortunately from what I can tell Drupal&#8217;s pagination function only works with SQL queries so we are unable to use the existing data available in the node object.  But due to Drupal&#8217;s nice database schema, it is very simple to write some simple SQL to give us the pager.</p>
<p>Below is the full code and below the code I will explain what each part does.</p>
<pre class="brush: php">&lt;?php
$count = count($node-&gt;field_images);
if ($count &gt; 0):
	$images_per_page = 9;
	$sql = &quot;SELECT f.fid, i.field_images_data, f.filepath FROM content_field_images i JOIN files f ON f.fid = i.field_images_fid WHERE nid = &quot;. $node-&gt;nid;
	$count = &quot;SELECT COUNT(f.fid) FROM content_field_images i JOIN files f ON f.fid = i.field_images_fid WHERE nid = &quot;. $node-&gt;nid;
	$query = pager_query($sql, $images_per_page, 0, $count);
	while ($data = db_fetch_object($query)) {
		$images[$data-&gt;fid] = array(
			&#039;filepath&#039; =&gt; $data-&gt;filepath,
			&#039;data&#039; =&gt; unserialize($data-&gt;field_images_data),
		);
	}
	$rows = array();
	$images_per_row = 3;
	$i = 0;
	$row = 0;
	foreach ($images as $image) {
		$rows[$row][$i] = &#039;&lt;a class=&quot;gallery-thumbs&quot; title=&quot;&#039;. htmlspecialchars($image[&#039;data&#039;][&#039;description&#039;]) .&#039;&quot; rel=&quot;lightbox[photo_gallery-&#039;. $node-&gt;nid .&#039;]&quot; href=&quot;&#039;. imagecache_create_url(&#039;lightbox&#039;, $image[&#039;filepath&#039;]) .&#039;&quot;&gt;&#039;. theme(&#039;imagecache&#039;, &#039;thumbnail&#039;, $image[&#039;filepath&#039;], $image[&#039;data&#039;][&#039;title&#039;], $image[&#039;data&#039;][&#039;title&#039;]) .(trim($image[&#039;data&#039;][&#039;description&#039;]) != &#039;&#039; ? &#039;&lt;br /&gt;&lt;small&gt;&#039;. $image[&#039;data&#039;][&#039;description&#039;] .&#039;&lt;/small&gt;&lt;/a&gt;&#039; : &#039;&#039;);
		$i++;
		if ($i == $images_per_row) {
			$row++;
			$i = 0;
		}
	}
	?&gt;
  &lt;table class=&quot;views-view-grid&quot;&gt;
    &lt;tbody&gt;
      &lt;?php foreach ($rows as $row_number =&gt; $columns): ?&gt;
        &lt;?php
          $row_class = &#039;row-&#039; . ($row_number + 1);
          if ($row_number == 0) {
            $row_class .= &#039; row-first&#039;;
          }
          elseif (count($rows) == ($row_number + 1)) {
            $row_class .= &#039; row-last&#039;;
          }
        ?&gt;
        &lt;tr class=&quot;&lt;?php print $row_class; ?&gt;&quot;&gt;
          &lt;?php foreach ($columns as $column_number =&gt; $item): ?&gt;
            &lt;td class=&quot;&lt;?php print &#039;col-&#039;. ($column_number + 1); ?&gt;&quot;&gt;
              &lt;?php print $item; ?&gt;
            &lt;/td&gt;
          &lt;?php endforeach; ?&gt;
        &lt;/tr&gt;
      &lt;?php endforeach; ?&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;?php print theme(&#039;pager&#039;, array(), $images_per_page, 0); ?&gt;
&lt;?php else: ?&gt;
  &lt;p&gt;No images in album&lt;/p&gt;
&lt;?php endif; ?&gt;</pre>
<p>First thing we do is check to see if there are any images.  Rather than doing a SQL query to get the result, I have chosen to use the already existing array of images in the node object.</p>
<pre class="brush: php">$count = count($node-&gt;field_images);</pre>
<p>Then as before we check to make sure we have images, then create our query to generate the pager.</p>
<pre class="brush: php">$images_per_page = 9;
	$sql = &quot;SELECT f.fid, i.field_images_data, f.filepath FROM content_field_images i JOIN files f ON f.fid = i.field_images_fid WHERE nid = &quot;. $node-&gt;nid;
	$count = &quot;SELECT COUNT(f.fid) FROM content_field_images i JOIN files f ON f.fid = i.field_images_fid WHERE nid = &quot;. $node-&gt;nid;
	$query = pager_query($sql, $images_per_page, 0, $count);
	while ($data = db_fetch_object($query)) {
		$images[$data-&gt;fid] = array(
			&#039;filepath&#039; =&gt; $data-&gt;filepath,
			&#039;data&#039; =&gt; unserialize($data-&gt;field_images_data),
		);
	}</pre>
<p>In the query, we are gathering the file id (fid) of each individual image, the field_images_data which is a serializd array of the title, description and alt text of the image from when it was uploaded and the filepath of the image.  The count isn&#8217;t necessarily needed, but I have found the pager can act oddly when the $count part of <em>pager_query()</em> is missing.</p>
<p><em>pager_query()</em> also requires 2 other elements. The first after $sql, is the amount of rows to be taken out the database.  The next number is the element number.  This is needed for pages with multiple pagers on them.  If you have got multiple pagers and experience trouble then you will need to change this.</p>
<p>Then from this we recreate the $images array that we had before, although it is missing some information which is provided through the $node object, it provides everything that we need to display the image on the page.</p>
<p>The whole table HTML section remains untouched, but it is followed by an extra line:</p>
<pre class="brush: php">&lt;?php print theme(&#039;pager&#039;, array(), $images_per_page, 0); ?&gt;</pre>
<p>This prints out the Drupal pager below out table of images.  This can be used multiple times on a page, so you can have some pagination below and above the table of images.</p>
<p>If the page you are displaying the albums on already has pagers, you may need to change the 0 in both the <em>theme_pager()</em> and <em>pager_query()</em>.</p>
<p>You should now have a fully working grid with pagination.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-03-10/creating-a-grid-of-images-for-an-album-in-drupal-6-with-pagination/1106/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Create a cartoon style cloud in Photoshop</title>
		<link>http://jamestombs.co.uk/2010-01-27/create-a-cartoon-style-cloud-in-photoshop/1095</link>
		<comments>http://jamestombs.co.uk/2010-01-27/create-a-cartoon-style-cloud-in-photoshop/1095#comments</comments>
		<pubDate>Tue, 26 Jan 2010 23:39:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1095</guid>
		<description><![CDATA[This tutorial will teach you how to make a basic cartoon cloud in Photoshop. The tutorial should be suitable for beginners.

The result

Tutorial
Step 1: Create new document
Open Photoshop and create a new document at whatever size you wish, I will be creating mine at 400&#215;240.
Step 2: Set the background colour
Set your foreground colour to #b7e0ff and [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial will teach you how to make a basic cartoon cloud in Photoshop. The tutorial should be suitable for beginners.</p>
<p><span id="more-1095"></span></p>
<h2>The result</h2>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/cloud_result.jpg" rel="shadowbox[post-1095];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/cloud_result-300x180.jpg" alt="" title="Finished Cloud" width="300" height="180" class="alignnone size-medium wp-image-1096" /></a></p>
<h2>Tutorial</h2>
<h3>Step 1: Create new document</h3>
<p>Open Photoshop and create a new document at whatever size you wish, I will be creating mine at 400&#215;240.</p>
<h3>Step 2: Set the background colour</h3>
<p>Set your foreground colour to #b7e0ff and fill the background by either pressing Alt + Backspace or going to Edit > Fill (Shift + F5) and selecting the foreground colour.</p>
<h3>Step 3: Create the cloud shape</h3>
<p>Select the elliptical marquee tool and draw multiple circles on the canvas, creating the shape of the cloud.  To add to the initial selection, hold Shift while drawing the additional circles.</p>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/shape.jpg" rel="shadowbox[post-1095];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/shape-300x180.jpg" alt="" title="Cloud shape" width="300" height="180" class="alignnone size-medium wp-image-1100" /></a></p>
<p>Create a new layer and fill the cloud selection with #79b4e0. With the selection still active, create another layer and fill with #cde9ff.  Move this layer up 3 or 4 pixels.</p>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/double-layer.jpg" rel="shadowbox[post-1095];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/double-layer-300x180.jpg" alt="" title="Colour" width="300" height="180" class="alignnone size-medium wp-image-1097" /></a></p>
<h3>Step 4: Add some additional depth to the cloud</h3>
<p>With the selection still active, create another layer. This time select the gradient tool and set the foreground colour to white. Then for your gradient settings, set the gradient to go from foreground to transparent.</p>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/gradient.jpg" rel="shadowbox[post-1095];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/gradient.jpg" alt="" title="Select gradient" width="267" height="182" class="alignnone size-full wp-image-1098" /></a></p>
<p>Go to Select -> Modify -> Contract and set to 2 or 3px, press OK.</p>
<p>Now draw a gradient from just above the top of your cloud shape to the bottom of the cloud shape.</p>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/gradient_draw.jpg" rel="shadowbox[post-1095];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/gradient_draw-300x180.jpg" alt="" title="Draw gradient" width="300" height="180" class="alignnone size-medium wp-image-1099" /></a></p>
<p>You cloud is now complete.</p>
<h2>Result</h2>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/cloud_result.jpg" rel="shadowbox[post-1095];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/cloud_result-300x180.jpg" alt="" title="Finished Cloud" width="300" height="180" class="alignnone size-medium wp-image-1096" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-01-27/create-a-cartoon-style-cloud-in-photoshop/1095/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a basic layout using HTML &amp; CSS</title>
		<link>http://jamestombs.co.uk/2010-01-26/create-a-basic-layout-using-html-css/1086</link>
		<comments>http://jamestombs.co.uk/2010-01-26/create-a-basic-layout-using-html-css/1086#comments</comments>
		<pubDate>Tue, 26 Jan 2010 17:03:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1086</guid>
		<description><![CDATA[Following on from the Guide to classes and ids in HTML and CSS, we will create this basic 2 column layout.

Before we delve in to HTML and CSS, you need to understand the basic structure of the page to know how to write your HTML.  To do this, on paper or Photoshop draw out [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from the <a href="http://jamestombs.co.uk/2010-01-26/guide-to-classes-and-ids-in-html-css/1085">Guide to classes and ids in HTML and CSS</a>, we will create this basic 2 column layout.</p>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/main.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/main-300x207.jpg" alt="" title="2 Column Layout" width="300" height="207" class="alignnone size-medium wp-image-1092" /></a></p>
<p>Before we delve in to HTML and CSS, you need to understand the basic structure of the page to know how to write your HTML.  To do this, on paper or <a href="http://www.amazon.co.uk/Adobe-Photoshop-Elements-PC-DVD/dp/B002OB5G6G/ref=sr_1_1?ie=UTF8&#038;s=software&#038;qid=1264522453&#038;sr=1-1">Photoshop</a> draw out the basic layout.</p>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/layout.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/layout-300x207.jpg" alt="" title="Wireframe" width="300" height="207" class="alignnone size-medium wp-image-1093" /></a></p>
<p>With the basic wireframe of the site you can now write out the basic HTML.</p>
<pre class="brush: html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
&lt;head&gt;
  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
  &lt;title&gt;2 Column Layout&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div id=&quot;wrap&quot;&gt;
    &lt;div id=&quot;header&quot;&gt;
    	&lt;h1&gt;Site name&lt;/h1&gt;
    &lt;/div&gt;
    &lt;div id=&quot;navigation&quot;&gt;
      &lt;ul&gt;
      	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Link&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div id=&quot;content_area&quot;&gt;
      &lt;div id=&quot;content&quot;&gt;
        &lt;h2&gt;Heading&lt;/h2&gt;
        &lt;p&gt;Mauris sit amet lectus at sem fringilla tincidunt. Phasellus ornare mollis egestas. Donec a sapien metus, sit amet faucibus dolor. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Nunc nec tortor nec velit dapibus elementum. Fusce blandit accumsan sagittis. Suspendisse sodales gravida risus rutrum facilisis. Vestibulum at velit id arcu egestas condimentum. Aenean laoreet leo sit amet eros eleifend pretium condimentum ac arcu. Vestibulum volutpat hendrerit urna, sit amet laoreet eros volutpat et.&lt;/p&gt;
      &lt;/div&gt;
      &lt;div id=&quot;sidebar&quot;&gt;
        &lt;div class=&quot;block&quot;&gt;
          &lt;h3&gt;Block header&lt;/h3&gt;
          &lt;ul&gt;
            &lt;li&gt;Item 1&lt;/li&gt;
            &lt;li&gt;Item 2&lt;/li&gt;
            &lt;li&gt;Item 3&lt;/li&gt;
            &lt;li&gt;Item 4&lt;/li&gt;
            &lt;li&gt;Item 5&lt;/li&gt;
            &lt;li&gt;Item 6&lt;/li&gt;
            &lt;li&gt;Item 7&lt;/li&gt;
            &lt;li&gt;Item 8&lt;/li&gt;
            &lt;li&gt;Item 9&lt;/li&gt;
            &lt;li&gt;Item 10&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div id=&quot;footer&quot;&gt;
    	&lt;p&gt;Copyright somerandomsite 2010&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>This gives the bare markup needed for the layout.</p>
<p>For the CSS we will go through each separate HTML element.</p>
<h3>Wrapper</h3>
<p>We start the document off with a div with an id of wrap.  This gives us a container that we can set a width to as we can&#8217;t set a width to the body tag.</p>
<pre class="brush: css">#wrap {
  width: 980px;
  margin: 0 auto;
}</pre>
<p>This sets the width of the container to 980px. Setting the margin to <em>0 auto</em> means that the top and bottom margins are set to 0 and the left and right margins are set to automatically generate.  The browser will then set the left and right margins to be the same which results in the container being centered in the body.</p>
<h3>Header</h3>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_header.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_header-300x207.jpg" alt="" title="Header" width="300" height="207" class="alignnone size-medium wp-image-1089" /></a></p>
<p>For the header, we will need to style the header div itself as well as the h1 tag inside it.</p>
<pre class="brush: css">#header { background: #c00; }
#header h1 {
  color: #fff;
  margin: 0;
  padding: 30px 10px 10px 30px;
  font-size: 6em;
  font-weight: normal;
}</pre>
<p>With this CSS we are making the background color of the div with id header to #c00 which is a dark red.  As divs are block level elements it will automatically fill the width of it&#8217;s parent which is our div with the id wrap. So we have a div with a red background which is 980px wide.</p>
<p>Within our header div we have an h1 tag.  For this we change it to white by using <em>color: #fff</em>. We then remove any margins on the h1 tag which are applied automatically by the browser then set some padding around the text so that it doesn&#8217;t touch the edge of the div.  To make it stand out we make the font-size 6x bigger than the standard font-size of the page which you can specify in the body CSS, and make the font-weight normal rather than bold.</p>
<h3>Navigation bar</h3>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_navigation.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_navigation-300x207.jpg" alt="" title="Navigation Bar" width="300" height="207" class="alignnone size-medium wp-image-1090" /></a></p>
<p>The navigation bar is made from an unordered list which allows internet robots (search engines) and screen readers (browsers for blind/hard of sight users) to navigate the site properly.  You could make it using a p tag with spaces between the links but that wouldn&#8217;t be good for accessibility or SEO.</p>
<pre class="brush: css">#navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
  float: left;
  background: #00c;
  width: 100%;
}
#navigation ul li {
  float: left;
  width: auto;
}
#navigation ul li a {
  display: block;
  padding: 10px 20px;
  color: #fff;
  text-decoration: none;
  font-size: 1.4em;
  font-weight: bold;
}
#navigation ul li a:hover {
  color: #00c;
  background: #fff;
}</pre>
<p>The first thing we do is to reset the default styling given to unordered lists (the bullet points etc) by resetting the margin, padding and list-style (bullet points). Then we float the whole list to the left so that the ul element takes the height of the children list elements.  We also set the background colour and set the width to 100% so that it takes the whole width of the container, otherwise the background colour would stop after the last list element.</p>
<p>Each list element within the unordered list is floated to the left so they all line up next to each other.  We also define the width as <em>auto</em>, if you don&#8217;t do this the CSS validator will mark your code as invalid CSS.</p>
<p>Each anchor tag with in the list is giving some padding to give space to each link.  We have to define the display of each anchor tag as block so that we can apply vertical padding to each link, this also allows better hover styling as the cursor doesn&#8217;t have to be on the text and can be anywhere within the padded area.  As well as the padding the colour is changed to make the text contrast the background and we remove the default text-decoration of anchor tags which is the underline by setting it to none. I also made the font slightly bigger and bold.</p>
<p>As well as the default state of the anchor tags, we can also define the hover attribute using a pseudo class called :hover.  When the user hovers their mouse over the HTML element defined by the selector the browser will pick up on these CSS changes and will be reverted as soon as the mouse stops hovering over the element.  Here we are just changing the colour and background so that the user can see that it has a click-able action.</p>
<h3>Content area</h3>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_content_area.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_content_area-300x207.jpg" alt="" title="Content Area" width="300" height="207" class="alignnone size-medium wp-image-1094" /></a></p>
<p>Our content area div is a minor container div to enclose the main content and sidebar. You don&#8217;t have to use this, but it makes it a lot easier to style and line up elements in all the browsers.</p>
<pre class="brush: css">#content_area {
  clear: both;
  padding-top: 10px;
}</pre>
<p>The clear attribute makes sure that any floating elements are cleared, so essentially the div will appear on the next free line below any floating elements and allows us to put some padding between the navigation and our content.  With out the clear attribute, the padding would have no effect.</p>
<h3>Content</h3>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_content.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_content-300x207.jpg" alt="" title="Content" width="300" height="207" class="alignnone size-medium wp-image-1087" /></a></p>
<pre class="brush: css">#content {
  float: left;
  width: 75%;
}
#content h2, #content p {
  padding: 0 10px 0 20px;
}
#content h2 {
  font-size: 3.0em;
  margin: 0;
}
#content p {
  font-size: 1.2em;
}</pre>
<p>The first thing we do is set the width of our content div and float it to the left, this allows the sidebar to go along side it.</p>
<p>We also apply some standard CSS rules to add padding and change the font size of elements within the content div.</p>
<h3>Sidebar</h3>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_sidebar.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_sidebar-300x207.jpg" alt="" title="Sidebar" width="300" height="207" class="alignnone size-medium wp-image-1091" /></a></p>
<pre class="brush: css">#sidebar {
  margin-left: 75%;
}
#sidebar h3 {
  font-size: 1.6em;
  margin: 0;
}
#sidebar li {
  font-size: 1.2em;
}
.block {
  border: 1px solid #000;
  padding: 10px;
  margin: 5px;
}</pre>
<p>To get the sidebar to move up to the right of the content we need to make sure that it isn&#8217;t trying to display on top or behind it.  To do this, we apply a left margin to the sidebar, the left margin should be the same or bigger (if you want to include a space between your sidebar and content) than your content width. You can also do this by setting the width and floating it to the left or right, but this can cause complications especially when you have more than 2 columns.</p>
<p>As with the content we apply some basic styling to the elements within the sidebar.</p>
<h3>Footer</h3>
<p><a href="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_footer.jpg" rel="shadowbox[post-1086];player=img;"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/highlight_footer-300x207.jpg" alt="" title="Footer" width="300" height="207" class="alignnone size-medium wp-image-1088" /></a></p>
<pre class="brush: css">#footer {
  clear: both;
  background: #aaa;
}
#footer p {
  padding: 10px 20px;
  color: #fff;
  font-size: 1.3em;
}</pre>
<p>Much like the content area we need to clear any floating elements above it.  I have also change the background colour to a light grey.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-01-26/create-a-basic-layout-using-html-css/1086/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guide to classes and id&#8217;s in HTML &amp; CSS</title>
		<link>http://jamestombs.co.uk/2010-01-26/guide-to-classes-and-ids-in-html-css/1085</link>
		<comments>http://jamestombs.co.uk/2010-01-26/guide-to-classes-and-ids-in-html-css/1085#comments</comments>
		<pubDate>Tue, 26 Jan 2010 16:09:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1085</guid>
		<description><![CDATA[Classes
A class can be applied to any HTML element to allow you to easily target it using CSS to add styling and change the way it is presented to the user.  In CSS classes are selected using a full stop followed by the name of the class.

HTML
&#60;div class=&#34;classname&#34;&#62;
  &#60;p&#62;This is some text in [...]]]></description>
			<content:encoded><![CDATA[<h2>Classes</h2>
<p>A class can be applied to any HTML element to allow you to easily target it using CSS to add styling and change the way it is presented to the user.  In CSS classes are selected using a full stop followed by the name of the class.<br />
<span id="more-1085"></span></p>
<h3>HTML</h3>
<pre class="brush: html">&lt;div class=&quot;classname&quot;&gt;
  &lt;p&gt;This is some text in a paragraph tag.&lt;/p&gt;
&lt;/div&gt;</pre>
<h3>CSS</h3>
<pre class="brush: css">p { font-size: 12px; }
.classname { border: 1px solid #ddd; }
.classname p { font-size: 14px; }</pre>
<p>This would display like this:</p>
<div style="border: 1px solid #ddd;">
<p style="font-size: 14px;">This is some text in a paragraph tag.</p>
</div>
<p>The original <em>p</em> selector in the CSS is overwritten by <em>.classname p</em>, so the font size of any <em>p</em> tag within a parent with a class of <em>classname</em> will be 14px.</p>
<p>If you were to have two paragraph tags within the div but wanted them styled slightly differently, then you could add a class to one of the paragraph tags.</p>
<h3>HTML</h3>
<pre class="brush: html">&lt;div class=&quot;classname&quot;&gt;
  &lt;p class=&quot;large&quot;&gt;This is slightly larger text.&lt;/p&gt;
  &lt;p&gt;This is some text in a paragraph tag.&lt;/p&gt;
&lt;/div&gt;</pre>
<h3>CSS</h3>
<pre class="brush: css">p { font-size: 12px; }
.classname { border: 1px solid #ddd; }
.classname p.large { font-size: 14px; }</pre>
<div style="border: 1px solid #ddd;">
<p style="font-size: 14px;">This is slightly larger text.</p>
<p>This is some text in a paragraph tag.</p>
</div>
<p>As you can see the first paragraph is larger than the second paragraph.  This is because the second paragraph is picking up the default font-size that we specified in the CSS file.  The first paragraph is using a larger font size due to the CSS rule <em>.classname p.large</em>.</p>
<p>Classes can be reused as many times as you like in an HTML document. If you have a constant style that you wish to apply on elements through the page, you can create a single CSS class and reuse it.</p>
<h2>Id&#8217;s</h2>
<p>Id&#8217;s can be styled in much the same way a class can, but rather than using a full stop as a selector, we use the hash tag (#).  Unlike CSS classes though, an Id can only be used <strong>once</strong> per page. The benefit of using Id&#8217;s is that you can link to them with anchor tags.</p>
<h3>HTML</h3>
<pre class="brush: html">&lt;div id=&quot;tut_header&quot;&gt;&lt;p&gt;Site name&lt;/p&gt;&lt;/div&gt;
&lt;!-- Insert random HTML --&gt;
&lt;p&gt;&lt;a href=&quot;#tut_header&quot;&gt;Back to header&lt;/a&gt;&lt;/p&gt;</pre>
<p>So if you had a long page of content, clicking the link will make the page move up so that the div with the id tut_header will be the top most point. Using ids can be useful for creating &#8216;Back to Top&#8217; buttons.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-01-26/guide-to-classes-and-ids-in-html-css/1085/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Open source intranet solution &#8211; Open Atrium</title>
		<link>http://jamestombs.co.uk/2010-01-13/open-source-intranet-solution-open-atrium/1084</link>
		<comments>http://jamestombs.co.uk/2010-01-13/open-source-intranet-solution-open-atrium/1084#comments</comments>
		<pubDate>Wed, 13 Jan 2010 21:15:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1084</guid>
		<description><![CDATA[Open Atrium is an open source intranet package that uses Drupal as it&#8217;s underlying framework.
As Open Atrium is a Drupal installation profile, it runs using PHP and MySQL, which means other than hardware cost it is free to get started and run. It features a few familar modules to any Drupal user such as Views [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://openatrium.com/">Open Atrium</a> is an open source intranet package that uses Drupal as it&#8217;s underlying framework.</p>
<p>As <a href="http://openatrium.com/">Open Atrium</a> is a <a href="http://drupal.org">Drupal</a> installation profile, it runs using PHP and MySQL, which means other than hardware cost it is free to get started and run. It features a few familar modules to any <a href="http://drupal.org">Drupal</a> user such as <a href="http://drupal.org/project/views">Views</a> and <a href="http://drupal.org/project/og">Organic Groups</a> but also introduces some lesser known modules such as <a href="http://drupal.org/project/features">Features</a> and <a href="http://drupal.org/project/spaces">Spaces</a>.</p>
<p>It is currently in beta and is currently at beta 3.2 which can be downloaded the from <a href="http://openatrium.com/download">Open Atrium</a> website.</p>
<p>You can install it like you would any <a href="http://drupal.org/">Drupal</a> installation, but during installation you are given the choice to install Drupal standalone or <a href="http://drupal.org/">Drupal</a> with <a href="http://openatrium.com/">Open Atrium&#8217;s</a> modules and configuration preinstalled.</p>
<p>Features include a blog for updates, a calendar for events, documents which uses the books module to produce a hierachial display of all the documents you want to store, a shoutbox and a case tracker which is ideal for development teams.  Each feature can be turned on or off within each organic group which means you can easily divide internal teams in to different groups to keep the intranet a bit tidier than it would if it was all in one place.</p>
<p><object width="400" height="225"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=5579829&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=5579829&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="225"></embed></object>
<p><a href="http://vimeo.com/5579829">Introducing Open Atrium</a> from <a href="http://vimeo.com/developmentseed">Development Seed</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-01-13/open-source-intranet-solution-open-atrium/1084/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a Drupal 6 theme based on the Zen starter theme</title>
		<link>http://jamestombs.co.uk/2010-01-11/create-a-drupal-6-theme-based-on-the-zen-starter-theme/1083</link>
		<comments>http://jamestombs.co.uk/2010-01-11/create-a-drupal-6-theme-based-on-the-zen-starter-theme/1083#comments</comments>
		<pubDate>Mon, 11 Jan 2010 21:08:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1083</guid>
		<description><![CDATA[What is Zen?
Taken from the Zen project page:
Zen is the ultimate starting theme for Drupal. If you are building your own standards-compliant theme, you will find it much easier to start with Zen than to start with Garland or Bluemarine. This theme has fantastic online documentation and tons of code comments for both the PHP [...]]]></description>
			<content:encoded><![CDATA[<h3>What is Zen?</h3>
<p>Taken from the <a href="http://drupal.org/project/zen">Zen project page</a>:</p>
<blockquote><p><strong>Zen is the ultimate <em>starting theme</em> for Drupal.</strong> If you are building your own standards-compliant theme, you will find it much easier to start with Zen than to start with Garland or Bluemarine. This theme has <a href="http://drupal.org/node/193318">fantastic online documentation</a> and tons of code comments for both the PHP (template.php) and HTML (page.tpl.php, node.tpl.php).</p>
</blockquote>
<h3>Why use Zen?</h3>
<p>Zen gives a great framework for you to work from as a lot of the hard work in making the default Drupal CSS rules easier to customise as well as having a starter kit for you to modify giving you the basics to create your own theme without needed to mess around with the in&#8217;s and out&#8217;s of Drupals theming system.<br />
<span id="more-1083"></span></p>
<h3>Where do I get Zen?</h3>
<p>You can download Zen from the project page on <a href="http://drupal.org/project/zen">Drupal.org</a>. As of writing there are 2 versions available for Drupal 6; Zen 6.x-1.1 and Zen 6.x-2.0-beta1.  We will be using Zen 6.x-1.1 as it isn&#8217;t a good idea to use modules or themes that are in alpha, beta or RC on a production site.</p>
<h3>How do I install Zen?</h3>
<p>Once you have downloaded the file from Drupal.org you will need to extract the zen folder and place it in your /sites/all/themes directory.  You will need to create a directory called themes within the /sites/all directory if it doesn&#8217;t already exist. </p>
<p>If you need a program to extract the file from Drupal.org, I recommend you use <a href="http://www.7-zip.org/download.html">7-zip</a> which is a freeware application.</p>
<h3>How do I start using Zen?</h3>
<p>Within the Zen directory is a directory called STARTERKIT.  Copy this folder and return to the /sites/all/themes directory.  Paste the STARTERKIT directory from your clipboard into this directory. You should have a tree structure like the below:</p>
<pre>+ sites
|-+ all
| |-+ themes
| | |-- zen
| | |-- STARTERKIT</pre>
<p>Rename the STARTERKIT directory to the name you wish to give your theme.  This is the machine name that is used in the backend so you have to use lowercase characters and use underscores (_) instead of spaces.</p>
<p>For this tutorial we will name the theme drupal_theme, which gives us the following tree structure.</p>
<pre>+ sites
|-+ all
| |-+ themes
| | |-- zen
| | |-- drupal_theme</pre>
<p>Navigate within your drupal_theme directory and rename the file STARTERKIT.info.txt to yourthemename.info, in my case it will be drupal_theme.info.</p>
<p>Open the file in your editing program.</p>
<p>Change the name from <em>name = Zen Sub-theme Starter Kit</em> to <em>name = Your Theme Name</em> and change the description to a description of your theme.</p>
<p>Also change the <em>STARTERKIT.css</em> text to <em>yourthemename.css</em>, in my case it will be drupal_theme.css.</p>
<p>Save and close the file.</p>
<p>You need to make a choice as to whether you would like your theme to be a liquid layout, i.e. it will stretch the width of the browser so there is no whitespace on either side of the site or a fixed layout site where the site is a fixed width dependant of the browser window.</p>
<blockquote><p><strong>Liquid/adaptive width</strong></p>
<p>Copy the file <em>layout-liquid.css</em> from the /sites/all/themes/zen/zen directory to the /sites/all/themes/yourthemename directory. Then rename the file <em>layout.css</em></p>
<p><strong>Fixed width</strong></p>
<p>Copy the file <em>layout-fixed.css</em> from the /sites/all/themes/zen/zen directory to the /sites/all/themes/yourthemename directory. Then rename the file <em>layout.css</em></p></blockquote>
<p>Copy over the following CSS files from /sites/all/themes/zen/zen to your /sites/all/themes/yourthemename directory.</p>
<ul>
<li>zen.css</li>
<li>print.css</li>
<li>html-elements.css</li>
</ul>
<p>Rename the <em>zen.css</em> to <em>yourthemename.css</em>, in my case it will be <em>drupal_theme.css</em>.</p>
<p>In your theme folder, open and edit the files template.php and theme-settings.php, replacing all instanced of <em>STARTERKIT</em> with your theme name, so I replaced all instances of <em>STARTERKIT</em> with <em>drupal_theme</em>.</p>
<p>While logged in as a user with rights to the admin pages, navigate to Administer > Site building > Themes (admin/build/themes) and set your theme to default and save.</p>
<h3>How do I customise the theme?</h3>
<p>The structure of the page as in the way the sidebar, header, content, footer is layed out is mostly in the php files within the Zen theme and the CSS files we copied over to our theme folder allows us to change the styling of these items to make them appear the way we want.</p>
<h4>Change the font size</h4>
<p>The default font size is defined in the <em>html-elements.css</em> file.</p>
<pre class="brush: css">
  #page
  {
    /*
     * To use a 12px font size on the page, delete the 14px declarations.
     * to use a 14px font size on the page, delete the 12px declarations.
     */

    /* Use a 12px base font size with a 16px line height */
    font-size: 0.75em; /* 16px x .75 = 12px */
    line-height: 1.333em; /* 12px x 1.333 = 16px */

    /* Use a 14px base font size with a 18px line height */
    font-size: 0.875em; /* 16px x .875 = 14px */
    line-height: 1.286em; /* 14px x 1.286 = 18px */
  }
</pre>
<p>The #page rule is the wrapper that surrounds all the code.  So anything we apply to this will be applied to all elements under it unless they are overwritten later on in the CSS file.  By default the font size is set to 14px as it is the latter rule of the two. If you wish to reduce the font size to 12px, simply delete the last three lines (you can also delete the additional comments at the top of the rule), so you get the following:</p>
<pre class="brush: css">
  #page
  {
    /* Use a 12px base font size with a 16px line height */
    font-size: 0.75em; /* 16px x .75 = 12px */
    line-height: 1.333em; /* 12px x 1.333 = 16px */
  }
</pre>
<h4>How do I change the background colour?</h4>
<p>In the <em>yourthemename.css</em> file, change the body rule from:</p>
<pre class="brush: css">
body
  {
    margin: 0;
    padding: 10px;
  }</pre>
<p>To:</p>
<pre class="brush: css">
body
  {
    margin: 0;
    padding: 10px;
    background-color: #c00;
  }</pre>
<p>Where you change the colour to what ever you want. If you don&#8217;t know the hex value for the colour you want to use, you can use the RGB colour in the following format:</p>
<pre class="brush: css">
body
  {
    margin: 0;
    padding: 10px;
    background-color: rgb(204, 0, 0);
  }</pre>
<p>Or you can find the hex colour in this <a href="http://www.webmonkey.com/reference/Color_Charts">hex colour reference chart</a>.</p>
<h4>How do I add an image to use as my background?</h4>
<p>In the <em>yourthemename.css</em> file, change the body rule from:</p>
<pre class="brush: css">
body
  {
    margin: 0;
    padding: 10px;
  }</pre>
<p>To:</p>
<pre class="brush: css">
body
  {
    margin: 0;
    padding: 10px;
    background: #fff url(background.jpg) top center repeat;
  }</pre>
<p>Place the image in your theme folder.  Alternatively if you want to keep your theme folder as tidy as possible, you can create a folder called images within your theme folder and change the CSS code to:</p>
<pre class="brush: css">
body
  {
    margin: 0;
    padding: 10px;
    background: #fff url(images/background.jpg) top center repeat;
  }</pre>
<p>If you chose a background image that makes the text hard to read, you can change the background colour of the #main element, which is the wrapper of all the main content excluding the header and footer, to white.</p>
<pre class="brush: css">
#main
  {
    background-color: #fff;
  }</pre>
<p>You can continue editing your theme by editing the CSS rules within the main CSS file (<em>yourthemename.css</em>).  For more references on CSS, check out the <a href="http://jamestombs.co.uk/2010-01-07/top-htmlcss-resources-for-beginners/1066">Top HTML/CSS resources for beginners</a> post.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-01-11/create-a-drupal-6-theme-based-on-the-zen-starter-theme/1083/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top HTML/CSS resources for beginners</title>
		<link>http://jamestombs.co.uk/2010-01-07/top-htmlcss-resources-for-beginners/1066</link>
		<comments>http://jamestombs.co.uk/2010-01-07/top-htmlcss-resources-for-beginners/1066#comments</comments>
		<pubDate>Thu, 07 Jan 2010 15:04:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1066</guid>
		<description><![CDATA[A strong knowledge of HTML and CSS is pivotal for all other web design or development work. It provides you with knowledge of how to structure a web page and best practices to create a well supported website across all major browsers.

W3 Schools

Tizag

HTML Dog

SitePoint HTML/CSS Reference

  Amazon.co.uk Widgets
]]></description>
			<content:encoded><![CDATA[<p>A strong knowledge of HTML and CSS is pivotal for all other web design or development work. It provides you with knowledge of how to structure a web page and best practices to create a well supported website across all major browsers.</p>
<p><span id="more-1066"></span></p>
<h3><a href="http://www.w3schools.com/">W3 Schools</a></h3>
<p><a href="http://www.w3schools.com/"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/w3schools.jpg" alt="" title="W3 Schools" width="420" height="250" class="alignnone size-full wp-image-1068" /></a></p>
<h3><a href="http://www.tizag.com/">Tizag</a></h3>
<p><a href="http://www.tizag.com/"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/tizag.jpg" alt="" title="Tizag" width="420" height="250" class="alignnone size-full wp-image-1069" /></a></p>
<h3><a href="http://htmldog.com/">HTML Dog</a></h3>
<p><a href="http://www.htmldog.com/"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/htmldog.jpg" alt="" title="HTML Dog" width="420" height="250" class="alignnone size-full wp-image-1070" /></a></p>
<h3><a href="http://reference.sitepoint.com/">SitePoint HTML/CSS Reference</a></h3>
<p><a href="http://reference.sitepoint.com/"><img src="http://jamestombs.co.uk/wp-content/uploads/2010/01/sitepoint.jpg" alt="" title="SitePoint" width="420" height="250" class="alignnone size-full wp-image-1071" /></a></p>
<p><OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_2125efef-8f1f-4f60-90f5-e8c683d25aae"  WIDTH="400px" HEIGHT="150px"> <PARAM NAME="movie" VALUE="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&#038;MarketPlace=GB&#038;ID=V20070822%2FGB%2Fskeletorscorp-21%2F8010%2F2125efef-8f1f-4f60-90f5-e8c683d25aae&#038;Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&#038;MarketPlace=GB&#038;ID=V20070822%2FGB%2Fskeletorscorp-21%2F8010%2F2125efef-8f1f-4f60-90f5-e8c683d25aae&#038;Operation=GetDisplayTemplate" id="Player_2125efef-8f1f-4f60-90f5-e8c683d25aae" quality="high" bgcolor="#ffffff" name="Player_2125efef-8f1f-4f60-90f5-e8c683d25aae" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="150px" width="400px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&#038;MarketPlace=GB&#038;ID=V20070822%2FGB%2Fskeletorscorp-21%2F8010%2F2125efef-8f1f-4f60-90f5-e8c683d25aae&#038;Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT></p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2010-01-07/top-htmlcss-resources-for-beginners/1066/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic tips for amateur web designers</title>
		<link>http://jamestombs.co.uk/2009-12-23/basic-tips-for-amateur-web-designers/1063</link>
		<comments>http://jamestombs.co.uk/2009-12-23/basic-tips-for-amateur-web-designers/1063#comments</comments>
		<pubDate>Wed, 23 Dec 2009 17:36:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1063</guid>
		<description><![CDATA[Content is king
Search engines (Google, Bing, Yahoo) all rank your site based on your content. You need to make sure your content has the keywords that you expect people to search to find you are in your content.
This text has to be in HTML. A common problem on the web especially from people using things [...]]]></description>
			<content:encoded><![CDATA[<h3>Content is king</h3>
<p>Search engines (Google, Bing, Yahoo) all rank your site based on your content. You need to make sure your content has the keywords that you expect people to search to find you are in your content.</p>
<p>This text has to be in HTML. A common problem on the web especially from people using things like MrSite (or any other site builder/WYSIWYG editor) is that they find the font they want to use doesn&#8217;t work on multiple computers. To get around this, they will create images with the text in the image. As far as the search engines are concerned, there is no text there, so it has zero content to index.</p>
<h3>Page structure</h3>
<p>The actual HTML structure of the page is important. The search engines bots are getting more and more inteligent in finding what it thinks is the main content on your page. So rather than thinking your navigation is your content, they will generally find your first paragraph. This makes it importantant to make sure your content is wrapped properly in paragraph tags (&lt;p&gt; &lt;/p&gt;), otherwise you are just hurting your SEO score.</p>
<h3>Grammar and spelling</h3>
<p>As well as search engines looking at your site, you also have potential customers coming to your site. Pictures will help grab their attention intially, but they will want to read what you have to say. Simple mistakes, such as brought instead of bought, can be very off putting and scare some customers away.</p>
<h3>Accessibility</h3>
<p>Test your site in all the major browsers. Just because you don&#8217;t like Internet Explorer, doesn&#8217;t mean everyone else has switched to Firefox. IE still accounts for around 60-70% of browsers worldwide. Do you really want to throw away a percentage that big?</p>
<p>Also make sure that your text is readable. Colour contrast is extremely important, not everyone will have the same vision as you. Putting white on yellow or yellow on white will be hard to read, make sure there is a clear contrast, so when using white text, the background must be dark. To test your colours, you can use this <a href="http://juicystudio.com/services/luminositycontrastratio.php" target="_blank">handly little tool</a> to see if they are accessible or not.  Ideally you want to pass AAA specifications.</p>
<h3>Remove the gimmicks</h3>
<p>What do I mean by gimmicks? That analogue clock that you have thrown in to fill up that space that you didn&#8217;t know what to do with.</p>
<p>Hit counters. Hit counters are beyond useless, no one really cares about how many hits your site has had, but it is useful for your competitors to know how well (or bad) you are doing. If you want analytics to see how many people are visiting your site, there are free tools available to you. <a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> and <a href="http://getclicky.com/" target="_blank">GetClicky</a> are two of the most popular.</p>
<p>Mouse cursor trails has some blue bars chasing the mouse around the screen. Do you know something Microsoft, Google, Apple, BBC etc don&#8217;t know? You are a professional business, not a 12 year old girl telling the world about your pet cats.</p>
<h3>Learn about your audience</h3>
<p>The first thing to do is learn who is currently visiting your site. Get yourself set up with either <a href="http://www.google.com/analytics/" target="_blank">Google Analytics</a> and <a href="http://getclicky.com/" target="_blank">GetClicky</a> which are free analytics packages that can tell you how many visits you are getting and where these visits come from. This will include keywords that are used in searches to get to your site.</p>
<p>Once you have the keywords you are being found on, enter them in to the <a href="https://adwords.google.com/select/KeywordToolExternal" target="_blank">Google Keywords Tool</a>. This will produce a list of synonyms that you can use in your content to attract a wider range of clients that may not use the same search terms as you are currently using.</p>
<h3>Background images</h3>
<p>Background images are fine, as long as they are done properly. It may look alright on your 17&#8243;/19&#8243; monitor, but when the image stops and you get half a white screen when looking on a 24&#8243; monitor, it doesn&#8217;t look very good.</p>
<p>Have a background that blends to a solid colour, or use a repeating background, but don&#8217;t have repeated large images as they don&#8217;t look very good. Examples: <a href="http://www.lanbruk.com.au/" target="_blank">1</a>, <a href="http://www.gazelletouch.com/" target="_blank">2</a>, <a href="http://www.generalrobots.de/" target="_blank">3</a></p>
<h3>Spread yourself</h3>
<p>Expand yourself across social media platforms. Exposure on the web is good, even if people don&#8217;t read it, the search engines will see it and think that your website is important as there are a few other websites linking to it.</p>
<p>Examples being Twitter, Facebook (if set to public with the new privacy settings) as well as setting up an external blog.</p>
<p>For the blog, although it does look better to have a built in blog for consistency with design, the links to the site back from an external blog such as <a href="http://wordpress.com/" target="_blank">Wordpress.com</a> or <a href="http://www.blogger.com/home" target="_blank">Blogger</a>.</p>
<p>YouTube is currently the second biggest search engine in the UK. It gets more searches than all the main search engines (Google main search excluded). Even if your video is just a simple slideshow of images of a write up with your company name. Keyword the video, add your website URL to the video description.</p>
<h3>Images need context</h3>
<p>It is all very well having lots of images on your site but without context the images mean nothing to a search engine and may not necessary be clear to a user. But how do you expect people to find these images on your site? You need to make sure that your images are caption or have some sort of description text with them so that they are searchable. Unfortunately the search engines aren&#8217;t at a stage where they can search within images yet, so you have to use words to describe them.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2009-12-23/basic-tips-for-amateur-web-designers/1063/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Drupal] An error occured while attempting to process add Content Modal form</title>
		<link>http://jamestombs.co.uk/2009-07-16/drupal-an-error-occured-while-attempting-to-process-add-content-modal-form/1053</link>
		<comments>http://jamestombs.co.uk/2009-07-16/drupal-an-error-occured-while-attempting-to-process-add-content-modal-form/1053#comments</comments>
		<pubDate>Thu, 16 Jul 2009 10:21:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[drupal]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1053</guid>
		<description><![CDATA[When trying to add some content new a pane in Panels in Drupal 5 you may get this message.
In my case it was caused by the Secure Pages module.  To fix this add the following line to your Secure Pages configuration under Ignore pages:
*ajax*
]]></description>
			<content:encoded><![CDATA[<p>When trying to add some content new a pane in <a href="http://drupal.org/project/panels">Panels</a> in <a href="http://drupal.org/project/drupal">Drupal 5</a> you may get this message.</p>
<p>In my case it was caused by the <a href="http://drupal.org/project/securepages">Secure Pages</a> module.  To fix this add the following line to your <a href="http://drupal.org/project/securepages">Secure Pages</a> configuration under Ignore pages:</p>
<p><code>*ajax*</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2009-07-16/drupal-an-error-occured-while-attempting-to-process-add-content-modal-form/1053/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No add button in IMCE in Drupal when using the Secure Pages module</title>
		<link>http://jamestombs.co.uk/2009-07-06/no-add-button-in-imce-in-drupal-when-using-the-secure-pages-module/1052</link>
		<comments>http://jamestombs.co.uk/2009-07-06/no-add-button-in-imce-in-drupal-when-using-the-secure-pages-module/1052#comments</comments>
		<pubDate>Mon, 06 Jul 2009 15:46:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[imce]]></category>

		<guid isPermaLink="false">http://jamestombs.co.uk/?p=1052</guid>
		<description><![CDATA[There may be cases where you are using IMCE with Drupal and have the IMCE appear on node add/edit pages which use a secure URL.  You need to add the following to the ignore section of the Secure Pages module.
imce*
Go back to your node add/edit page and you should now have the add button [...]]]></description>
			<content:encoded><![CDATA[<p>There may be cases where you are using IMCE with Drupal and have the IMCE appear on node add/edit pages which use a secure URL.  You need to add the following to the ignore section of the Secure Pages module.</p>
<p><code>imce*</code></p>
<p>Go back to your node add/edit page and you should now have the add button in IMCE.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamestombs.co.uk/2009-07-06/no-add-button-in-imce-in-drupal-when-using-the-secure-pages-module/1052/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
