<?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>hv-designs &#187; PSD Sitebuilds</title>
	<atom:link href="http://www.hv-designs.co.uk/category/csshtml-tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hv-designs.co.uk</link>
	<description></description>
	<lastBuildDate>Mon, 12 Jul 2010 06:49:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Digital Curriculum Vitae: PSD Conversion</title>
		<link>http://www.hv-designs.co.uk/2010/04/11/digital-curriculum-vitae-psd-conversion/</link>
		<comments>http://www.hv-designs.co.uk/2010/04/11/digital-curriculum-vitae-psd-conversion/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 17:10:03 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=2270</guid>
		<description><![CDATA[Good evening everybody, today i&#8217;ll be walking you through the process of coding your &#8220;Digital Curriculum Vitae&#8221; into a working HTML/CSS Template. Lets get started. The Live Version You can check out the Live Version of the template by clicking the image below. The template has been tested in the following browsers without any problems. [...]]]></description>
			<content:encoded><![CDATA[<p>Good evening everybody, today i&#8217;ll be walking you through the process of coding your &#8220;Digital Curriculum Vitae&#8221; into a working HTML/CSS Template. Lets get started.</p>
<p><span id="more-2270"></span></p>
<h2>The Live Version</h2>
<p>You can check out the Live Version of the template by clicking the image below. The template has been tested in the following browsers without any problems.</p>
<ul class="post-list">
<li>Firefox 2.0, 3.0 and 3.5</li>
<li>Internet Explorer 7 and 8 </li>
<li>Chrome 3.0</li>
<li>Safari 3.0 and 4.0</li>
</ul>
<p><a href="http://www.hv-designs.co.uk/tutorials/cv_code/template/index.html" target="_blank"><img src="http://www.hv-designs.co.uk/tutorials/cv_code/live_thumbnail.gif" border="0" alt="View The Template Live" width="600" height="200" /></a></p>
<h2>Preparing Your Files</h2>
<p>Create a new folder on your desktop called &#8220;Digital Curriculum Vitae&#8221;, within this folder create three more folders called &#8220;fonts&#8221;, &#8220;images&#8221; and &#8220;Stylesheets&#8221;.</p>
<p>The &#8220;Fonts&#8221; folder will be used for our fonts, if you can remember from part #1 of the tutorial we used a font called &#8220;Myriad Pro&#8221;. This font won&#8217;t work on a live webpage unless we use some CSS3 (@font Face), more on this later.</p>
<p>The &#8220;Images&#8221; folder will be for our template images, all images will be saved in PNG format.</p>
<p>Finally the &#8220;Stylesheets&#8221; folder will contain our stylesheets, i this template there will be two stylesheets. A &#8220;Reset.CSS&#8221; and &#8220;Styles.CSS&#8221;.</p>
<p>Once you&#8217;ve created your folders, create a blank HTML file called &#8220;Index.HTML&#8221;. Save the blank HTML file inside the main folder. Next create two blank CSS files inside your stylesheets folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step1.gif" alt="Digital CV Template" width="600" height="349" /></p>
<h2>Setting Up The HTML File</h2>
<p>Open your HTML file in your favorite code editor, in the &#8220;HEAD&#8221; section of the HTML file add your template title and link your CSS document.</p>
<p>[sourcecode language="html"]<br />
&lt;title&gt;Digital Curriculum Vitae &#8211; Richard Carpenter &#8211; HV-Designs.co.uk&lt;/title&gt;<br />
&lt;link href=&quot;stylesheets/styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
[/sourcecode]</p>
<p>In the &#8220;BODY&#8221; of your document add a DIV called &#8220;Container&#8221;, the container will be our main DIV in which our template will be held.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside the container DIV were going to create 3 more DIV&#8217;s, &#8220;Frame-Top&#8221;, &#8220;Frame-Middle&#8221; and &#8220;Frame-Btm&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;</p>
<p>&lt;div id=&quot;frame-top&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME TOP ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;frame-middle&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME MIDDLE ENDS&#8211;&gt;<br />
&lt;div id=&quot;frame-btm&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The 3 DIV&#8217;s will each contain the top, middle and bottom portions of the transparent box which is behind the white rectangle on our layout.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step2.gif" alt="Digital CV Template" width="600" height="474" /></p>
<p>Finally the actual white rectangle on our layout we can do all in CSS, so we&#8217;ll just create 1 more DIV called &#8220;Page&#8221;. Place the DIV inside the &#8220;Frame-Middle&#8221; DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;</p>
<p>&lt;div id=&quot;frame-top&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME TOP ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;frame-middle&quot;&gt;</p>
<p>&lt;div id=&quot;page&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;PAGE ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FRAME MIDDLE ENDS&#8211;&gt;<br />
&lt;div id=&quot;frame-btm&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>So just to recap then we have our &#8220;Container DIV&#8221; which will contain a whole template, &#8220;Frame-Top&#8221;, &#8220;Frame-Middle&#8221; and &#8220;Frame-Btm&#8221; which will contain our transparent rectangle cut into 3 separate images. Then finally our &#8220;Page&#8221; DIV which will contain our white main rectangle for our content.</p>
<h2>Slicing The Background Image</h2>
<p>Now our HTML mark-up is finished lets start slicing our images, We&#8217;ll start with the background. Select the rectangular marquee tool then drag out a selection about 50 pixels wide and the whole length of your background. </p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step3.gif" alt="Digital CV Template" width="600" height="400" /></p>
<p>Once the selection has been made go to &#8220;Edit > Copy Merged&#8221;, then go to &#8220;File > New&#8221; and create a new document. (The size of your selection should automatically be entered into the dimension boxes)</p>
<p>Save the background image as &#8220;bg.PNG&#8221; inside the images folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step4.gif" alt="Digital CV Template" width="600" height="519" /></p>
<h2>Slicing The Transparent Rectangle</h2>
<p>Hide all your layers apart from the background layers and the transparent rectangle. Select the rectangular marquee tool then make a selection around the top half of the rectangle.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step12.gif" alt="Digital CV Template" width="600" height="400" /></p>
<p>In the selection include your drop shadow, but don&#8217;t include the content rectangle. Once you&#8217;ve made the selection hide the background layers and go to &#8220;Edit > Copy Merged&#8221;, paste the selection into a new document then save the file as &#8220;frame_top.PNG&#8221;. </p>
<p>Repeat the process for the bottom of the rectangle and also the middle, make sure all slices are the same width.</p>
<h2>Slicing The Template Title</h2>
<p>Still with the rectangular marquee tool make a selection around your website title.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step5.gif" alt="Digital CV Template" width="600" height="264" /></p>
<p>Once you&#8217;ve made the selection hide all your layers apart from the title layer itself then go to &#8220;Edit > Copy Merged&#8221;. Create a new document by going to &#8220;File > New&#8221; and then paste your selection into the new document.</p>
<p>In your new document hide the background layer then go to &#8220;File > Save As&#8221;, save the image as &#8220;title.PNG&#8221; inside the images folder.</p>
<h2>Slicing The Navigation</h2>
<p>For our little 3 button navigation were going to keep all the buttons as one image, we&#8217;ll then use CSS to adjust the background image for our template.</p>
<p>Start off by making a selection around all 3 buttons using the rectangular marquee tool.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step6.gif" alt="Digital CV Template" width="600" height="200" /></p>
<p>Hide all your layers apart from the 3 button icons and there text, once you&#8217;ve hidden your layers go to &#8220;Edit > Copy Merged&#8221;.</p>
<p>Paste your copied selection to a new document, hide the background layer then save the images as &#8220;right_navigation.PNG&#8221; inside your images folder.</p>
<h2>Slicing The Page Background</h2>
<p>Using the rectangular marquee tool make a selection 1 pixel wide starting from the top of your white rectangle. The starting point should be underneath the 1 pixel white border.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step7.gif" alt="Digital CV Template" width="600" height="200" /></p>
<p>Drag the selection all the way down until you come into the white portion of the rectangle. You can use the eye dropper tool to make sure the selection ends on white (#ffffff). The reason for this is because where the background image ends the color white will continue on down the page which will be set in our stylesheet.</p>
<h2>Slicing The Bullet Points And Divider Line</h2>
<p>Make a selection around one of your bullet points using the rectangular marquee tool.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step8.gif" alt="Digital CV Template" width="600" height="200" /></p>
<p>Once you&#8217;ve made the selection hide all your layers apart from the bullet layer itself then go to &#8220;Edit > Copy Merged&#8221;. Create a new document by going to &#8220;File > New&#8221; and then paste your selection into the new document.</p>
<p>In your new document hide the background layer then go to &#8220;File > Save As&#8221;, save the image as &#8220;bullet.PNG&#8221; inside the images folder.</p>
<p>For our divider line you only need to make a 1 x 2 pixel selection as the image will be repeated using CSS. Make a selection on your divider line as shown in the image below.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step9.gif" alt="Digital CV Template" width="600" height="200" /></p>
<p>Once the selection has been made go to &#8220;Edit > Copy Merged&#8221;. Paste the selection into a new document then save the image as &#8220;divider.png&#8221; inside the images folder.</p>
<h2>Slicing The Social Icons</h2>
<p>Finally we need to slice our individual social icons. Using the same methods listed above slice each button, then save each button on a transparent background inside your images folder. </p>
<p>Once your finished thats all the slicing done. Here&#8217;s a screen shot of all my images inside the images folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step10.gif" alt="Digital CV Template" width="600" height="609" /></p>
<h2>The Background CSS</h2>
<p>Open up your styles.CSS stylesheet inside your favorite code editor, then add the body as your first style.</p>
<p>[sourcecode language="css"]<br />
body {<br />
}<br />
[/sourcecode]</p>
<p>Inside your body style we need to set our background image, to do this we add your &#8220;bg.PNG&#8221; image as a background then repeat the background horizontally (X-Axis).</p>
<p>We don&#8217;t want the background to move when scrolling down the page so we also set the background to fixed. Finally we need to push our template downwards so its not flush with the top of our browser, we do this by adding a top margin. The CSS code looks like this.</p>
<p>[sourcecode language="css"]<br />
body {<br />
background-image: url(../images/bg.png);<br />
background-repeat: repeat-x;<br />
background-attachment: fixed;<br />
margin-top: 35px;<br />
}<br />
[/sourcecode]</p>
<h2>Styling The Container</h2>
<p>The next set of DIV&#8217;s we need to style are the foundations of our template, these DIV&#8217;s are the main container and the transparent rectangle which goes all the way around our template. We&#8217;ll start with the container DIV.</p>
<p>We first set our container width, to find out the width of the container you can check the size of your transparent rectangle images.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step11.gif" alt="Digital CV Template" width="600" height="348" /></p>
<p>Notice the width of 861px, this will be our container width. We then set our containers margins to auto, doing this will center our template in the browser.</p>
<p>[sourcecode language="css"]<br />
#container {<br />
margin: auto;<br />
width: 861px;<br />
}<br />
[/sourcecode]</p>
<h2>Styling The Transparent Rectangle</h2>
<p>Inside your HTML file locate the DIV&#8217;s &#8220;frame-top&#8221; and &#8220;frame-btm&#8221;. Inside the frame top DIV insert your frame top image from your images folder.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;frame-top&quot;&gt;<br />
&lt;img src=&quot;images/frame_top.png&quot; alt=&quot;Curriculum Vitae&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME TOP ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Repeat the same for the frame btm DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;frame-btm&quot;&gt;<br />
&lt;img src=&quot;images/frame_btm.png&quot; alt=&quot;Curriculum Vitae&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;FRAME BOTTOM ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>For our top and bottom frame DIV&#8217;s we need to float them left then add a fixed height and width. The width and height of our DIV should be the same width and height as images which we sliced earlier.</p>
<p>Instead of creating two separate styles for frame top and frame btm we can join them together as both DIV&#8217;s share the same styles. We do this by separating the DIV&#8217;s with comma&#8217;s in our stylesheet.</p>
<p>[sourcecode language="css"]<br />
#frame-top, #frame-btm {<br />
float: left;<br />
height: 25px;<br />
width: 861px;<br />
}<br />
[/sourcecode]</p>
<h2>Styling Frame Middle DIV</h2>
<p>Our &#8220;frame-middle&#8221; DIV is styled in a similar way as body background, the only difference being we repeat the background vertically (Y Axis), float the DIV to the left and add a fixed width. The fixed width should match the frame middle image, which should also be the same width as our container DIV.</p>
<p>[sourcecode language="css"]<br />
#frame-middle {<br />
background-image: url(../images/frame_middle.png);<br />
background-repeat: repeat-y;<br />
float: left;<br />
width: 861px;<br />
}<br />
[/sourcecode]</p>
<h2>Styling The Page DIV</h2>
<p>This DIV is the final DIV we need to style, we should then have the foundations of our template ready for our content.</p>
<p>Float the DIV left, add a fixed width of 809px (the width is the same size as our content rectangle in our PSD file) then set a white solid 1 px border.</p>
<p>[sourcecode language="css"]<br />
#page {<br />
float: left;<br />
width: 809px;<br />
border: 1px solid #FFFFFF;<br />
}<br />
[/sourcecode]</p>
<p>Set your &#8220;page_bg.PNG&#8221; as the DIV&#8217;s background repeating it horizontally (X Axis), set the DIV&#8217;s background color to white (#ffffff) then set a top and bottom margin of 30px.</p>
<p>#page {<br />
float: left;<br />
width: 809px;<br />
margin-left: 25px;<br />
border: 1px solid #FFFFFF;<br />
background-image: url(../images/page_bg.png);<br />
background-repeat: repeat-x;<br />
background-color: #FFFFFF;<br />
padding-top: 30px;<br />
padding-bottom: 30px;<br />
}</p>
<h2>Adding Some Content</h2>
<p>In your HTML file inside the &#8220;#page&#8221; DIV add a &#8220;H1&#8243; heading tag then insert your &#8220;title.PNG&#8221; file inside. Add a link to your image if you wish.</p>
<p>[sourcecode language="html"]<br />
&lt;h1&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/title.png&quot; alt=&quot;Richard Carpenter CV&quot; /&gt;&lt;/a&gt;&lt;/h1&gt;<br />
[/sourcecode]</p>
<p>Underneath your &#8220;H1&#8243; tag add an unordered list &#8220;UL&#8221; with a class of &#8220;right-nav&#8221;. Inside your list add your 3 list items also known as your 3 button navigation each with there own classes to represent that list (LI) Item.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;right-nav&quot;&gt;<br />
&lt;li class=&quot;save&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Save&quot;&gt;Save&lt;/a&gt;&lt;/li&gt;<br />
&lt;li class=&quot;print&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Print&quot;&gt;Print&lt;/a&gt;&lt;/li&gt;<br />
&lt;li class=&quot;contact&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Contact&quot;&gt;Contact&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<p>Underneath your small navigation add a simple paragraph &#8220;P&#8221; tag with a class of &#8220;job-title&#8221;. Inside your &#8220;P&#8221; tag add your desired text.</p>
<p>[sourcecode language="html"]<br />
&lt;p class=&quot;job-title&quot;&gt;Web Designer / Developer&lt;/p&gt;<br />
[/sourcecode]</p>
<p>Finally we need to add our intro text, create another &#8220;P&#8221; tag but with a class of &#8220;intro&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;p class=&quot;intro&quot;&gt;INTRO TEXT GOES HERE&lt;/p&gt;<br />
[/sourcecode]</p>
<h2>Styling Our Header Content</h2>
<p>We&#8217;ll start with our &#8220;H1&#8243; tag, set a fixed width and height the same dimensions as your title image, float the title left then add a bottom margin of 10px. To push the tag over from the left add a left margin of 30px.</p>
<p>We could of added the left padding to the &#8220;page&#8221; DIV which would automatically push everything from the left over 30px, but if we used this method then our little lined divider would also have 30px padding which we don&#8217;t want. We want the divider to start and end at either side of the page layout. We&#8217;ll add the 30px left margin to all items inside the &#8220;page&#8221; DIV.</p>
<p>[sourcecode language="css"]<br />
h1 {<br />
height: 47px;<br />
width: 334px;<br />
margin-bottom: 10px;<br />
float: left;<br />
margin-left: 30px;<br />
}<br />
[/sourcecode]</p>
<h2>Styling Our P Tag Classes</h2>
<p>There are two &#8220;P&#8221; tag classes we need to style, &#8220;P class job-title&#8221; and &#8220;P class intro&#8221;. The styles for these classes are just changes in the way the text looks. Notice we haven&#8217;t set any font-family yet as we&#8217;ll be doing this at the as it requires some CSS3.</p>
<p>The &#8220;P&#8221; class &#8220;job-title&#8221; looks like this.</p>
<p>[sourcecode language="css"]<br />
p.job-title {<br />
color: #b1b1b1;<br />
font-size: 20px;<br />
letter-spacing: -1px;<br />
font-style: italic;<br />
clear: both;<br />
margin-left: 30px;<br />
}<br />
[/sourcecode]</p>
<p>The &#8220;P&#8221; class &#8220;intro&#8221; styling looks like this.</p>
<p>[sourcecode language="css"]<br />
p.intro {<br />
font-style: italic;<br />
color: #646464;<br />
font-size: 12px;<br />
margin-top: 20px;<br />
text-align: justify;<br />
margin-left: 30px;<br />
margin-right: 30px;<br />
line-height: 18px;<br />
}<br />
[/sourcecode]</p>
<h2>Styling The Navigation</h2>
<p>For our navigation start off by styling the unordered-list &#8220;UL&#8221;. Simply float the navigation to the right then add 30px of right margin.</p>
<p>[sourcecode language="css"]<br />
ul.right-nav {<br />
float: right;<br />
margin-right: 30px;<br />
}<br />
[/sourcecode]</p>
<p>The next few styles are for our navigation list &#8220;LI&#8221; items and the link &#8220;A&#8221; associated with our buttons. For our list &#8220;LI&#8221; items we float each of them left, to add spacing in between each button we add a left margin of 22px.</p>
<p>For our list &#8220;LI A&#8221; links we display each of them as a block and add a text-indent which will push the text off the page (We&#8217;ll be using images don&#8217;t forget). </p>
<p>Finally we need to add a fixed width and height to our buttons to find out how big you need to set them you have to measure each button then use the biggest one as your fixed width and height.</p>
<p>[sourcecode language="css"]<br />
.right-nav li {<br />
float: left;<br />
margin-left: 22px;<br />
}</p>
<p>.right-nav li a {<br />
display: block;<br />
height: 46px;<br />
text-indent: -9999px;<br />
width: 38px;<br />
}<br />
[/sourcecode]</p>
<p>We now have to style our list &#8220;LI&#8221; classes, each list class will have our navigation background image set as a background. You can merge these styles into one by separating each style with a comma.</p>
<p>[sourcecode language="css"]<br />
li.save a, li.print a, li.contact a {<br />
background-image: url(../images/right_navigation.png);<br />
background-repeat: no-repeat;<br />
}<br />
[/sourcecode]</p>
<p>All&#8217;s we have to do now is adjust our list background image position so that the buttons display correctly. Your positions might be different to mine depending on how big your buttons are.</p>
<p>[sourcecode language="css"]<br />
li.save a {<br />
background-position: 5px top;<br />
}</p>
<p>li.print a {<br />
background-position: -44px top;<br />
}</p>
<p>li.contact a {<br />
background-position: -101px top;<br />
}<br />
[/sourcecode]</p>
<h2>Adding The Divider</h2>
<p>Inside your HTML file create an empty DIV with a class of divider. The DIV should live underneath your intro text inside the &#8220;page&#8221; DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;divider&quot;&gt;&lt;/div&gt;<br />
[/sourcecode]</p>
<p>Inside your stylesheet add the divider class then set the &#8220;divider.PNG&#8221; image as a background repeated horizontally (X Axis). Float the DIV left with a top and bottom margin of 27px. Finally add a fixed width and height, the height should be 2px the same height as the image the width should be the same width as the &#8220;page&#8221; DIV.</p>
<p>[sourcecode language="css"]<br />
.divider {<br />
clear: both;<br />
background-image: url(../images/divider.png);<br />
background-repeat: repeat-x;<br />
float: left;<br />
height: 2px;<br />
width: 809px;<br />
margin-top: 27px;<br />
margin-bottom: 27px;<br />
}<br />
[/sourcecode]</p>
<h2>Adding Your Section Titles</h2>
<p>Inside your HTML file, underneath your divider simply add an &#8220;H2&#8243; tag. Inside the &#8220;H2&#8243; tag add one of your section titles I.E &#8211; Technical Skills.</p>
<p>[sourcecode language="html"]<br />
&lt;h2&gt;Technical Skills&lt;/h2&gt;<br />
[/sourcecode]</p>
<p>Inside your stylesheet add your &#8220;H2&#8243; tag then set the text color, font size, letter spacing and some bottom margin to separate the title from the content which will lie underneath. Finally add a left margin of 30px to push the title over inline with everything else.</p>
<p>[sourcecode language="css"]<br />
h2 {<br />
margin-left: 30px;<br />
font-size: 25px;<br />
color: #414141;<br />
letter-spacing: -1px;<br />
margin-bottom: 15px;<br />
}<br />
[/sourcecode]</p>
<p>All your section titles should be wrapped within the &#8220;H2&#8243; tag.</p>
<h2>Adding Your CV Details</h2>
<p>All the CV information/details will be added using an unordered list &#8220;LI&#8221;. In your HTML file underneath your H2 tag create an unordered list &#8220;LI&#8221; with a class of &#8220;details&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;details&quot;&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<p>Inside the unordered list add a list &#8220;LI&#8221; item containing an &#8220;H3&#8243; tag. Inside the &#8220;H3&#8243; tag add your title E.G XHTML &#038; CSS &#8211; 4 Years, Intermediate to Advanced.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;details&quot;&gt;<br />
&lt;li&gt;<br />
&lt;h3&gt;XHTML &amp; CSS &#8211; 4 Years, Intermediate to Advanced&lt;/h3&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<p>Inside the &#8220;H3&#8243; tag where you have the details of the &#8220;H3&#8243; tag E.G 4 Years, Intermediate to Advanced, add a span class of &#8220;color2&#8243;. Doing this will enable us to add additional styling to that specific bit of text.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;details&quot;&gt;<br />
&lt;li&gt;<br />
&lt;h3&gt;XHTML &amp; CSS &#8211; &lt;span class=&quot;color2&quot;&gt;4 Years, Intermediate to Advanced&lt;/span&gt;&lt;/h3&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<p>Underneath the &#8220;H3&#8243; tag create a &#8220;P&#8221; tag will your text.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;details&quot;&gt;<br />
&lt;li&gt;<br />
&lt;h3&gt;XHTML &amp; CSS &#8211; &lt;span class=&quot;color2&quot;&gt;4 Years, Intermediate to Advanced&lt;/span&gt;&lt;/h3&gt;<br />
&lt;p&gt;TEXT GOES HERE&lt;/p&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<p>When adding more details simply create another list containing the &#8220;H3&#8243; and &#8220;P&#8221; tags.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;details&quot;&gt;<br />
&lt;li&gt;<br />
&lt;h3&gt;XHTML &amp; CSS &#8211; &lt;span class=&quot;color2&quot;&gt;4 Years, Intermediate to Advanced&lt;/span&gt;&lt;/h3&gt;<br />
&lt;p&gt;TEXT GOES HERE&lt;/p&gt;<br />
&lt;/li&gt;</p>
<p>&lt;li&gt;<br />
&lt;h3&gt;Adobe Photoshop &#8211; &lt;span class=&quot;color2&quot;&gt;8 Years, Advanced&lt;/span&gt;&lt;/h3&gt;<br />
&lt;p&gt;TEXT GOES HERE&lt;/p&gt;<br />
&lt;/li&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<h2>Styling Our Details</h2>
<p>Inside your stylesheet you need to add your unordered list classes, start with the &#8220;UL&#8221; Attribute.</p>
<p>Float your list to the left then add left and bottom margins. The left margin will push the list over inline with everything else and the bottom margin will space out the lists.</p>
<p>[sourcecode language="css"]<br />
ul.details {<br />
float: left;<br />
margin-left: 30px;<br />
margin-bottom: 10px;<br />
}<br />
[/sourcecode]</p>
<p>For your list elements add your &#8220;bullet.PNG&#8221; image as a background then using some left padding push the list elements over so the text is by the side of the bullet. Finally add a bottom margin which will space out the list elements.</p>
<p>[sourcecode language="css"]<br />
.details li {<br />
background-image: url(../images/bullet.png);<br />
background-repeat: no-repeat;<br />
background-position: left 6px;<br />
padding-left: 35px;<br />
margin-bottom: 20px;<br />
}<br />
[/sourcecode]</p>
<p>Finally, we need to style our &#8220;P&#8221; tags within our list. Set your font size and color along with any thing else you want to add. Don&#8217;t forget to add a right margin of 30px which will push the text over from the right.</p>
<p>[sourcecode language="css"]<br />
.details li p {<br />
margin-right: 30px;<br />
text-align: justify;<br />
color: #646464;<br />
font-size: 12px;<br />
line-height: 18px;<br />
}<br />
[/sourcecode]</p>
<p>Using a combination of H2, H3 and the list items make up the rest of your CV details.</p>
<h2>Adding Your Custom Font With CSS3</h2>
<p>Move your desired font to your desktop then go to &#8220;Font Squirrel&#8221; and convert your font into a &#8220;TrueType&#8221;, &#8220;EOT&#8221; and &#8220;SVG&#8221; file. These 3 types of fonts are needed for the custom font to work in our browsers.</p>
<p><a href="http://www.fontsquirrel.com/fontface/generator" target="_blank"><img src="http://www.hv-designs.co.uk/tutorials/cv_code/step13.gif" border="0" alt="Font Squirrel" width="600" height="400" /></a></p>
<p>Once you&#8217;ve converted the font move the 3 files into your fonts folder. Open your CSS file then add the @fontface code to the top.</p>
<p>[sourcecode language="css"]<br />
@font-face {<br />
font-family: &#8216;MyriadProRegular&#8217;;<br />
src: url(&#8216;myriadpro.eot&#8217;);<br />
src: local(&#8216;Myriad Pro&#8217;), local(&#8216;fonts&#8217;), url(&#8216;myriadpro.ttf&#8217;) format(&#8216;truetype&#8217;), url(&#8216;myriadpro.svg#MyriadPro-Regular&#8217;) format(&#8216;svg&#8217;);<br />
}<br />
[/sourcecode]</p>
<p>Also inside your CSS file add the font family to your &#8220;page&#8221; DIV.</p>
<p>[sourcecode language="css"]<br />
font-family: MyriadProRegular, Verdana, Arial;<br />
[/sourcecode]</p>
<p>Test your template in your browser and see how it looks. I&#8217;ll be releasing the template for download soon along with the PSD file.</p>
<p>Take care and thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2010/04/11/digital-curriculum-vitae-psd-conversion/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>Personal vCard Pt.2</title>
		<link>http://www.hv-designs.co.uk/2010/02/07/learn-how-to-code-a-personal-vcard-layout/</link>
		<comments>http://www.hv-designs.co.uk/2010/02/07/learn-how-to-code-a-personal-vcard-layout/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 21:09:04 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=2167</guid>
		<description><![CDATA[Hello everybody welcome to the second part of the vCard layout tutorial. In today&#8217;s tutorial we&#8217;ll be converting the vCard into a 4 page template, if you haven&#8217;t already id download the free PSD file i released earlier OR feel free to follow along with your own PSD FILE. Setting Up Our Local Files Create [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody welcome to the second part of the vCard layout tutorial. In today&#8217;s tutorial we&#8217;ll be converting the vCard into a 4 page template, if you haven&#8217;t already id download the free PSD file i released earlier OR feel free to follow along with your own PSD FILE.</p>
<p><span id="more-2167"></span></p>
<h2>Setting Up Our Local Files</h2>
<p>Create a new folder on your hard drive labeled &#8220;vCard&#8221;, inside the folder called &#8220;vCard&#8221; create two more folders &#8220;images&#8221; and &#8220;stylesheets&#8221;.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step1.gif" alt="vCard Part Two" width="600" height="444" /></p>
<p>Inside the stylesheets folder create 3 separate CSS files with the following names. &#8220;ie.css&#8221;, &#8220;reset.css&#8221; and &#8220;styles.css&#8221;. </p>
<p>You can easily create CSS files using notepad, just open up a blank notepad document and save it as &#8220;filename.css&#8221; inside the stylesheets folder. Alternatively you can probably use your favorite code editor.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step2.gif" alt="vCard Part Two" width="600" height="245" /></p>
<p>Finally in your favorite code editor create a blank HTML document called &#8220;index.html&#8221;, save the HTML file inside the main folder with your two folders.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step3.gif" alt="vCard Part Two" width="600" height="400" /></p>
<h2>Linking Our Stylesheets</h2>
<p>Inside your HTML file add your own personal title within the &#8220;TITLE&#8221; tags.</p>
<p>[sourcecode language="html"]<br />
&lt;title&gt;Personal vCard &#8211; HV-DESIGNS.CO.UK By Richard Carpenter&lt;/title&gt;<br />
[/sourcecode]</p>
<p>Next we need to link our stylesheets the first one we&#8217;ll link will be our main one &#8220;styles.css&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;link href=&quot;stylesheets/styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
[/sourcecode]</p>
<p>The next stylesheet will be our internet explorer specific stylesheet &#8220;ie.css&#8221;, we&#8217;ll link this stylesheet using a conditional statement. Basically the way it works is if someone browses the site using internet explorer 7 then the elements within the &#8220;ie.css&#8221; stylesheet will become active.</p>
<p>[sourcecode language="html"]<br />
&lt;!&#8211;[if IE 7]&gt;<br />
&lt;link href=&quot;stylesheets/ie.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;![endif]&#8211;&gt;<br />
[/sourcecode]</p>
<p>We have one more style sheet to link (reset.css), but we wont link the stylesheet within the HTML file. Instead the stylesheet will be imported into our &#8220;styles.css&#8221;. Open up your &#8220;styles.css&#8221; stylesheet, at the top add the following code.</p>
<p>[sourcecode language="css"]<br />
@import url(&quot;reset.css&quot;);<br />
[/sourcecode]</p>
<h2>Drafting Some Div&#8217;s</h2>
<p>Inside the &#8220;BODY&#8221; tag of your HTML document start off with a DIV of &#8220;container&#8221;, this DIV will be our main box which will contain all our website elements.</p>
<p>[sourcecode language="html"]<br />
&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
[/sourcecode]</p>
<p>We now need to add 3 more DIV&#8217;s which will make up our layout, because the way our layout is designed we can&#8217;t make the framework using CSS. So instead we&#8217;ll be using 3 separate images.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step4.gif" alt="vCard Part Two" width="600" height="349" /></p>
<p>The first DIV will contain our top rounded corners, the middle DIV will be our main DIV where we add all our content, the middle DIV will also contain a 1 pixel background image which will repeat over and over again. Finally the last DIV will contain our bottom rounded corners and reflection.</p>
<p>We draft the DIV&#8217;s out like this.</p>
<p>[sourcecode language="html"]<br />
&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;</p>
<p>&lt;div id=&quot;vcard-top&quot;&gt;&lt;/div&gt;&lt;!&#8211;VCARD TOP ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;vcard-middle&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;VCARD MIDDLE ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;vcard-bottom&quot;&gt;&lt;/div&gt;&lt;!&#8211;VCARD BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
[/sourcecode]</p>
<h2>Slicing Our Main Images</h2>
<p>Open up your PSD file, hide your background layer then select the rectangular marquee tool and make a selection around the top half of your layout including some of the drop shadow. My selection is &#8220;856 pixels x 18 pixels&#8221;.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step5.gif" alt="vCard Part Two" width="600" height="193" /></p>
<p>Once you&#8217;ve made the selection and your happy with it go to &#8220;edit > copy merged&#8221;. Create a new document, the dimensions of the copied selection should automatically be inputted into the new document box.</p>
<p>Paste the selection into the new document, delete the background layer then save the document as &#8220;vcard_top.PNG&#8221; inside the images folder.</p>
<p>You need to do the steps listed above for every image your create unless stated otherwise. Remember the steps as i wont be repeating the steps for every image we slice.</p>
<p>Head back over to your original PSD document, select the rectangular marquee tool once again and a make a selection any where across the middle part of your layout. The selection should be equal width to the last image you created and the selection should contain the same amount of drop shadow.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step6.gif" alt="vCard Part Two" width="600" height="307" /></p>
<p>Once you&#8217;ve made the selection and your happy with it go to &#8220;edit > copy merged&#8221;. Create a new document, the dimensions of the copied selection should automatically be inputted into the new document box.</p>
<p>Paste the selection into the new document, delete the background layer then save the document as &#8220;vcard_middle.PNG&#8221; inside the images folder.</p>
<p>Finally repeat the steps above only this time for the bottom part of the layout including the reflection. Remember to include the same amount of drop shadow into the selection.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step7.gif" alt="vCard Part Two" width="600" height="350" /></p>
<p>Last but not least we need to slice our background image. Hide all the layout elements in your PSD file leaving the background layer un-hidden. Make a 1 pixel high selection spanning 850 pixels wide across the middle part of the radial gradient.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step8.gif" alt="vCard Part Two" width="600" height="305" /></p>
<p>Copy the selection then save it as &#8220;bg.PNG&#8221; inside the images folder.</p>
<h2>Bringing It Together With Some CSS</h2>
<p>Open up your &#8220;styles.css&#8221; file inside your code editor, the first tag we need to style is our body tag. The body tag contains all the contents of an HTML document, such as text, hyperlinks, images, tables, lists, etc.</p>
<p>Our body styles look like this.</p>
<p>[sourcecode language="css"]<br />
body {<br />
background-image: url(../images/bg.png);<br />
background-repeat: repeat-y;<br />
background-position: center;<br />
background-color: #D6D6D6;<br />
color: #9a9a9a;<br />
font-size: 12px;<br />
font-family: Verdana, Arial, Helvetica, sans-serif;<br />
}<br />
[/sourcecode]</p>
<p>We add our background image &#8220;bg.PNG&#8221; as our body background, we then repeat our background along the Y-Axis (vertically). For our background to be situated in the middle of our browser we need to set the background position to center. Finally we set our main background color, font color and font size.</p>
<p>The next DIV we add CSS styles to is our container DIV.</p>
<p>[sourcecode language="css"]<br />
#container {<br />
margin: auto;<br />
width: 856px;<br />
padding-top: 50px;<br />
}<br />
[/sourcecode]</p>
<p>Our container should have a width of 856 pixels the same as our images we created earlier. To center the layout in our browser we set our margins to auto, finally I&#8217;ve added 50 pixels of top padding which will push the layout down away from the top of the browser.</p>
<p>Finally we can add our CSS styles to the last 3 DIV&#8217;s. The reason why I&#8217;m showing all 3 together is because there basically all the same.</p>
<p>[sourcecode language="css"]<br />
#vcard-top {<br />
background-image: url(../images/vcard_top.png);<br />
background-repeat: no-repeat;<br />
float: left;<br />
height: 18px;<br />
width: 856px;<br />
}</p>
<p>#vcard-middle {<br />
background-image: url(../images/vcard_middle.png);<br />
background-repeat: repeat-y;<br />
float: left;<br />
width: 856px;<br />
}</p>
<p>#vcard-bottom {<br />
background-image: url(../images/vcard_bottom.png);<br />
background-repeat: no-repeat;<br />
float: left;<br />
height: 62px;<br />
width: 856px;<br />
}<br />
[/sourcecode]</p>
<p>For our 3 left over DIV&#8217;s we add our background images, the top and bottom DIV&#8217;s the background should be set to no repeat, where as the middle background we need it to repeat vertically. Each element is floated left and has a width and height that corresponds to the images we created earlier, apart from the &#8220;vcard-middle&#8221; DIV, there should be no height set as we want the DIV to expand with our content.</p>
<p>Test your layout inside your browser to see how it looks. Hopefully you should have something that looks like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step9.gif" alt="vCard Part Two" width="600" height="284" /></p>
<h2>Creating Our Sidebar And Content Div&#8217;s</h2>
<p>For use to add our sidebar elements and content we need to create two DIV&#8217;s inside the &#8220;vcard-middle&#8221; DIV. To determine the width and margins of each DIV we have to do some measuring in photoshop.</p>
<p>We need to measure from our drop shadow to the sidebar area.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step10.gif" alt="vCard Part Two" width="600" height="600" /></p>
<p>From the start of our drop shadow to the sidebar area is &#8220;15 pixels&#8221;, so we know that we need to add 15 pixels of left margin to our sidebar DIV. We now need to measure our actual sidebar area.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step11.gif" alt="vCard Part Two" width="600" height="600" /></p>
<p>Our sidebar area will need a width of 162 pixels. We create our DIV for the sidebar like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;vcard-middle&quot;&gt;</p>
<p>&lt;div id=&quot;sidebar&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;SIDEBAR ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;VCARD MIDDLE ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The styles for our sidebar DIV look like this.</p>
<p>[sourcecode language="css"]<br />
#sidebar {<br />
float: left;<br />
width: 162px;<br />
margin-left: 15px;<br />
}<br />
[/sourcecode]</p>
<p>We first float the DIV left so that the content DIV will align-up next to it. We then add our width of 162px and add a left margin of 15px. The sidebar DIV should now be perfectly aligned up.</p>
<p>We do exactly the same for the content area. We know there are three 1 pixel lines in between the sidebar and content area, so the margin for our content area will be 3 pixels.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step12.gif" alt="vCard Part Two" width="600" height="400" /></p>
<p>Next measure the content area but don&#8217;t include the right frame and drop shadow. Just measure to the end of the white area.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step13.gif" alt="vCard Part Two" width="600" height="302" /></p>
<p>Our content DIV HTML looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;vcard-middle&quot;&gt;</p>
<p>&lt;div id=&quot;sidebar&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;SIDEBAR ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;content&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;CONTENT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;VCARD MIDDLE ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The CSS for our content DIV looks like this.</p>
<p>[sourcecode language="css"]<br />
#content {<br />
float: left;<br />
width: 662px;<br />
margin-left: 3px;<br />
}<br />
[/sourcecode]</p>
<p>Your content area should now all be aligned up nicely, lets add some content.</p>
<h2>Creating The Sidebar Menu</h2>
<p>Inside the &#8220;sidebar&#8221; DIV create a simple unordered list with a class of navigation. Add the names for your links including the title attribute. Each list item you also have its own CLASS relating to that list link. Your list should look like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;sidebar&quot;&gt;<br />
&lt;ul class=&quot;navigation&quot;&gt;<br />
&lt;li class=&quot;about&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;About Me&quot;&gt;ABOUT&lt;/a&gt;&lt;/li&gt;<br />
&lt;li class=&quot;work&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;My Online Portfolio&quot;&gt;WORK&lt;/a&gt;&lt;/li&gt;<br />
&lt;li class=&quot;social&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;My Social Network&quot;&gt;SOCIAL&lt;/a&gt;&lt;/li&gt;<br />
&lt;li class=&quot;contact&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Contact Me&quot;&gt;CONTACT&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;SIDEBAR ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Before we start adding the styles for our navigation we first need to slice our icons, the hover state for our buttons and the little navigation dividers.</p>
<p>The way I&#8217;m going to style the navigation in this tutorial is going to be slightly different from all the rest of my tutorials, as in this tutorial we&#8217;ll be using sprites. The way it works is we have one big image of all the navigation buttons in there normal state and hover state. The image looks like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step14.gif" alt="vCard Part Two" width="600" height="120" /></p>
<p>The image can be either in vertical form or horizontal form, we can adjust the position of the background using CSS. Each button should be equal height and length, all mine are 162px 65px.</p>
<p>Lets add the CSS for our navigation.</p>
<p>[sourcecode language="css"]<br />
.navigation li {<br />
display: block;<br />
float: left;<br />
}<br />
[/sourcecode]</p>
<p>We&#8217;ll start with styling our list items. Each list item will be displayed as a block and floated left.</p>
<p>[sourcecode language="css"]<br />
.navigation li a {<br />
display: block;<br />
height: 65px;<br />
width: 162px;<br />
text-indent: -9999px;<br />
background-image: url(../images/nav_divider.png);<br />
background-repeat: repeat-x;<br />
background-position: bottom;<br />
}<br />
[/sourcecode]</p>
<p>Each list item link will also be displayed as a block and must have a width and height which match our buttons, which were 162px X 65px. I&#8217;ve added a text indent to shift our text descriptions off the page, the text descriptions will still be accessible by search engines.</p>
<p>We then add our navigation divider image as a background and repeat it horizontal (X axis), positioning the background at the bottom will ensure the background image is displayed at the bottom of each button.</p>
<p>[sourcecode language="css"]<br />
li.about, li.work, li.social, li.contact {<br />
background-image: url(../images/navigation.png);<br />
background-repeat: no-repeat;<br />
}<br />
[/sourcecode]</p>
<p>The above code adds our navigation &#8220;sprite&#8221; image as a background to each one of our list classes. We can merge styles that are the same saving space and loads times.</p>
<p>All&#8217;s we have to do now is adjust the background position on a list classes. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
li.about {<br />
background-position: left top;<br />
}</p>
<p>li.work {<br />
background-position: -162px top;<br />
}</p>
<p>li.social {<br />
background-position: -324px top;<br />
}</p>
<p>li.contact {<br />
background-position: right top;<br />
}<br />
[/sourcecode]</p>
<p>The math&#8217;s arn&#8217;t that hard too work out, we also style our hover states in the same way.</p>
<p>[sourcecode language="css"]<br />
li.about:hover {<br />
background-position: left bottom;<br />
}</p>
<p>li.work:hover {<br />
background-position: -162px bottom;<br />
}</p>
<p>li.social:hover {<br />
background-position: -324px bottom;<br />
}</p>
<p>li.contact:hover {<br />
background-position: right bottom;<br />
}<br />
[/sourcecode]</p>
<p>Test the navigation in your browser to see how it looks.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step15.gif" alt="vCard Part Two" width="600" height="400" /></p>
<h2>Adding Our Textual Content</h2>
<p>We&#8217;ll now add our text for our content area, all our text will go inside the &#8220;content&#8221; DIV. We&#8217;ll start off with our main title and slogan. We&#8217;ll start by creating an H1 tag with our title then we&#8217;ll add our slogan within the H1 tag wrapped inside a span class of slogan. The HTML looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;h1&gt;Richard Carpenter &lt;span class=&quot;slogan&quot;&gt;Front-End Web Developer&lt;/span&gt;&lt;/h1&gt;<br />
[/sourcecode]</p>
<p>On the next line underneath our H1 tag we&#8217;ll add an H2 tag with our welcome message.</p>
<p>[sourcecode language="html"]<br />
&lt;h1&gt;Richard Carpenter &lt;span class=&quot;slogan&quot;&gt;Front-End Web Developer&lt;/span&gt;&lt;/h1&gt;<br />
&lt;h2&gt;Hello, Welcome&#8230;&lt;/h2&gt;<br />
[/sourcecode]</p>
<p>To finish off the page we&#8217;ll add the rest of our text wrapped in P tags.</p>
<p>[sourcecode language="html"]<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet sem libero, vitae rhoncus orci. Suspendisse enim sem, iaculis a dapibus eleifend, laoreet vitae tellus. Cras vitae dignissim purus. Nunc mattis luctus eleifend. Aliquam vel felis risus. Quisque imperdiet gravida consequat. Fusce volutpat tortor ac lectus pellentesque congue. Integer non lacus non felis congue egestas vel et erat. Donec elit nunc, posuere in semper id, pharetra vitae dolor. Nam imperdiet, risus vel fringilla placerat, enim erat cursus lorem, sit amet vulputate ante sapien sed dolor.&lt;/p&gt;<br />
[/sourcecode]</p>
<p>The CSS for our H1, H2 and P tags look like this.</p>
<p>[sourcecode language="css"]<br />
h1 {<br />
font-size: 30px;<br />
color: #595858;<br />
text-align: center;<br />
letter-spacing: -2px;<br />
margin-top: 10px;<br />
margin-bottom: 20px;<br />
}</p>
<p>h2 {<br />
font-size: 16px;<br />
color: #4e4e4e;<br />
margin-bottom: 5px;<br />
}</p>
<p>span.slogan {<br />
color: #858585;<br />
font-size: 14px;<br />
vertical-align: middle;<br />
letter-spacing: -1px;<br />
}</p>
<p>#content p {<br />
text-align: justify;<br />
}<br />
[/sourcecode]</p>
<h2>Done</h2>
<p>Test your layout inside your browser, you should have something like the image below.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/vcard_pt2/step16.gif" alt="vCard Part Two" width="600" height="374" /></p>
<p>Still not convinced, you can view the live demo by clicking the image below. All that&#8217;s left for you to do now is create your additional pages which shouldn&#8217;t be too hard. Look out for the complete layout which il be giving away for free soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2010/02/07/learn-how-to-code-a-personal-vcard-layout/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Hosting Layout #2: Sitebuild Pt.2</title>
		<link>http://www.hv-designs.co.uk/2009/10/14/hosting-layout-2-sitebuild-pt2/</link>
		<comments>http://www.hv-designs.co.uk/2009/10/14/hosting-layout-2-sitebuild-pt2/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 16:28:39 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1726</guid>
		<description><![CDATA[PART TWO of the PSD sitebuild for Hosting Layout #2. If you havent already download the FREE PSD here. Welcome to part two, lets get started. Slicing And Marking-Up The Content Area The content area will be sliced and coded similar to the navigation, there will be top part, a middle part and a bottom [...]]]></description>
			<content:encoded><![CDATA[<p>PART TWO of the PSD sitebuild for <a href="http://hv-designs.co.uk/2009/10/02/hosting-layout-2/" title="Hosting Layout #2">Hosting Layout #2</a>. If you havent already download the FREE PSD <a href="http://hv-designs.co.uk/2009/10/05/hosting-layout-2-freebie/" title="Hosting Layout #2 FREE PSD FILE">here</a>.</p>
<p><span id="more-1726"></span></p>
<p>Welcome to part two, lets get started.</p>
<h2>Slicing And Marking-Up The Content Area</h2>
<p>The content area will be sliced and coded similar to the navigation, there will be top part, a middle part and a bottom part. The top and bottom parts will contain one image, while the middle part will contain a small image which will repeat over and over with the flow of content. </p>
<p>The only dis-advantage of doing it this way is the sidebar will always be as big as the content area, but because the layout has the 3D part seperating the sidebar from the content area, i dont see how else it can be done.</p>
<p>Open up your PSD file, then hide all sidebar and content text layers, leaving just the content box and sidebar. Select the rectangular marquee tool then make a selection around the top half of the main content area and also the sidebar.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step9.gif" alt="Step9" width="600" height="189" /></p>
<p>Repeat the same process for the bottom area, then save both images as &#8220;content_top.png&#8221; and content_bottom.png&#8221; inside the images folder, if both images are the same dimensions it will make life alot easier. Next, make a selection around the middle part of both the content and sidebar area. The selection doesnt need to be any bigger than 1 pixel high, just as long as its 900 pixel&#8217;s wide.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step10.gif" alt="Step10" width="600" height="230" /></p>
<p>In your HTML file create 3 class, &#8220;content-top&#8221;, &#8220;content-middle&#8221; and &#8220;content-bottom&#8221;. In the top and bottom classes insert your top and bottom images.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;content-top&quot;&gt;<br />
&lt;img src=&quot;images/content_top.png&quot; /&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;content-middle&quot;&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;content-bottom&quot;&gt;<br />
&lt;img src=&quot;images/content_bottom.png&quot; /&gt;<br />
&lt;/div&gt;<br />
[/sourcecode]</p>
<p>We can now add our CSS styles, because our top and bottom styles will be the same we can group our top and bottom set of styles just like we did on our navigation. Both styles should be floated left and have a fixed width and height which match the dimensions of the images. If your images are different dimensions you&#8217;ll have to seperate the styles.</p>
<p>For the middle class we do exactly the same only this time remove the fixed height and apply the content_middle.png image as a background. Finally the background should be repeated vertically.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; MAIN CONTENT IMAGES &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>.content-top, .content-bottom {<br />
	float: left;<br />
	height: 20px;<br />
	width: 900px;<br />
}</p>
<p>.content-middle {<br />
	background-image: url(../images/content_middle.png);<br />
	background-repeat: repeat-y;<br />
	float: left;<br />
	width: 900px;<br />
}<br />
[/sourcecode]</p>
<h2>Creating The Sidebar</h2>
<p>Now all our images are setup we can begin to add template content. All our content will be adding inside a DIV inside the content-middle class. We&#8217;ll start with the sidebar.</p>
<p>Inside the content-middle class create a new DIV called sidebar. Inside the DIV sidebar create an H2 tag with a class of plan, this is where we add our plan number (PlanOne). Around the number add a span class of &#8220;plan-color2&#8243;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;sidebar&quot;&gt;<br />
&lt;h2 class=&quot;plan&quot;&gt;Plan&lt;span class=&quot;plan-color2&quot;&gt;One&lt;/span&gt;&lt;/h2&gt;<br />
&lt;/div&gt;&lt;!&#8211;SIDEBAR ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Before we add the CSS for our sidebar elements we must first slice our little icons. Make a selection around the plan and list icons using the rectangular marquee tool.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step11.gif" alt="Step11" width="600" height="400" /></p>
<p>Save each icon in PNG format on transparent backgrounds inside the images folder. Now for the sidebar CSS.</p>
<p>Give the sidebar a fixed width of 229px, i know the size of the sidebar as it was measured in photoshop before hand. Add 10px padding all the way around the DIV then finally float the DIV left.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; LEFT CONTENT &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>#sidebar {<br />
	float: left;<br />
	width: 229px;<br />
	padding: 10px;<br />
}<br />
[/sourcecode]</p>
<p>The span class we added inside the H2 tag is just to change the color of the text. The 2H2 tag styles you should already be familar with so il move straight onto the the H2 class &#8220;plan&#8221;. In the class we need to add our little icon, we simply set it as a background then use padding to shift the text over away from the icon.</p>
<p>[sourcecode language="css"]<br />
span.plan-color2 {<br />
	color: #14a7ec;<br />
}</p>
<p>h2 {<br />
	font-size: 24px;<br />
	text-transform: capitalize;<br />
	color: #373737;<br />
	letter-spacing: -2px;<br />
	margin-bottom: 10px;<br />
}</p>
<p>h2.plan {<br />
	background-image: url(../images/plan_icon.png);<br />
	background-repeat: no-repeat;<br />
	padding-left: 40px;<br />
}<br />
[/sourcecode]</p>
<h2>Creating The Sidebar Plan Lists</h2>
<p>Before we attempt to style and code the sidebar plan lists, lets slice our final image from the PSD file, the learn more button. Slice the learn more button from the PSD file using the methods already explored, then save it inside the images folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step12.gif" alt="Step12" width="600" height="400" /></p>
<p>The HTML mark-up for the plan lists is quite easy, we first create an unorderlist with a class of &#8220;plan-list&#8221;, then add our individual list items (LI).</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;plan-list&quot;&gt;<br />
&lt;li&gt;100MB Webspace&lt;/li&gt;<br />
&lt;li&gt;1.5GB Bandwidth&lt;/li&gt;<br />
&lt;li&gt;15 Mailboxes&lt;/li&gt;<br />
&lt;li&gt;1 Database&lt;/li&gt;<br />
&lt;li&gt;1 Domain Name&lt;/li&gt;<br />
&lt;li&gt;24 Hour Support&lt;/li&gt;<br />
&lt;/ul&gt;<br />
[/sourcecode]</p>
<p>We can also add our learn more image inside the actual list, underneath th last list item create a new list item with a class of &#8220;learn-more&#8221;. Inside the learn more list item just insert the image using the normal image code. Finally, add a class of &#8220;learn-more-image&#8221; to the actual image.</p>
<p>[sourcecode language="html"]<br />
&lt;li class=&quot;learn-more&quot;&gt;&lt;img src=&quot;images/learn_more.png&quot; alt=&quot;Learn More&quot; class=&quot;learn-more-image&quot; /&gt;&lt;/li&gt;<br />
[/sourcecode]</p>
<p>The CSS for our list looks like this.</p>
<p>[sourcecode language="css"]<br />
ul.plan-list {<br />
	margin-top: 20px;<br />
}</p>
<p>.plan-list li {<br />
	background-image: url(../images/list_icon.png);<br />
	background-repeat: no-repeat;<br />
	padding-left: 20px;<br />
	border-bottom-width: 1px;<br />
	border-bottom-style: dotted;<br />
	border-bottom-color: #c7c7c7;<br />
	padding-bottom: 5px;<br />
	margin-bottom: 5px;<br />
	margin-top: 5px;<br />
	padding-top: 5px;<br />
	background-position: left center;<br />
}</p>
<p>li.learn-more {<br />
	background-image: none;<br />
	border-bottom-style: none;<br />
	margin-top: 20px;<br />
	margin-bottom: 20px;<br />
}</p>
<p>.learn-more-image {<br />
	float: right;<br />
}<br />
[/sourcecode]</p>
<p>We can now add as many lists as we like. Heres all 3 plans together.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;sidebar&quot;&gt;<br />
&lt;h2 class=&quot;plan&quot;&gt;Plan&lt;span class=&quot;plan-color2&quot;&gt;One&lt;/span&gt;&lt;/h2&gt;</p>
<p>&lt;ul class=&quot;plan-list&quot;&gt;<br />
&lt;li&gt;100MB Webspace&lt;/li&gt;<br />
&lt;li&gt;1.5GB Bandwidth&lt;/li&gt;<br />
&lt;li&gt;15 Mailboxes&lt;/li&gt;<br />
&lt;li&gt;1 Database&lt;/li&gt;<br />
&lt;li&gt;1 Domain Name&lt;/li&gt;<br />
&lt;li&gt;24 Hour Support&lt;/li&gt;<br />
&lt;li class=&quot;learn-more&quot;&gt;&lt;img src=&quot;images/learn_more.png&quot; alt=&quot;Learn More&quot; class=&quot;learn-more-image&quot; /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;h2 class=&quot;plan&quot;&gt;Plan&lt;span class=&quot;plan-color2&quot;&gt;Two&lt;/span&gt;&lt;/h2&gt;</p>
<p>&lt;ul class=&quot;plan-list&quot;&gt;<br />
&lt;li&gt;100MB Webspace&lt;/li&gt;<br />
&lt;li&gt;1.5GB Bandwidth&lt;/li&gt;<br />
&lt;li&gt;15 Mailboxes&lt;/li&gt;<br />
&lt;li&gt;1 Database&lt;/li&gt;<br />
&lt;li&gt;1 Domain Name&lt;/li&gt;<br />
&lt;li&gt;24 Hour Support&lt;/li&gt;<br />
&lt;li class=&quot;learn-more&quot;&gt;&lt;img src=&quot;images/learn_more.png&quot; alt=&quot;Learn More&quot; class=&quot;learn-more-image&quot; /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;h2 class=&quot;plan&quot;&gt;Plan&lt;span class=&quot;plan-color2&quot;&gt;Three&lt;/span&gt;&lt;/h2&gt;</p>
<p>&lt;ul class=&quot;plan-list&quot;&gt;<br />
&lt;li&gt;100MB Webspace&lt;/li&gt;<br />
&lt;li&gt;1.5GB Bandwidth&lt;/li&gt;<br />
&lt;li&gt;15 Mailboxes&lt;/li&gt;<br />
&lt;li&gt;1 Database&lt;/li&gt;<br />
&lt;li&gt;1 Domain Name&lt;/li&gt;<br />
&lt;li&gt;24 Hour Support&lt;/li&gt;<br />
&lt;li class=&quot;learn-more&quot;&gt;&lt;img src=&quot;images/learn_more.png&quot; alt=&quot;Learn More&quot; class=&quot;learn-more-image&quot; /&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;SIDEBAR ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<h2>Creating The Content Area</h2>
<p>As soon as the sidebar ends we can add another DIV called &#8220;main-content&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;main-content&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;MAIN CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside this DIV is where all our main content will go. The CSS looks like this.</p>
<p>[sourcecode language="css"]<br />
#main-content {<br />
	float: left;<br />
	width: 614px;<br />
	margin-left: 17px;<br />
	padding-right: 10px;<br />
	padding-left: 10px;<br />
	line-height: 20px;<br />
	text-align: justify;<br />
}<br />
[/sourcecode]</p>
<p>We float our DIV left which will bring it inline with the sidebar, we then need to add a left margin to push the content across away from the 3D part of the image. The content area has a fixed width, which was measured in photoshop, we then add padding to the left and right of the DIV to push the text away from the edges, top and bottom padding is not needed on the main content DIV as the top and bottom images provide a decent enough gap.</p>
<p>You should be able to add some paragraphs inside the &#8220;main-content&#8221; DIV and any other content you might want.</p>
<h2>Coding The Footer</h2>
<p>For the footer we need to create a DIV outside of the container area.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;<br />
&lt;p&gt;Copyright Yourwensite | All Rights Reserved&lt;/p&gt;<br />
&lt;p&gt;Design By &lt;a href=&quot;http://www.richard-carpenter.co.uk&quot;&gt;Richard Carpenter&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;FOOTER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>Once you&#8217;ve created the DIV add the following CSS styles.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; FOOTER &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>#footer {<br />
	clear: both;<br />
	margin-right: auto;<br />
	margin-bottom: auto;<br />
	margin-left: auto;<br />
	padding-top: 20px;<br />
	text-align: center;<br />
[/sourcecode]</p>
<p>For the footer to remain under the container we need to clear both floats. For the footer to remain in the middle of the browser we need to set left and right margins to auto, just like we did our container.</p>
<h2>Things Left To Do</h2>
<p>You should now have a complete layout, however there are some elements which still need to be styled things like, hyperlinks, headers 3 onwards and anything else you might want to add. Ive uploaded my coded version for you all to look at, take alook at the code and take alook at the CSS stylesheet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/10/14/hosting-layout-2-sitebuild-pt2/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Hosting Layout #2: Sitebuild Pt.1</title>
		<link>http://www.hv-designs.co.uk/2009/10/12/hosting-layout-2-sitebuild-pt1/</link>
		<comments>http://www.hv-designs.co.uk/2009/10/12/hosting-layout-2-sitebuild-pt1/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 14:00:12 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1720</guid>
		<description><![CDATA[Hello everybody as requested heres the PSD sitebuild for Hosting Layout #2. If you havent already download the FREE PSD here. Right lets get started Preparing Our Folders And Files Create a new folder on your desktop called &#8220;Hosting Layout&#8221;, inside this folder create another two new folders. Rename one folder &#8220;Stylesheets&#8221; and the other [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody as requested heres the PSD sitebuild for <a href="http://hv-designs.co.uk/2009/10/02/hosting-layout-2/" title="Hosting Layout #2">Hosting Layout #2</a>. If you havent already download the FREE PSD <a href="http://hv-designs.co.uk/2009/10/05/hosting-layout-2-freebie/" title="Hosting Layout #2 FREE PSD FILE">here</a>.</p>
<p><span id="more-1720"></span></p>
<p>Right lets get started</p>
<h2>Preparing Our Folders And Files</h2>
<p>Create a new folder on your desktop called &#8220;Hosting Layout&#8221;, inside this folder create another two new folders. Rename one folder &#8220;Stylesheets&#8221; and the other &#8220;Images&#8221;.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step1.gif" alt="Step1" width="600" height="350" /></p>
<p>Inside the folder &#8220;Stylesheets&#8221; create two empty CSS files, one called &#8220;styles.css&#8221; and another called &#8220;reset.css&#8221;. Inside the main directory create a blank HTML file called &#8220;index.html&#8221;.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step2.gif" alt="Step2" width="600" height="410" /></p>
<h2>Preparing Our HTML And CSS Files</h2>
<p>Open up your HTML file in your favourite code editor, il be using adobe dreamweaver. Inside your empty HTML file add the doctype, website title and link the styles.css stylesheet. The code should look something like this.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</p>
<p>&lt;title&gt;YOUR HOSTING &#8211; Template By Richard Carpenter | www.hv-designs.co.uk&lt;/title&gt;<br />
&lt;link href=&quot;stylesheets/styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</p>
<p>&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>Now open up the &#8220;reset.css&#8221; file in your code editor. Inside the &#8220;reset.css&#8221; file were going to add a global reset for the whole website, the reset im using is based upon the &#8220;<a href="http://developer.yahoo.com/yui" title="Yahoo! User Interface Library">Yahoo! User Interface Library</a>&#8220;.</p>
<p>[sourcecode language="css"]<br />
*, html, body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, label, fieldset, input, p, blockquote, th, td { margin:0; padding:0 }<br />
table { border-collapse:collapse; border-spacing:0 }<br />
fieldset, img { border:0 }<br />
address, caption, cite, code, dfn, em, strong, th, var { font-style:normal; font-weight:normal }<br />
ol, ul, li { list-style:none }<br />
caption, th { text-align:left }<br />
h1, h2, h3, h4, h5, h6 { font-size:100%; font-weight:normal }<br />
q:before, q:after { content:&#8221;}</p>
<p>/* Global reset-RESET */<br />
/* The below restores some sensible defaults */<br />
strong { font-weight: bold }<br />
em { font-style: italic }<br />
a img { border:none } /* Gets rid of IE&#8217;s blue borders */<br />
[/sourcecode]</p>
<p>Close the &#8220;reset.css&#8221; file as we won&#8217;t be needing it again. Now open up the &#8220;styles.css&#8221; file, at the very top of the file were going to import our &#8220;reset.css&#8221; file. We do this by adding the code below.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; ADDITIONAL STYLESHEETS &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>@import url(&quot;reset.css&quot;);<br />
[/sourcecode]</p>
<h2>Coding The PSD Background</h2>
<p>Now all our prep work has been done lets get down to business. Open up the hosting layout PSD file, then select the rectangular marquee tool. Scroll down to the very bottom of the canvas and make a rough selection.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step3.gif" alt="Step3" width="600" height="400" /></p>
<p>The size of the selection isn&#8217;t really that important hence why i said rough selection. Now you&#8217;ve made the selection go to &#8220;edit > copy merged&#8221;, then go to &#8220;file > new&#8221; (the dimensions should automatically be entered) then &#8220;edit > paste&#8221;. Save the file as &#8220;background.png&#8221; inside the images folder.</p>
<p>Inside the &#8220;styles.css&#8221; file create a style for the body tag, inside the style for the body tag enter the following styles.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; MAIN BODY &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>body {<br />
	font-family: Verdana, Arial, Helvetica, sans-serif;<br />
	font-size: 12px;<br />
	color: #898989;<br />
	background-image: url(../images/background.png);<br />
	background-repeat: repeat;<br />
	margin-top: 30px;<br />
	margin-bottom: 30px;<br />
}<br />
[/sourcecode]</p>
<p>Lets just go through the styles above, we first set our font family for our website, i used the font &#8220;verdana&#8221; mostly inside the PSD file so we&#8217;l set that our as primary font. We then add our font size of 12 pixels along with the primary color of our text.</p>
<p>The chunk of background we just copied from the PSD file we set as our background image then set the background to repeat. Finally we add a top and bottom margin to the body which in turn will give us a gap at the top and bottom of our layout, just like the PSD file.</p>
<h2>Coding The Website Title</h2>
<p>Head over to the PSD file, select the rectangular marquee tool then make a selection around the website title and slogan.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step4.gif" alt="Step4" width="600" height="400" /></p>
<p>Try and get the selection as close as possible. Before we copy and paste to a new document we need to hide the background layer, as we need the image to be on a transparent background. Once you&#8217;ve hid the background layer go to &#8220;edit > copy merged&#8221; then paste to a new document. Save the image as &#8220;title.png&#8221; inside the images folder.</p>
<p>Lets now mark-up some code in our HTML file. We start off with a &#8220;container DIV&#8221; which is what our site will be contained in.</p>
<p>[sourcecode language="html"]<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>Inside our &#8220;container DIV&#8221; we then add another DIV called &#8220;title&#8221;, inside the &#8220;DIV title&#8221; we insert our website title image.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;</p>
<p>&lt;div id=&quot;title&quot;&gt;<br />
&lt;a href=&quot;http://www.hompage.com&quot;&gt;&lt;img src=&quot;images/title.png&quot; alt=&quot;Website Title Here&quot; /&gt;&lt;/a&gt;<br />
&lt;/div&gt;&lt;!&#8211;TITLE ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Lets style the two DIV&#8217;s we just created. We&#8217;ll start with the &#8220;container DIV&#8221;, our website PSD was based upon the website being 900px wide, so we first set a width of 900px, we then want the website to be centered in our browser so we set our margin&#8217;s to auto. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; MAIN CONTAINER &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>#container {<br />
	margin: auto;<br />
	width: 900px;<br />
}<br />
[/sourcecode]</p>
<p>For our &#8220;title DIV&#8221; we need to create a fixed width and height, the dimensions for the width and height should be the same as our title image.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step5.gif" alt="Step5" width="600" height="400" /></p>
<p>The dimensions on your image might be slightly different compared to mine. We then float our DIV left and add a margin at the top of 2px. The margin at the top of 2px will bring the title DIV level with our navigation, you wont know this yet but i will as ive pre-coded my layout. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; TITLE &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>#title {<br />
	float: left;<br />
	height: 43px;<br />
	width: 250px;<br />
	margin-top: 2px;<br />
}<br />
[/sourcecode]</p>
<h2>Coding The Navigation</h2>
<p>Lets move onto the navigation bar, now because the navigation is rounded were going to have to slice the navigation into 3 seperate images. In your PSD file make a selection around the left side of the naviagtion.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step6.gif" alt="Step6" width="600" height="400" /></p>
<p>Copy the selection to a new document on a transparent background, then save the image as &#8220;nav_left.png&#8221; inside the images folder. Either repeat the same process for the right side of the navigation or just go to &#8220;image > rotate canvas > flip horizontally&#8221; then save the image again as &#8220;nav_right.png&#8221;. </p>
<p>For the middle part of the navigation we just need to make a small selection about 1 pixel wide, make sure the selection is the same height as the two left and right images.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step7.gif" alt="Step7" width="600" height="400" /></p>
<p>Save the middle slice as &#8220;nav-middle.png&#8221; inside the images folder. Right lets move onto marking up our navigation in our HTML file.</p>
<h2>The Navigation Mark-Up</h2>
<p>For our navigation we start off with a DIV called &#8220;navigation&#8221; inside this DIV we then add 3 classes. &#8220;navigation-left&#8221;, &#8220;navigation-middle&#8221; and &#8220;navigation-right&#8221;, the left and right classes will contain our rounded corners, while the middle will hold our content.</p>
<p>Inside the &#8220;navigation-middle&#8221; class add an unorder list (UL) with a class of &#8220;nav-links&#8221; then add your navigation items in list form. Give the very last list item a class of &#8220;no-divider&#8221;, the no-divider class will remove the bullet point from the very last link in the navigation.</p>
<p>In the left and right navigation classes insert your left and right images. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;navigation&quot;&gt;</p>
<p>&lt;div class=&quot;navigation-left&quot;&gt;<br />
&lt;img src=&quot;images/nav_left.png&quot; /&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;navigation-middle&quot;&gt;<br />
&lt;ul class=&quot;nav-links&quot;&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Homepage&quot;&gt;home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Hosting Plans&quot;&gt;hosting plans&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Support&quot;&gt;support&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Forum&quot;&gt;forum&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Members Login&quot;&gt;members login&lt;/a&gt;&lt;/li&gt;<br />
&lt;li class=&quot;no-divider&quot;&gt;&lt;a href=&quot;#&quot; title=&quot;Contact Us&quot;&gt;contact us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;navigation-right&quot;&gt;<br />
&lt;img src=&quot;images/nav_right.png&quot; /&gt;<br />
&lt;/div&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Before we add our styles for our navigation lets first slice the little bullet point between each link.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/hosting_layout2_css/step8.gif" alt="Step8" width="600" height="400" /></p>
<p>Save the little bullet point as &#8220;nav_divider.png&#8221; inside the images folder. Lets now add our navigation styles to our style sheet.</p>
<p>The first item we style will be our main navigation DIV. We start off by floating the DIV to the right then add a fixed height, the height of the navigation DIV should be the same height as our navigation slices. All my slices have a height of 49px, the code looks like this.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; NAVIGATION &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>#navigation {<br />
	float: right;<br />
	height: 49px;<br />
}</p>
<p>[/sourcecode]</p>
<p>We can now style our left, right and middle part of the navigation, now because we inserted the rounded corners as images into the HTML file we dont need to add them as backgrounds or anything in our CSS file, which also means the left and right class styles can be grouped together.</p>
<p>First we float our two classes left inside of our navigation DIV, we then add a fixed width and height which should be the same pixels as our left and right images. If your images are not the same width and height then id suggest you modify them so they are, it will make life much easier. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
.navigation-left, .navigation-right {<br />
	float: left;<br />
	height: 49px;<br />
	width: 18px;<br />
}<br />
[/sourcecode]</p>
<p>The middle class is very similar as the left and right styles, the only difference is we add our navigation middle image as a background and repeat it horizontally, the fixed width is also removed which will allow the navigation to expand with the amount of content that is added.</p>
<p>[sourcecode language="css"]<br />
.navigation-middle {<br />
	background-image: url(../images/nav_middle.png);<br />
	background-repeat: repeat-x;<br />
	float: left;<br />
	height: 49px;<br />
}<br />
[/sourcecode]</p>
<p>Lets now style our lists and hyperlinks. Each list element will be displayed as a block and floated left, the little bullet point image will be added as a background on each list, then the little bullet points background position will have to be adjusted to align in the middle of the navigation, the position should be set to the right and shifted down 22px.</p>
<p>We then remove the background style from the class &#8220;no-divider&#8221; which will remove the bullet point from the last navigation item.</p>
<p>[sourcecode language="css"]<br />
.nav-links li {<br />
	display: block;<br />
	float: left;<br />
	background-image: url(../images/nav_divider.png);<br />
	background-repeat: no-repeat;<br />
	background-position: right 22px;<br />
}</p>
<p>li.no-divider {<br />
	background-image: none;<br />
}<br />
[/sourcecode]</p>
<p>Finally we style navigation links and set the hover state of each link. The links will also be floated left and displayed as a block element, each link will have a height of 49px the same as our navigation DIV and images. We can seperate each link item by adding a left and right margin, adding some top padding will also push down our links to the middle of the navigation.</p>
<p>[sourcecode language="css"]<br />
.nav-links li a {<br />
	display: block;<br />
	float: left;<br />
	height: 49px;<br />
	margin-right: 15px;<br />
	margin-left: 15px;<br />
	padding-top: 16px;<br />
	color: #FFFFFF;<br />
	text-decoration: none;<br />
	text-transform: uppercase;<br />
	font-size: 11px;<br />
}</p>
<p>.nav-links li a:hover {<br />
	color: #004869;<br />
}</p>
<p>[/sourcecode]</p>
<h2>Coding The Featured Sentance</h2>
<p>In our PSD file we had a featured sentance, we&#8217;ll achieve the same look in CSS by using span classes. Start off by creating a DIV called &#8220;featured-text&#8221;, inside the DIV add your featured sentance wrapped in a H1 tag. Insert a span class of &#8220;featured-text2&#8243; on the words you want in a different color. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured-text&quot;&gt;<br />
&lt;h1&gt;&lt;span class=&quot;featured-text2&quot;&gt;Upgraded. Improved. Better. &lt;/span&gt;With more features than ever,<br />
our hosting packages are the best way to get your sites online.&lt;/h1&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The &#8220;featured-text DIV&#8221; will be floated left inside our container and will have a fixed width of 900px, no fixed height is set as we want the DIV to expand with the amount of content added. Finsh it off with a top and bottom margin of 40px which will provide a nice decent size gap between the sentance and the other content.</p>
<p>The H1 tag will contain our primary text color, size and font style, then the span class will will provide the additional styles for the blue bigger words. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
/*&#8212;&#8212;&#8212;&#8212;&#8212; FEATURED TEXT &#8212;&#8212;&#8212;&#8212;&#8212;*/</p>
<p>#featured-text {<br />
	float: left;<br />
	width: 900px;<br />
	margin-bottom: 40px;<br />
	margin-top: 40px;<br />
}</p>
<p>h1 {<br />
	text-align: center;<br />
	font-size: 24px;<br />
	font-style: italic;<br />
	color: #FFFFFF;<br />
}</p>
<p>span.featured-text2 {<br />
	font-size: 30px;<br />
	color: #14aff7;<br />
}<br />
[/sourcecode]</p>
<h2>Stay Tuned&#8230;</h2>
<p>Thats it for part one, look out for part two tomorrow, i suggest you subscribe VIA our RSS feeds if you havent already. I&#8217;ll look forward to all your comments, questions and part one results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/10/12/hosting-layout-2-sitebuild-pt1/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Web Design Layout #10: Sitebuild</title>
		<link>http://www.hv-designs.co.uk/2009/07/13/web-design-layout-10-sitebuild/</link>
		<comments>http://www.hv-designs.co.uk/2009/07/13/web-design-layout-10-sitebuild/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 19:05:44 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1495</guid>
		<description><![CDATA[Hello welcome to the web design layout sitebuild tutorial, today i&#8217;ll be taking you through the process of converting it into a one page template. You can download the template already coded by clicking the button above. You can also view a live version of the website by clicking here. Getting Started Before we even [...]]]></description>
			<content:encoded><![CDATA[<p>Hello welcome to the web design layout sitebuild tutorial, today i&#8217;ll be taking you through the process of converting it into a one page template.</p>
<p><span id="more-1495"></span></p>
<p>You can download the template already coded by clicking the button above. You can also view a live version of the website by <a href="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/live/index.html">clicking here</a>.</p>
<h2>Getting Started</h2>
<p>Before we even start diving into any HTML and CSS, lets create our files and its structure. On your desktop create a new folder and give it a name. Inside the folder create another folder called images. Also in the main folder create a blank HTML document called index.html and a blank CSS document called styles.css.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step1.gif" alt="Step1" width="600" height="450" /></p>
<h2>Mocking Up Our HTML</h2>
<p>We&#8217;ll start by adding a few DIV tags into our HTML document, so go ahead and load up your HTML file in your favourite code editor. Set your website title within the &#8220;title tag&#8221; then link your style sheet using the usual method.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step2.gif" alt="Step2" width="600" height="200" /></p>
<p>Inside the body area of our document create a DIV called &#8220;container&#8221;, everything for our website will be contained within this DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINER STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside our DIV &#8220;container&#8221; add 3 more DIV&#8217;s &#8220;navigation&#8221;, &#8220;title&#8221; and &#8220;featured&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;title&quot;&gt;&lt;!&#8211;TITLE STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;TITLE ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;featured&quot;&gt;&lt;!&#8211;FEATURED AREA STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED AREA ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The DIV navigation will contain our navigation elements, the title DIV will contain our website title and the featured DIV will contain our featured area.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step3.gif" alt="Step3" width="600" height="250" /></p>
<h2>Slicing Our Background</h2>
<p>There arn&#8217;t any seperate images for the navigation and our featured area, infact the navigation and the featured area is just a snippet and repeated over and over again. Open up the layout PSD in photoshop, using the rectangular marquee tool make an all in one selection covering the navigation bar and the featured area. Also note down the color code for the background using the eye dropper tool.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step4.gif" alt="Step4" width="600" height="534" /></p>
<p>Once you&#8217;ve made the selection go to &#8220;edit > copy merged&#8221;, then go to &#8220;file > new&#8221;. Once the new document dialog opens the selections dimensions you just copy merged should be automatically input into the width and height areas.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step5.gif" alt="Step5" width="551" height="336" /></p>
<p>The dimensions in the image above are the actual sizes used for the template image. Finally save the image as &#8220;bg.PNG&#8221; inside your images folder.</p>
<h2>Adding Some CSS</h2>
<p>Now we have a few DIV&#8217;s setup and our background image ready to rock &#8216;n&#8217; roll we can begin to add some CSS. Open up your CSS style sheet in your favourite code editor, inside the style sheet were going to add a simple reset, our body tag and then our DIV tags. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
* {<br />
	margin: 0px;<br />
	padding: 0px;<br />
}</p>
<p>body {<br />
	background-color: #f6f6f6;<br />
	background-image: url(images/bg.gif);<br />
	background-repeat: repeat-x;<br />
	font-family: Verdana, Arial, Helvetica, sans-serif;<br />
}</p>
<p>#container {<br />
	margin: auto;<br />
	width: 850px;<br />
}</p>
<p>#navigation {<br />
	float: left;<br />
	height: 68px;<br />
	width: 850px;<br />
}</p>
<p>#title {<br />
}</p>
<p>#featured {<br />
	float: left;<br />
	height: 223px;<br />
	width: 850px;<br />
}<br />
[/sourcecode]</p>
<p>Lets look at the styles in abit more detail. Our first style displayed by an asterix (*) is our simple CSS reset. There are many methods to apply a CSS reset, but for the sake of the beginners, i&#8217;ve chosen to use this following method. The reset just resets all padding and margins to 0.</p>
<p>The next style is our body tag, on this tag we set our website background image (bg.PNG), background color and font family. Make sure the background is repeated along the X-axis (horizontally).</p>
<p>We then have our container style, this ones real simple, the container need to have a auto margin, this will center our website, the container also has a width of 850 pixels this will be the width of website.</p>
<p>Our navigation DIV is floated left inside our container, it has a fixed width the same as our container and has a fixed height of 68px. The height was measured in photoshop.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step6.gif" alt="Step6" width="600" height="572" /></p>
<p>The title DIV style has been left empty for now as we need to slice up our image.</p>
<p>Finally we have our featured DIV, the same as our navigation it has a fixed width and height which was also measure in photoshop (down to the last pixel) again we also float the DIV left.</p>
<h2>Slicing Up Our Title</h2>
<p>For the website title make a selection 347 x 105 pixels using the rectangular marquee tool.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step7.gif" alt="Step7" width="600" height="200" /></p>
<p>Save the website title and slogan on a transparent background, save the file as &#8220;title.PNG&#8221;.</p>
<h2>Adding The Title Styles</h2>
<p>The styles for our title DIV are as follows.</p>
<p>[sourcecode language="css"]<br />
#title {<br />
	float: left;<br />
	height: 105px;<br />
	width: 850px;<br />
	background-image: url(images/title.png);<br />
	background-repeat: no-repeat;<br />
	background-position: left top;<br />
}<br />
[/sourcecode]</p>
<p>We float the DIV left and give it a fixed height (same dimesion as our title.PNG image). We also give the DIV a fixed width but its not going to be the same as our title.PNG image, instead it will be 850px same as our container. We&#8217;ll then add our image as a background, set it to no repeat and position it in the top left corner.</p>
<h2>Adding Our Navigation</h2>
<p>Now we have some basic foundations we can start adding in some of our elements starting with the navigation. The navigation is the same as any other, we present it in list form.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;portfolio&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;about&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;contact us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>There are of course two more slices we need to make to get the navigation working as intended. The first slice will be one of those little seperators (2 pixels by 68 pixels). The second slice will be the hover state on the home button, the selection on the hover state should be 1 pixel wide by the height of the navigation, we can then repeat the background in CSS.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step8.gif" alt="Step8" width="600" height="390" /></p>
<h2>Navigation CSS</h2>
<p>The navigation CSS looks like this,</p>
<p>[sourcecode language="css"]<br />
#navigation li {<br />
	display: block;<br />
	list-style-type: none;<br />
	float: left;<br />
	background-image: url(images/nav_seperator.gif);<br />
	background-repeat: no-repeat;<br />
	background-position: left;<br />
}</p>
<p>#navigation li a {<br />
	color: #666666;<br />
	font-weight: bold;<br />
	width: 108px;<br />
	height: 42px;<br />
	text-align: center;<br />
	text-transform: uppercase;<br />
	font-size: 12px;<br />
	padding-top: 26px;<br />
	float: left;<br />
	text-decoration: none;<br />
	margin-left: 2px;<br />
}</p>
<p>#navigation li a:hover {<br />
	background-image: url(images/nav_hover.gif);<br />
	background-repeat: repeat-x;<br />
	color: #0087c7;<br />
	margin-left: 2px;<br />
}<br />
[/sourcecode]</p>
<p>On each LI element we add our navigation seperator image with a background position of left. The list style type should be set to none this will remove the bullet points.</p>
<p>On the list links (a) we style everything to do with our text, we also need to add some sort of padidng to push the text down into the middle. We&#8217;ve added a fixed width and height, the width has gone by the longest word, again measured in photoshop. The height matches the navigation bar height just remember to take the padding into account as this also makes up the height.</p>
<p>Our hover style is pretty simple we just add our hover image as  background repeating along the X-axis. The left margin of 2 px pushes the background image away from our navigation dividers. This in turn makes the hover image load directly between them instead of covering them up.</p>
<h2>The Search Box</h2>
<p>The search bar ive decided to include inside the LI of the navigation. The search itself will be made up of 2 DIV&#8217;s, the left rounded side and the right rounded side.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step9.gif" alt="Step9" width="600" height="170" /></p>
<p>When i coded the layout to make things easier i removed the inner shadow within photoshop. Make your selection around the ends of the search form, each end should 21 x 40 pixels. The navigation code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;portfolio&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;about&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;contact us&lt;/a&gt;&lt;/li&gt;</p>
<p>&lt;li&gt;<br />
&lt;form action=&quot;&quot; class=&quot;form&quot; method=&quot;get&quot;&gt;</p>
<p>&lt;div id=&quot;search-left&quot;&gt;<br />
&lt;/div&gt;</p>
<p>&lt;input type=&quot;text&quot; class=&quot;search-field&quot; value=&quot;Search&quot; size=&quot;25&quot; /&gt;</p>
<p>&lt;div id=&quot;search-right&quot;&gt;<br />
&lt;/div&gt;</p>
<p>&lt;input name=&quot;submit&quot; type=&quot;image&quot; src=&quot;images/search_btn.png&quot; class=&quot;search-btn&quot; value=&quot;Go!&quot; /&gt;</p>
<p>&lt;/form&gt;<br />
&lt;/li&gt;</p>
<p>&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>So in our last LI tag we have a simple form with a class of &#8220;form&#8221;, we then have an empty DIV of search-left which will be our left search bar image. We then have our actual search field with class of &#8220;search-field&#8221;, underneath that we have our last DIV &#8220;search-right&#8221;, this will be our right search field image. Then finally we have our actual search button which you&#8217;ll also need to turn into a single image. The search button also has its own class assigned called &#8220;search-btn&#8221;. We can now style each element by using the following styles.</p>
<p>[sourcecode language="css"]<br />
.form {<br />
	float: left;<br />
	padding-left: 20px;<br />
	height: 54px;<br />
	padding-top: 14px;<br />
}</p>
<p>#search-left {<br />
	background-image: url(images/search_field_left.png);<br />
	background-repeat: no-repeat;<br />
	float: left;<br />
	height: 40px;<br />
	width: 21px;<br />
}</p>
<p>#search-right {<br />
	background-image: url(images/search_field_right.png);<br />
	background-repeat: no-repeat;<br />
	float: left;<br />
	height: 40px;<br />
	width: 21px;<br />
}</p>
<p>.search-field {<br />
	float: left;<br />
	background-color: #FFFFFF;<br />
	border-top-width: 1px;<br />
	border-bottom-width: 1px;<br />
	border-top-style: solid;<br />
	border-bottom-style: solid;<br />
	border-top-color: #d1d1d1;<br />
	border-bottom-color: #d1d1d1;<br />
	padding-top: 11px;<br />
	padding-bottom: 11px;</p>
<p>}</p>
<p>.search-btn {<br />
	float: left;<br />
}<br />
[/sourcecode]</p>
<p>Lets break each style down,</p>
<p>&#8220;.form&#8221; &#8211; Is the class we assigned to our form element or form container, we need to float this left to align it in the navigation. It has a fixed height of 68 pixels same as our navigation, remember the top padding also makes up the height. The left padding pushes the search form away from our last navigation button.</p>
<p>&#8220;#search-left &#038; #search-right&#8221; &#8211; These are our two DIV&#8217;s which contain our search end images which we sliced in photoshop, they both have a fixed width and height which matches the dimensions of the images. These elements are also floated left.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>&#8220;.search-field&#8221; &#8211; The search field class is style to replicate the photoshop version of the form, we add a 1pixel top and bottom solid border in the same color as our stroke. We must also set the background color to white and add sufficient padding.</p>
<h2>Mocking Up Our Featured Area</h2>
<p>Our featured contain&#8217;s two classes within our featured DIV.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step10.gif" alt="Step10" width="600" height="216" /></p>
<p>The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured&quot;&gt;&lt;!&#8211;FEATURED AREA STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-image&quot;&gt;&lt;!&#8211;FEATURED IMAGE STARTS&#8211;&gt;<br />
&lt;img src=&quot;images/featured_image.png&quot; alt=&quot;Featured Image&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED IMAGE ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-text&quot;&gt;&lt;!&#8211;FEATURED TEXT STARTS&#8211;&gt;</p>
<p>&lt;h2&gt;&lt;/h2&gt;<br />
&lt;p&gt;&lt;/p&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED AREA ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The class featured image contains our image within the featured area (without the white background/border). The class &#8220;featured-text&#8221; contains our title (H2) and a simple paragraph (P).</p>
<h2>Featured Area CSS</h2>
<p>Our CSS for the featured area looks like this.</p>
<p>[sourcecode language="css"]<br />
.featured-image {<br />
	float: left;<br />
	height: 206px;<br />
	width: 517px;<br />
}</p>
<p>.featured-image img {<br />
	background-color: #FFFFFF;<br />
	border: 1px solid #d9d9d9;<br />
	padding: 10px;<br />
}</p>
<p>.featured-text {<br />
	float: right;<br />
	width: 323px;<br />
	height: 206px;<br />
}</p>
<p>.featured-text p {<br />
	margin-top: 10px;<br />
}<br />
[/sourcecode]</p>
<p>Our feature image class has a fixed width and height which matches the dimensions of our image. Beware though as ther style underneath &#8220;.featured-image img&#8221; is also linked the featured-image class. You have to take into account when dealing with the fixed width and height that there is also 10px padding all the way around and image which increases the dimensions.</p>
<h2>Slicing Our Content Boxes</h2>
<p>Before we mockup our left and right content boxes we must slice our images, each box will contain 3 elements &#8220;top&#8221;, &#8220;middle&#8221; and &#8220;bottom&#8221;.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step11.gif" alt="Step11" width="600" height="314" /></p>
<p>When slicing the the right content box you may need to make it smaller as our website is 850 pixels wide where as the PSD is 1000 pixels wide. The actual sizes are listed on the image above.</p>
<h2>Mocking Up Our Content Boxes</h2>
<p>As mentioned above each box will have 3 elements top, middle and bottom. The top and bottom will be empty DIV&#8217;s but will contain our images top and bottom content box images. The middle will contain our content and our content box background image.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;left-content&quot;&gt;&lt;!&#8211;LEFT CONTENT STARTS&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 1 STARTS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;div class=&quot;left-top&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX TOP&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX TOP ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-middle&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-bottom&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 1 ENDS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;LEFT CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The CSS looks like this.</p>
<p>[sourcecode language="css"]<br />
#left-content {<br />
	float: left;<br />
	width: 349px;<br />
	margin-top: 20px;<br />
}</p>
<p>.left-top {<br />
	background-image: url(images/left_content_top.png);<br />
	background-repeat: no-repeat;<br />
	float: left;<br />
	height: 26px;<br />
	width: 349px;<br />
}</p>
<p>.left-middle {<br />
	background-image: url(images/left_content_middle.png);<br />
	background-repeat: repeat-y;<br />
	float: left;<br />
	width: 307px;<br />
	border-right-width: 1px;<br />
	border-left-width: 1px;<br />
	border-right-style: solid;<br />
	border-left-style: solid;<br />
	border-right-color: #d1d1d1;<br />
	border-left-color: #d1d1d1;<br />
	padding-right: 20px;<br />
	padding-left: 20px;<br />
}</p>
<p>.left-bottom {<br />
	background-image: url(images/left_content_bottom.png);<br />
	background-repeat: no-repeat;<br />
	float: left;<br />
	height: 26px;<br />
	width: 349px;<br />
	margin-bottom: 10px;<br />
}<br />
[/sourcecode]</p>
<p>Again everything has its own fixed width and height. The top and bottom classes fixed width and height are the same dimensions as our top and bottom images. The middle class is slightly different, when i sliced the middle image i didnt included the dark grey border, i decided to add it in using CSS.</p>
<h2>Adding More Left Boxes</h2>
<p>In the HTML code of the first left content box you should of noticed i put a big comment saying where the content box starts and ends. You just need to duplicate it whith the left content DIV. So 3 boxes would look like this.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;left-content&quot;&gt;&lt;!&#8211;LEFT CONTENT STARTS&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 1 STARTS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;div class=&quot;left-top&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX TOP&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX TOP ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-middle&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-bottom&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 1 ENDS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 2 STARTS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;div class=&quot;left-top&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX TOP&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX TOP ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-middle&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-bottom&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 2 ENDS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 3 STARTS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;div class=&quot;left-top&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX TOP&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX TOP ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-middle&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX MIDDLE ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;left-bottom&quot;&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT BOX BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;!&#8212;&#8212;&#8212;&#8211;BOX 3 ENDS&#8212;&#8212;&#8212;&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;LEFT CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<h2>Right Content Box</h2>
<p>The right content box is mocked up and coded the same way.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;right-content&quot;&gt;&lt;!&#8211;RIGHT CONTENT STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;right-top&quot;&gt;&lt;!&#8211;RIGHT CONTENT BOX TOP&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT CONTENT BOX TOP ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;right-middle&quot;&gt;&lt;!&#8211;RIGHT CONTENT BOX MIDDLE&#8211;&gt;<br />
&lt;h3&gt;&lt;/h3&gt;<br />
&lt;p&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT CONTENT BOX MIDDLE ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;right-bottom&quot;&gt;&lt;!&#8211;RIGHT CONTENT BOX BOTTOM&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT CONTENT BOX BOTTOM ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;RIGHT CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We wrap the whole block in a DIV called right-content. Inside this DIV we then add our 3 elements which make up our content box &#8220;top&#8221;, &#8220;middle&#8221; and &#8220;bottom&#8221;. All our content is adding inside the middle DIV. The CSS looks like this.</p>
<p>[sourcecode language="css"]<br />
#right-content {<br />
	float: right;<br />
	width: 480px;<br />
	margin-top: 20px;<br />
}</p>
<p>.right-top {<br />
	float: left;<br />
	height: 29px;<br />
	width: 480px;<br />
	background-image: url(images/right_content_top.png);<br />
	background-repeat: no-repeat;<br />
}</p>
<p>.right-middle {<br />
	background-image: url(images/right_content_middle.png);<br />
	background-repeat: repeat-y;<br />
	border-right-width: 1px;<br />
	border-left-width: 1px;<br />
	border-right-style: solid;<br />
	border-left-style: solid;<br />
	border-right-color: #d1d1d1;<br />
	border-left-color: #d1d1d1;<br />
	float: left;<br />
	width: 438px;<br />
	padding-right: 20px;<br />
	padding-left: 20px;<br />
}</p>
<p>.right-middle h3 {<br />
	margin-bottom: 10px;<br />
}</p>
<p>.right-bottom {<br />
	float: left;<br />
	height: 29px;<br />
	width: 480px;<br />
	background-image: url(images/right_content_bottom.png);<br />
	background-repeat: no-repeat;<br />
}<br />
[/sourcecode]</p>
<h2>The Footer</h2>
<p>For the footer i&#8217;m going to use the whole image instead of slicing the corners and having 3 parts. The layout isn&#8217;t really that graphics intensive, most of the graphics are small snipets which are repeated.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout_10_css/step12.gif" alt="Step12" width="600" height="114" /></p>
<p>The footer code is pretty simple its just a single DIV inside the container at the bottom of your website. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;FOOTER STARTS&#8211;&gt;<br />
&lt;p&gt;Copyright &amp;copy; yoursite.com | All Rights Reserved &#8211; Design By Richard Carpenter&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;FOOTER ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The CSS looks like this.</p>
<p>[sourcecode language="css"]<br />
#footer {<br />
	background-image: url(images/footer.png);<br />
	background-repeat: no-repeat;<br />
	float: left;<br />
	height: 88px;<br />
	width: 850px;<br />
	margin-top: 20px;<br />
}</p>
<p>#footer p {<br />
	color: #666666;<br />
	text-align: center;<br />
	padding-top: 35px;<br />
}<br />
[/sourcecode]</p>
<p>Thats it all done.</p>
<h2>Dont Forget&#8230;</h2>
<p>You can download the CSS template for free, have a play around with it, your free to edit as you want.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/07/13/web-design-layout-10-sitebuild/feed/</wfw:commentRss>
		<slash:comments>40</slash:comments>
		</item>
		<item>
		<title>Dark Layout #2: Sitebuild</title>
		<link>http://www.hv-designs.co.uk/2009/06/22/psd-to-html-dark-layout-2/</link>
		<comments>http://www.hv-designs.co.uk/2009/06/22/psd-to-html-dark-layout-2/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 12:13:06 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1448</guid>
		<description><![CDATA[Good evening welcome to another tutorial by the hv team, in todays tutorial il be showing you how to slice and dice the dark layout #2 PSD into a working template. Right lets get started, the first thing you need to do is create a new folder on your desktop called dark layout, inside this [...]]]></description>
			<content:encoded><![CDATA[<p>Good evening welcome to another tutorial by the hv team, in todays tutorial il be showing you how to slice and dice the dark layout #2 PSD into a working template.</p>
<p><span id="more-1448"></span></p>
<p>Right lets get started, the first thing you need to do is create a new folder on your desktop called dark layout, inside this folder you need three more folders &#8220;images&#8221;, &#8220;js&#8221; and &#8220;styles&#8221;. Inside the &#8220;styles&#8221; folder create two blank CSS files &#8220;style.css&#8221; and &#8220;ie.css&#8221;, then in the main folder create your blank HTML file &#8220;index.html&#8221;.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step1.gif" alt="Step1" width="456" height="448" /></p>
<p>The &#8220;js&#8221; folder will remain empty untill we come to our jquery jflow slider towards the end of the tutorial. The next part we need to tackle are our image slices, the first slice your going to need to make is for our background. (all images are .png files on a transparent backgrounds).</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step2.gif" alt="Step2" width="600" height="400" /></p>
<p>You dont need to slice a big part of the bits that will be repeated, you can use as little as a 1 pixel wide slice. Save the first slice as &#8220;bg.png&#8221;. The next slice is for our metal looking navigation bar, again the slice doesnt have to be massive as it will be repeated when we code our css.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step3.gif" alt="Step3" width="600" height="400" /></p>
<p>Also on our navigation bar we have our little seperators, your also going to need to slice one of these into a seperate image.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step4.gif" alt="Step4" width="600" height="400" /></p>
<p>Hide all your header elements in your layers pallette than make a selection around the whole of your header pattern, save the file as header_bg.png.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step5.gif" alt="Step5" width="600" height="240" /></p>
<p>We also have a pattern background in our featured area, hide all your featured elements and make a selection around your featured background, ideally the selection needs to end when the pattern disapears eles you will get unexpected lines in the background.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step6.gif" alt="Step6" width="600" height="221" /></p>
<p>If i wanted the content boxes to be rounded across all browser types id slice up our content boxes, but this time im not going to bother, instead il be rounding them off using CSS, the only trouble is some browsers do no support the border-radius style yet. So people using firefox, mozilla and safari will benifit from the rounded corners but everybody eles who isnt using them browser types will get square boxes. </p>
<p>The next slices we need to make are for our footer, we need to make two slices, the actual footer and the repeated background. We&#8217;ll start with the background that needs to be repeated.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step7.gif" alt="Step7" width="600" height="400" /></p>
<p>Then our actual footer box.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step8.gif" alt="Step8" width="600" height="400" /></p>
<p>Thats all the background slices taken care off we now need to start slicing some of the additional elements like our search submit button, our icons and our featured arrows. We&#8217;ll start with our search submit button.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step9.gif" alt="Step9" width="600" height="400" /></p>
<p>Our RSS button.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step10.gif" alt="Step10" width="600" height="400" /></p>
<p>We also need to slice both left and right arrow buttons on our featured slider.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step11.gif" alt="Step11" width="600" height="400" /></p>
<p>Our actual featured image for our featured slider. It might be a good idea to note the size of your background selection you made on the featured background mine was about 300px in height so really your featured images shouldnt exceed 300px in height.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step12.gif" alt="Step12" width="600" height="400" /></p>
<p>Now for our individual icons, try and keep the selection as tight as you can get it, also to make life easier make sure there icons are all the same width which means you may need to resize some by a traction or two. All mine are 39px wide.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step13.gif" alt="Step13" width="600" height="400" /></p>
<p>Also in ouor sidebar content box inbetween our list items we have a divider seperating each item, you will also need to slice that, dont slice it all you just need a fraction of it as it will be repeated horizontally via css when we code it.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step14.gif" alt="Step14" width="600" height="400" /></p>
<p>You should now have 17 images in your image folder, here&#8217;s a screenshot of my images folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step15.gif" alt="Step15" width="501" height="563" /></p>
<p>We can now start coding our layout, open up your html file and both css files into your code editor il be using dreamweaver. In the head of your html file link your stylesheet style.css, for the ie.css file we need to use some special code which looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;HV-Designs.co.uk &#8211; Dark Layout #2 PSD Sitebuild&lt;/title&gt;<br />
&lt;link href=&quot;styles/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</p>
<p>&lt;!&#8211;[if IE 7]&gt;<br />
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;styles/ie.css&quot; /&gt;<br />
&lt;![endif]&#8211;&gt;</p>
<p>&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>We can now begin to start mocking up our layout we&#8217;ll start with our header, logo, search and navigation.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step16.gif" alt="Step16" width="600" height="157" /></p>
<p>The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;HEADER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;LOGO STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LOGO ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;search&quot;&gt;&lt;!&#8211;SEARCH STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;SEARCH ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;HEADER ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Our css looks like this, please refer to the commented code next to each style.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-MAIN BODY STYLES&#8212;&#8212;&#8212;- */</p>
<p>* {<br />
	margin: 0px; /*SETS 0 MARGIN*/<br />
	padding: 0px; /*SETS 0 PADDING*/<br />
}</p>
<p>body {<br />
	color: #bababa; /*MAIN WEBSITE TEXT COLOR*/<br />
	font-family: Verdana, Arial, Helvetica, sans-serif; /*SIZE OF TEXT 0.69EM = 11PX*/<br />
	background-image: url(../images/bg.png); /*OUR BACKGROUND IMAGE*/<br />
	background-repeat: repeat-x; /*REPEATS BACKGROUND HORIZONTALLY*/<br />
	background-color: #000000; /*SETS THE COLOR OF OUR BACKGROUND WHEN THE BACKGROUND IMAGE COMES TO AN END*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-CONTAINER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#container {<br />
	width: 950px; /*MAXIMUM WIDTH OF OUR LAYOUT*/<br />
	margin-top: 13px; /*ADDS A TOP MARGIN TO THE TOP OF OUR CONTAINER*/<br />
	margin-right: auto; /*AUTO MARGIN*/<br />
	margin-left: auto; /*AUTO MARGIN*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-HEADER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#header {<br />
	float: left; /*FLOATS HEADER LEFT*/<br />
	height: 155px; /*ADDS A FIXED HEIGHT*/<br />
	width: 950px; /*ADDS A FIXED WIDTH, SHOULD BE SAME AS CONTAINER*/<br />
	background-image: url(../images/header_bg.png); /*OUR HEADER BACKGROUND IMAGE*/<br />
	background-repeat: no-repeat; /*STOPS HEADER BACKGROUND REPEATING */<br />
}</p>
<p>#logo {<br />
	float: left; /*FLOATS LOGO LEFT*/<br />
	margin-top: 45px; /*ADDS TOP MARGIN*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-HEADER SEARCH STYLES&#8212;&#8212;&#8212;- */</p>
<p>#search {<br />
	float: right; /*FLOATS SEARCH RIGHT*/<br />
	margin-top: 55px; /*ADDS TOP MARGIN*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-NAVIGATION STYLES&#8212;&#8212;&#8212;- */</p>
<p>#navigation {<br />
	float: left; /*FLOATS NAV LEFT*/<br />
	height: 45px; /*ADDS FIXED HEIGHT*/<br />
	width: 950px; /*ADDS FIXED WIDTH SAME AS OUR CONTAINER*/<br />
	background-image: url(../images/nav_bg.png); /*OUR NAV BACKGROUND IMAGE*/<br />
	background-repeat: repeat-x; /*REPEATS NAVIGATION BACKGROUND HORIZONTALLY*/<br />
}<br />
[/sourcecode]</p>
<p>When tested in your browser you should have something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step17.gif" alt="Step17" width="600" height="293" /></p>
<p>Now lets begin to add some of the elements to our header. We&#8217;ll start with our website title and slogan. Inside your logo div add a simple h1 tag with your website title, because on our PSD file one of the words are in bold we need to add a span tag with a class of bold to the word we want in bold. Underneath our h1 tag add a simple p tag with a class of slogan then your slogan inbetween. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;LOGO STARTS&#8211;&gt;<br />
&lt;h1&gt;your&lt;span class=&quot;bold&quot;&gt;website&lt;/span&gt;&lt;/h1&gt;<br />
&lt;p class=&quot;slogan&quot;&gt;fancy slogan here&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;LOGO ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We can now style these tags using our css. Add these styles to your stylesheet.</p>
<p>[sourcecode language="css"]<br />
h1 {<br />
	font-size: 36px; /*H1 FONT SIZE*/<br />
	color: #FFFFFF; /*H1 FONT COLOR*/<br />
	font-weight: normal; /*SETS FONT WEIGHT TO NORMAL*/<br />
	letter-spacing: -3px; /*DECREASES LETTER SPACING (the space between each letter)*/<br />
}</p>
<p>.slogan {<br />
	text-align: right; /*ALIGNS SLOGAN TEXT RIGHT*/<br />
	text-transform: capitalize; /*CAPITALIZES THE FIRST LETTER ON EACH WORD*/<br />
}</p>
<p>.bold {<br />
	font-weight: bold; /*ADDS BOLD FONT WEIGHT*/<br />
}<br />
[/sourcecode]</p>
<p>You should now have a your website title and slogan nicely presented on your template.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step18.gif" alt="Step18" width="600" height="293" /></p>
<p>Lets start building our search form, please note the search has to actually be connected up for it work, im just demonstrating the styling side. Inside your search div add a simple form with just a text field and submit button. On your submit button you&#8217;ll need to change the input type to &#8220;image&#8221; then add an addition attribute called &#8220;src&#8221; with the url to the button. Once you&#8217;ve done that add a class of search-field to the search field and a class of &#8220;search-btn&#8221; to the submit button, the code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;search&quot;&gt;&lt;!&#8211;SEARCH STARTS&#8211;&gt;<br />
&lt;form action=&quot;&quot; method=&quot;get&quot;&gt;<br />
&lt;input type=&quot;text&quot; class=&quot;search-field&quot; value=&quot;Search&#8230;&quot; size=&quot;35&quot; /&gt;&lt;input type=&quot;image&quot; class=&quot;search-btn&quot; value=&quot;Go&quot; src=&quot;images/search_btn.png&quot; /&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;&lt;!&#8211;SEARCH ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The css for our search field and button are.</p>
<p>[sourcecode language="css"]<br />
.search-field {<br />
	font-style: italic; /*SETS FONT TO ITALIC*/<br />
	color: #FFFFFF; /*SEARCH TEXT COLOR*/<br />
	border: 1px solid #2a2a2a; /*ADDS 1 PX BORDER IN COLOR SPECIFIED*/<br />
	background-color: #000000; /*CHANGES BACKGROUND COLOR IN SEARCH FIELD*/<br />
	padding: 7px; /*ADDS PADDING*/<br />
	margin-right: 10px; /*ADDS RIGHT MARGIN*/<br />
}</p>
<p>.search-btn {<br />
	vertical-align: top; /*CHANGES VERTICAL ALIGNMENT ON SEARCH BUTTON*/<br />
}<br />
[/sourcecode]</p>
<p>You should now have something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step19.gif" alt="Step19" width="600" height="293" /></p>
<p>Now for our navigation bar, we&#8217;ll start with a simple list creating each item in the list a block element. Each list item will also have our little seperator image after each link.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;ul class=&quot;nav-links&quot;&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;blog&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;work&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;forum&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;contact&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Here&#8217;s the css for our navigation.</p>
<p>[sourcecode language="css"]<br />
.nav-links li {<br />
	list-style-type: none; /*REMOVES BULLET POINTS FROM THE LIST*/<br />
	float: left; /*FLOATS LEFT*/<br />
	text-align: center; /*ALIGNS TEXT CENTER*/<br />
	letter-spacing: -1px; /*DECRESES LETTER SPACING*/<br />
	background-image: url(../images/seperator.png); /*SEPERATOR IMAGE*/<br />
	background-repeat: no-repeat; /*STOPS SEPERATOR REPEATING*/<br />
	background-position: right; /*ALIGNS THE SEPERATOR RIGHT OF EACH NAVIGATION LINK*/<br />
}</p>
<p>.nav-links li a {<br />
	text-decoration: none; /*REMOVES UNDERSCORE FROM LINK ITEMS*/<br />
	color: #000000; /*COLOR OF OUR NAVIGATION LINKS*/<br />
	text-transform: uppercase; /*TRANSFORMS NAVIGATION LINKS TO ALL CAPITAL LETTERS*/<br />
	font-size: 12px; /*ADDS FONT SIZE*/<br />
	display: block; /*DISPLAYS THE NAV LINKS AS A BLOCK ELEMENT*/<br />
	height: 29px; /*ADDS A FIXED HEIGHT TO NAV LINKS*/<br />
	width: 100px; /*ADDS A FIXED WIDTH TO NAV LINKS*/<br />
	padding-top: 15px; /*ADDS TOP PADDING TO EACH LINK*/<br />
}</p>
<p>.nav-links li a:hover {<br />
	color: #666666; /*COLOR OF LINK WHEN HOVERED*/<br />
}<br />
[/sourcecode]</p>
<p>Also on our navigation in our PSD file we had a little rss icon on the right of the navigation, we can create that the same we did our navigation above.</p>
<p>[sourcecode language="html"]<br />
&lt;ul class=&quot;rss&quot;&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/rss_icon.png&quot; alt=&quot;Subscribe Via RSS&quot; /&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The css for our rss icon is similar too.</p>
<p>[sourcecode language="css"]<br />
.rss li {<br />
	list-style-type: none; /*REMOVES BULLET POINTS FROM THE LIST*/<br />
	float: right; /*FLOATS RSS LINKS RIGHT*/<br />
	margin-right: 10px; /*ADDS RIGHT MARGIN*/<br />
	margin-top: 5px; /*ADDS TOP MARGIN*/<br />
}</p>
<p>.rss li img {<br />
	border: none; /*REMOVES BORDER FROM IMAGE*/<br />
}<br />
[/sourcecode]</p>
<p>You should now have something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step20.gif" alt="Step20" width="600" height="293" /></p>
<p>Thats the header part of our website done, lets move onto our featured area. We&#8217;ll mock the featured area up like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step21.gif" alt="Step21" width="600" height="197" /></p>
<p>The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured-area&quot;&gt;&lt;!&#8211;FEATURED AREA STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-left&quot;&gt;&lt;!&#8211;LEFT ARROW START&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT ARROW END&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-content&quot;&gt;&lt;!&#8211;FEATURED CONTENT STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-text&quot;&gt;&lt;!&#8211;FEATURED TEXT STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED CONTENT ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-right&quot;&gt;&lt;!&#8211;RIGHT ARROW STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT ARROW END&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED AREA ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The css for the code above looks like this.</p>
<p>[sourcecode language="css"]<br />
#featured-area {<br />
	background-repeat: no-repeat; /*STOPS BACKGROUND REPEATING*/<br />
	background-image: url(../images/content_bg.png); /*ADDS OUR CONTENT BACKGROUND IMAGE*/<br />
	float: left; /*ADDS A FIXED HEIGHT*/<br />
	width: 950px; /*ADDS A FIXED WIDTH*/<br />
	margin-bottom: 20px; /*ADDS BOTTOM MARGIN*/<br />
} </p>
<p>.featured-control-left {<br />
	float: left; /*FLOATS LEFT*/<br />
	height: 170px; /*ADDS A FIXED HEIGHT*/<br />
	width: 33px; /*ADDS A FIXED WIDTH*/<br />
	padding-top: 130px; /*ADDS TOP PADDING*/<br />
}</p>
<p>.featured-text {<br />
	float: right; /*FLOATS RIGHT*/<br />
	width: 425px; /*ADDS A FIXED WIDTH*/<br />
	height: 260px; /*ADDS A FIXED HEIGHT*/<br />
	padding-top: 40px; /*ADDS TOP PADDING*/<br />
	padding-right: 20px; /*ADDS RIGHT PADDING*/<br />
}</p>
<p>.featured-content {<br />
	float: left; /*FLOATS LEFT*/<br />
	height: 300px; /*ADDS A FIXED HEIGHT*/<br />
	width: 884px; /*ADDS A FIXED WIDTH*/<br />
}</p>
<p>.featured-control-right {<br />
	float: right; /*FLOATS RIGHT*/<br />
	height: 170px; /*ADDS A FIXED HEIGHT*/<br />
	width: 33px; /*ADDS A FIXED WIDTH*/<br />
	padding-top: 130px; /*ADDS PADDING TOP*/<br />
}<br />
[/sourcecode]</p>
<p>You should now have some solid foundations for your featured area, lets insert some of our graphic elements. Inside the div&#8217;s featured-control-right and featured-control-left insert your arrow icons.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured-area&quot;&gt;&lt;!&#8211;FEATURED AREA STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-left&quot;&gt;&lt;!&#8211;LEFT ARROW START&#8211;&gt;<br />
&lt;img src=&quot;images/left_arrow.png&quot; alt=&quot;Slide Left&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT ARROW END&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-content&quot;&gt;&lt;!&#8211;FEATURED CONTENT STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-text&quot;&gt;&lt;!&#8211;FEATURED TEXT STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED CONTENT ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-right&quot;&gt;&lt;!&#8211;RIGHT ARROW STARTS&#8211;&gt;<br />
&lt;img src=&quot;images/right_arrow.png&quot; alt=&quot;Slide Right&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT ARROW END&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED AREA ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Underneath the class &#8220;featured-content&#8221; insert your featured image. Insde the class &#8220;featured-text&#8221; add a h2 tag with a header then add a paragraph wrapped in a p tag.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured-area&quot;&gt;&lt;!&#8211;FEATURED AREA STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-left&quot;&gt;&lt;!&#8211;LEFT ARROW START&#8211;&gt;<br />
&lt;img src=&quot;images/left_arrow.png&quot; alt=&quot;Slide Left&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT ARROW END&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-content&quot;&gt;&lt;!&#8211;FEATURED CONTENT STARTS&#8211;&gt;</p>
<p>&lt;img src=&quot;images/featured_image01.png&quot; alt=&quot;Featured Image 01&quot; /&gt;</p>
<p>&lt;div class=&quot;featured-text&quot;&gt;&lt;!&#8211;FEATURED TEXT STARTS&#8211;&gt;</p>
<p>&lt;h2&gt;lorem ipsum dolor&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim.&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED CONTENT ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-right&quot;&gt;&lt;!&#8211;RIGHT ARROW STARTS&#8211;&gt;<br />
&lt;img src=&quot;images/right_arrow.png&quot; alt=&quot;Slide Right&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT ARROW END&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED AREA ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>You now need to add some addtional styles in your style sheet, because we&#8217;ve added an image into the featured area we need to make sure that no browser adds a border to it, we also need to style our h2 tag.</p>
<p>[sourcecode language="css"]<br />
h2 {<br />
	color: #FFFFFF; /*H2 FONT COLOR*/<br />
	text-transform: uppercase; /*TRANSFORMS TEXT TO UPPERCASE*/<br />
	font-size: 18px; /*H2 FONT SIZE*/<br />
}</p>
<p>.featured-content img {<br />
	margin-left: 20px; /*ADDS A LEFT MARGIN*/<br />
	margin-right: 20px; /*ADDS A RIGHT MARGIN*/<br />
	float: left; /*FLOATS LEFT*/<br />
}<br />
[/sourcecode]</p>
<p>Your featured area should now look something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step22.gif" alt="Step22" width="600" height="293" /></p>
<p>We&#8217;ll add our jquery slider towards the end of the tutorial. The wireframe for our content boxes is really easy, we just create two classes &#8220;left-content&#8221; and &#8220;right-content&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;left-content&quot;&gt;&lt;!&#8211;LEFT CONTENT STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT CONTENT ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;right-content&quot;&gt;&lt;!&#8211;RIGHT CONTENT ENDS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The styles for these classes are as follows.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-LEFT CONTENT STYLES&#8212;&#8212;&#8212;- */</p>
<p>.left-content {<br />
	float: left; /*FLOATS LEFT CONTENT BOX LEFT*/<br />
	width: 560px; /*ADDS A FIXED WIDTH*/<br />
	-moz-border-radius: 15px; /*ADDS A BORDER RADIUS (applys to Mozilla/Firefox and Safari 3 users ONLY)*/<br />
	-webkit-border-radius: 15px; /*ADDS A BORDER RADIUS (applys to Mozilla/Firefox and Safari 3 users ONLY)*/<br />
	background-color: #0a0a0a; /*LEFT CONTENT BACKGROUND COLOR*/<br />
	border: 1px solid #181818; /*LEFT CONTENT 1 PX BORDER AND BORDER COLOR*/<br />
	padding: 20px; /*ADDS PADDING ALL THE WAY AROUND*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-RIGHT CONTENT STYLES&#8212;&#8212;&#8212;- */</p>
<p>.right-content {<br />
	float: right; /*FLOATS RIGHT CONTENT BOX RIGHT*/<br />
	width: 290px; /*ADDS FIXED WIDTH*/<br />
	-moz-border-radius: 15px; /*ADDS A BORDER RADIUS (applys to Mozilla/Firefox and Safari 3 users ONLY)*/<br />
	-webkit-border-radius: 15px; /*ADDS A BORDER RADIUS (applys to Mozilla/Firefox and Safari 3 users ONLY)*/<br />
	background-color: #0a0a0a; /*RIGHT CONTENT BACKGROUND COLOR*/<br />
	border: 1px solid #181818; /*RIGHT CONTENT 1 PX BORDER AND BORDER COLOR*/<br />
	padding: 20px; /*ADDS PADDING ALL THE WAY AROUND*/<br />
}<br />
[/sourcecode]</p>
<p>Included in the styles above are the css styles for border-radius which makes the corners on your content boxes round, as stated in the comments it only applys to Mozilla/Firefox and Safari 3 users ONLY every other browser will see square corners. Inside our left-content box were just going to add some simple paragraphs with a h2 tag.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;left-content&quot;&gt;&lt;!&#8211;LEFT CONTENT STARTS&#8211;&gt;</p>
<p>&lt;h2&gt;lorem ipsum dolor&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim.&lt;/p&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim.&lt;/p&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim. Integer cursus elementum nunc in convallis. Praesent condimentum justo vel nunc vestibulum vitae vehicula purus dignissim.&lt;/p&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;LEFT CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Our h2 tag is already styled in the style sheet but our p tags aren&#8217;t so add these simple styles in your style sheet.</p>
<p>[sourcecode language="css"]<br />
p {<br />
	font-size: 12px; /*TEXT FONT SIZE*/<br />
	line-height: 22px; /*TEXT LINE HEIGHT*/<br />
	text-align: justify; /*JUSTIFYS OUR PARAGRAPHS*/<br />
	margin: 5px 0 10px;  /*ADDS TOP MARGIN OF 5PX AND BOTTOM MARGIN OF 10PX NO MARGIN LEFT OR RIGHT*/<br />
	padding: 0; /*ADDS NO PADDING*/<br />
}<br />
[/sourcecode]</p>
<p>Our right content box looks tricky to really it isnt, for our right-content box we just create a simple list, each list item will have its very own class, the code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;right-content&quot;&gt;&lt;!&#8211;RIGHT CONTENT ENDS&#8211;&gt;</p>
<p>&lt;ul class=&quot;right-content-list&quot;&gt; &lt;!&#8211;RIGHT CONTENT LIST STARTS&#8211;&gt;</p>
<p>&lt;li class=&quot;lock&quot;&gt;&lt;!&#8211;LOCK ICON STARTS&#8211;&gt;<br />
&lt;h3&gt;lorem ipsum dolor&lt;/h3&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante.&lt;/p&gt;<br />
&lt;/li&gt;&lt;!&#8211;LOCK ICON ENDS&#8211;&gt;</p>
<p>&lt;li class=&quot;cog&quot;&gt;&lt;!&#8211;COG ICON STARTS&#8211;&gt;<br />
&lt;h3&gt;lorem ipsum dolor&lt;/h3&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante.&lt;/p&gt;<br />
&lt;/li&gt;&lt;!&#8211;COG ICON ENDS&#8211;&gt;</p>
<p>&lt;li class=&quot;coins&quot;&gt;&lt;!&#8211;COINS ICON STARTS&#8211;&gt;<br />
&lt;h3&gt;lorem ipsum dolor&lt;/h3&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante.&lt;/p&gt;<br />
&lt;/li&gt;&lt;!&#8211;COINS ICON ENDS&#8211;&gt;</p>
<p>&lt;li class=&quot;mail&quot;&gt;&lt;!&#8211;MAIL ICON STARTS&#8211;&gt;<br />
&lt;h3&gt;lorem ipsum dolor&lt;/h3&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit risus, in pretium dolor. Nullam egestas lacus ante.&lt;/p&gt;<br />
&lt;/li&gt;&lt;!&#8211;MAIL ICON ENDS&#8211;&gt;</p>
<p>&lt;/ul&gt;&lt;!&#8211;RIGHT CONTENT LIST ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;RIGHT CONTENT ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We then style out list as normal but with a few extra styles for our list classes.</p>
<p>[sourcecode language="css"]<br />
.right-content-list li {<br />
	list-style-type: none; /*REMOVES BULLET POINTS FROM THE LIST*/<br />
}</p>
<p>.right-content-list li p {<br />
	font-size: 11px; /*LIST P TAG FONT SIZE*/<br />
	line-height: 18px; /*LIST P TAG FONT LINE HEIGHT*/<br />
	background-image: url(../images/divider.png); /*OUR DIVIDER IMAGE UNDERNEATH EACH LIST*/<br />
	background-repeat: repeat-x; /*REPEATS DIVIDER IMAGE HORIZONTALLY*/<br />
	background-position: bottom; /*PLACES THE DIVIDER AT THE BOTTOM OF THE P TAG*/<br />
	padding-bottom: 15px; /*ADDS PADDING TO THE BOTTOM OF THE P TAG IN THE LIST*/<br />
}</p>
<p>li.lock {<br />
	background-image: url(../images/lock_icon.png); /*OUR LOCK ICON*/<br />
	background-repeat: no-repeat; /*STOPS ICON REPEATING*/<br />
	background-position: left top; /*KEEPS THE ICON IN THE TOP LEFT CORNER*/<br />
	padding-left: 50px; /*ADDS LEFT PADDING*/<br />
}</p>
<p>li.cog {<br />
	background-image: url(../images/cog_icon.png); /*OUR COG ICON*/<br />
	background-repeat: no-repeat; /*STOPS ICON REPEATING*/<br />
	background-position: left top; /*KEEPS THE ICON IN THE TOP LEFT CORNER*/<br />
	padding-left: 50px; /*ADDS LEFT PADDING*/<br />
}</p>
<p>li.coins {<br />
	background-image: url(../images/coins_icon.png); /*OUR COINS ICON*/<br />
	background-repeat: no-repeat; /*STOPS ICON REPEATING*/<br />
	background-position: left top; /*KEEPS THE ICON IN THE TOP LEFT CORNER*/<br />
	padding-left: 50px; /*ADDS LEFT PADDING*/<br />
}</p>
<p>li.mail {<br />
	background-image: url(../images/mail_icon.png); /*OUR MAIL ICON*/<br />
	background-repeat: no-repeat; /*STOPS ICON REPEATING*/<br />
	background-position: left top; /*KEEPS THE ICON IN THE TOP LEFT CORNER*/<br />
	padding-left: 50px; /*ADDS LEFT PADDING*/<br />
}<br />
[/sourcecode]</p>
<p>Test your template in your browser and you should have something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/dark_layout_css/step23.gif" alt="Step23" width="600" height="517" /></p>
<p>Now for our footer, we want our footer to span across the browser just like our background/navigation does, to do this we need create our footer outside the container div.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;FOOTER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;footer-content&quot;&gt;&lt;!&#8211;FOOTER CONTENT STARTS&#8211;&gt;<br />
&lt;P&gt;copyright &amp;copy; yoursite.com | all rights reserved | design &amp;amp; coded by &lt;a href=&quot;http://www.richard-carpenter.co.uk&quot;&gt;richard carpenter&lt;/a&gt;&lt;/P&gt;<br />
&lt;/div&gt;&lt;!&#8211;FOOTER CONTENT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FOOTER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>The footer div is the background that will repeat across the browser, the footer-content div will be where our footer content goes. The css looks like this.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-FOOTER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#footer {<br />
	background-image: url(../images/footer_bg.png); /*ADDS OUR BACKGROUND IMAGE*/<br />
	background-repeat: repeat-x; /*REPEATS BACKGROUND HORIZONTALLY*/<br />
	clear: both; /*CLEARS BOTH FLOATS*/<br />
	height: 82px; /*ADDS A FIXED HEIGHT*/<br />
	background-position: bottom; /*PLACES BACKGROUND AT THE BOTTOM OF THE DIV*/<br />
}</p>
<p>#footer-content {<br />
	background-image: url(../images/footer_bg2.png); /*ADDS OUR BACKGROUND IMAGE*/<br />
	background-repeat: repeat-x; /*REPEATS BACKGROUND HORIZONTALLY*/<br />
	height: 82px; /*ADDS A FIXED HEIGHT*/<br />
	width: 950px; /*ADDS A FIXED WIDTTH*/<br />
	margin: auto; /*AUTO MARGIN CENTERS OUR FOOTER*/<br />
	background-position: bottom; /*PLACES BACKGROUND AT THE BOTTOM OF THE DIV*/<br />
}</p>
<p>#footer-content p {<br />
	text-transform: capitalize; /*TRANSFORMS THE FIRST LETTER IN EVERY WORD TO A CAPITAL LETTER*/<br />
	color: #000000; /*COLOR OF FOOTER TEXT*/<br />
	padding-top: 50px; /*ADDS TOP PADDING*/<br />
	padding-left: 20px; /*ADDS LEFT PADDING*/<br />
}<br />
[/sourcecode]</p>
<p>Your template should now be complete, there&#8217;s just some styles id recommend adding to get you started. We need to style our hyper links, h3 and h4 tags just incase you use them.</p>
<p>[sourcecode language="css"]<br />
a:link {<br />
	color: #333333; /*COLOR OF A LINK*/<br />
	text-decoration: none; /*REMOVES UNDERSCORE*/<br />
}<br />
a:visited {<br />
	text-decoration: none; /*REMOVES UNDERSCORE*/<br />
	color: #333333; /*COLOR OF A VISITED LINK*/<br />
}<br />
a:hover {<br />
	text-decoration: underline; /*ADDS UNDERSCORE*/<br />
	color: #666666; /*COLOR OF A HOVERED LINK*/<br />
}<br />
a:active {<br />
	text-decoration: none; /*REMOVES UNDERSCORE*/<br />
	color: #333333; /*COLOR OF A ACTIVE LINK*/<br />
}</p>
<p>h3 {<br />
	color: #FFFFFF; /*H3 FONT COLOR*/<br />
	text-transform: uppercase; /*TRANSFORMS TEXT TO UPPERCASE*/<br />
	font-size: 14px; /*H3 FONT SIZE*/<br />
	font-weight: normal; /*REMOVES BOLD*/<br />
}</p>
<p>h4 {<br />
	color: #FFFFFF; /*H4 FONT COLOR*/<br />
	text-transform: uppercase; /*TRANSFORMS TEXT TO UPPERCASE*/<br />
	font-size: 11px; /*H4 FONT SIZE*/<br />
}<br />
[/sourcecode]</p>
<p>There are also some styles you need to add to the &#8220;ie.css&#8221; file, the styles listed below are just minor fixes for items that dont quite lineup.</p>
<p>[sourcecode language="css"]<br />
/* INTERNET EXPLORER HACKS */</p>
<p>/* &#8212;&#8212;&#8212;-HEADER SEARCH STYLES&#8212;&#8212;&#8212;- */</p>
<p>.search-btn {<br />
	margin-top: 1px; /*ADDS A TOP MARGIN TO SEARCH BUTTON*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-FOOTER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#footer-content p {<br />
	padding-top: 45px; /*ADDS TOP PADDING*/<br />
}<br />
[/sourcecode]</p>
<p>Were now going to intergrate the jflow plugin for jquery on our featured area. The featured once done should slide across to any other items you wish to add in there. The first we need to do is download jflow and the jquery libary file, please note im using the jquery libary 1.2.6 NOT the new one as i had trouble with the latest libary. Link the files in the head of your document.</p>
<p>[sourcecode language="html"]<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;HV-Designs.co.uk &#8211; Dark Layout #2 PSD Sitebuild&lt;/title&gt;<br />
&lt;link href=&quot;styles/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;!&#8211;[if IE 7]&gt;<br />
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;styles/ie.css&quot; /&gt;<br />
&lt;![endif]&#8211;&gt;</p>
<p>&lt;script src=&quot;js/jquery-1.2.6.pack.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;<br />
&lt;script src=&quot;js/jquery.flow.1.1.min.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;</p>
<p>&lt;/head&gt;<br />
[/sourcecode]</p>
<p>Also inside the head section add this bit of javascript.</p>
<p>[sourcecode language="javascript"]<br />
&lt;script type=&quot;text/javascript&quot;&gt;<br />
$(function() {<br />
$(&quot;div#controller&quot;).jFlow({<br />
slides: &quot;#slides&quot;,<br />
width: &quot;950px&quot;,<br />
height: &quot;300px&quot;<br />
});<br />
});<br />
&lt;/script&gt;<br />
[/sourcecode]</p>
<p>The width and height should be set to the dimensions of the featured area, you will also notice the div &#8220;slides&#8221; you will need to ad this div into your featured area. Above the featured-area div add the jflow controller code.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;controller&quot; class=&quot;hidden&quot;&gt;<br />
&lt;span class=&quot;jFlowControl&quot;&gt;No 1&lt;/span&gt;<br />
&lt;span class=&quot;jFlowControl&quot;&gt;No 2&lt;/span&gt;<br />
&lt;span class=&quot;jFlowControl&quot;&gt;No 3&lt;/span&gt;<br />
&lt;/div&gt;<br />
[/sourcecode]</p>
<p>In your style sheet we need to an additional style which will hide our 2nd and third slides.</p>
<p>[sourcecode language="css"]<br />
.hidden {<br />
	display: none; /*hides our 2nd and 3rd featured images*/<br />
}<br />
[/sourcecode]</p>
<p>Underneath our featured-area div add a div id of slides then add an empty div.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured-area&quot;&gt;&lt;!&#8211;FEATURED AREA STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;slides&quot;&gt;</p>
<p>&lt;div&gt;&lt;!&#8211;SLIDE #1 STARTS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Dont forget to close the div at the bottom. Now everything inbetwwen the blank div and the end of the blank div will slide, for the slide to actually work though you need 3 slides in total. Make sure the 2nd and third slides all start and end with a blank div. I find it best just copy everything from the blank div to the closing blank div then edit the content accordingly. </p>
<p>For the buttons to work on the featured area you need to add the jflow classes to the buttons.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;featured-control-left&quot;&gt;&lt;!&#8211;LEFT ARROW START&#8211;&gt;<br />
&lt;img src=&quot;images/left_arrow.png&quot; class=&quot;jFlowPrev&quot; alt=&quot;Slide Left&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;LEFT ARROW END&#8211;&gt;</p>
<p>&lt;div class=&quot;featured-control-right&quot;&gt;&lt;!&#8211;RIGHT ARROW STARTS&#8211;&gt;<br />
&lt;img src=&quot;images/right_arrow.png&quot; class=&quot;jFlowNext&quot; alt=&quot;Slide Right&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;RIGHT ARROW END&#8211;&gt;<br />
[/sourcecode]</p>
<p>You can see a live work demo by clicking the button below.</p>
<p>Thats it hope you enjoyed this tutorial, any questions just give me a shout, dont forget to subscribe via rss and twitter, your help and support is much appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/06/22/psd-to-html-dark-layout-2/feed/</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Your PROject Pt.3: 4 Additional Pages</title>
		<link>http://www.hv-designs.co.uk/2009/05/26/your-project-4-additional-pages/</link>
		<comments>http://www.hv-designs.co.uk/2009/05/26/your-project-4-additional-pages/#comments</comments>
		<pubDate>Tue, 26 May 2009 10:51:22 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1382</guid>
		<description><![CDATA[Hello welcome to part 3 of the your PROject template. Today we&#8217;ll be creating 4 extra pages to go with our template. Right lets get started, goto your folder wherr your template is copy your index.html file then paste it into the same directory. Rename the copied index.html file to services.html, then open it up [...]]]></description>
			<content:encoded><![CDATA[<p>Hello welcome to part 3 of the your PROject template. Today we&#8217;ll be creating 4 extra pages to go with our template.</p>
<p><span id="more-1382"></span></p>
<p>Right lets get started, goto your folder wherr your template is copy your index.html file then paste it into the same directory. Rename the copied index.html file to services.html, then open it up in your code editor. Locate the code between the end div tag for the header all the way down to the container ends div. Highlight it all and hit the delete key, basically all&#8217;s were doing is removing the content area. This is what your code should look like once deleted.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINTER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;HEADER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;top-elements&quot;&gt;&lt;!&#8211;TOP ELEMENTS START&#8211;&gt;</p>
<p>&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;LOGO STARTS&#8211;&gt;<br />
&lt;img src=&quot;images/logo.png&quot; alt=&quot;Welcome To Your PROject&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;LOGO ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;nav-bar&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;ul class=&quot;navlinks&quot;&gt;<br />
&lt;li class=&quot;current&quot;&gt;&lt;a href=&quot;index.php&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;services.php&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;products.php&quot;&gt;Products&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;testimonials.php&quot;&gt;Testimonials&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;contact.php&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;TOP ELEMENTS END&#8211;&gt;</p>
<p>&lt;div id=&quot;featured&quot;&gt;&lt;!&#8211;FEATURED CONTENT STARTS&#8211;&gt;<br />
&lt;div class=&quot;featured-text&quot;&gt;&lt;!&#8211;FEATURED TEXT STARTS&#8211;&gt;<br />
&lt;h1 class=&quot;featured&quot;&gt;featured text here 01&lt;/h1&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus porttitor est et ante euismod vel euismod tortor ornare. Quisque turpis augue, iaculis vel luctus non, dapibus a ante. Quisque vitae turpis augue. Nulla facilisi.  Continue Reading&#8230;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;featured-image01&quot;&gt;&lt;!&#8211;FEATURED IMAGE STARTS&#8211;&gt;<br />
&lt;div class=&quot;featured-buttons&quot;&gt;&lt;!&#8211;NEXT AND PREVIOUS BUTTONS STARTS&#8211;&gt;<br />
&lt;div class=&quot;featured-btn&quot;&gt;<br />
&lt;img src=&quot;images/next_btn.png&quot; alt=&quot;Next&quot;  /&gt;<br />
&lt;div class=&quot;featured-btn&quot;&gt;&lt;img src=&quot;images/prev_btn.png&quot; alt=&quot;Previous&quot; /&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;NEXT AND PREVIOUS BUTTONS END&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED IMAGE ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FEATURED CONTENT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;HEADER ENDS&#8211;&gt;</p>
<p>THIS IS WHERE YOUR NEW CODE WILL GO</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;FOOTER STARTS&#8211;&gt;<br />
&lt;div id=&quot;footer-content&quot;&gt;&lt;!&#8211;FOOTER CONTENT STARTS&#8211;&gt;<br />
&lt;p&gt;Copyright &amp;copy; your project | All Rights Reserved&lt;/p&gt;<br />
&lt;p&gt;Design By &lt;a href=&quot;http://www.richard-carpenter.co.uk&quot;&gt;Richard Carpenter&lt;/a&gt;&lt;/p&gt;<br />
&lt;p&gt;&amp;nbsp;&lt;/p&gt;<br />
&lt;p&gt;<br />
&lt;a href=&quot;http://jigsaw.w3.org/css-validator/check/referer&quot;&gt;<br />
&lt;img style=&quot;border:0;width:88px;height:31px&quot;<br />
src=&quot;http://jigsaw.w3.org/css-validator/images/vcss-blue&quot;<br />
alt=&quot;Valid CSS!&quot; /&gt;<br />
&lt;/a&gt;&lt;a href=&quot;http://validator.w3.org/check?uri=referer&quot;&gt;&lt;img<br />
src=&quot;http://www.w3.org/Icons/valid-xhtml10-blue&quot;<br />
alt=&quot;Valid XHTML 1.0 Transitional&quot; height=&quot;31&quot; width=&quot;88&quot; /&gt;&lt;/a&gt;<br />
&lt;/p&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;FOOTER CONTENT ENDS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FOOTER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We can now begin to add our modified layout for our services page. We&#8217;ll be mocking it up in the same way as we did for our main page boxes, only this time the box will be 900px wide. We mock it up like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;a content title here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;May 20, 2009&lt;/h2&gt;<br />
&lt;p&gt;SOME TEXT HERE&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>As you can see the code is pretty much the same as our main page code only difference is we&#8217;ve renamed the div&#8217;s. The css is also pretty much the same.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-SERVICE&#8217;S PAGE STYLES&#8212;&#8212;&#8212;- */</p>
<p>.services {<br />
	float: left;<br />
	border: 1px solid #121212;<br />
	margin-bottom: 15px;<br />
	float: left;<br />
	width: 898px;<br />
}</p>
<p>.services-inside {<br />
	background-color: #0c0c0c;<br />
	border: 1px solid #030303;<br />
	float: left;<br />
	width: 876px;<br />
	padding: 10px;<br />
}</p>
<p>.services-inside p {<br />
	padding-top: 10px;<br />
}<br />
[/sourcecode]</p>
<p>Depending on what you actually want on your services page you&#8217;ll have to add in the extra styles. So if you wanted a list on the services page with some images then you&#8217;d have to style them under the &#8220;SERVICE&#8217;S PAGE STYLES&#8221; in the style sheet. Here is the code for my services page with images and a simple list.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;a content title here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;May 20, 2009&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Quisque felis velit, sollicitudin ac pellentesque vehicula, fermentum ut velit. &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;#&quot;&gt;Etiam tellus ipsum, posuere nec molestie in, ultrices vel enim&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href=&quot;#&quot;&gt;.&lt;/a&gt; Donec vel est orci. Donec diam leo, fringilla sit amet vehicula eu, dictum quis elit.&lt;/p&gt;<br />
&lt;p&gt;&amp;nbsp;&lt;/p&gt;<br />
&lt;h2&gt;Services&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis.&lt;/p&gt;</p>
<p>&lt;ul class=&quot;service-list&quot;&gt;<br />
&lt;li&gt;Service #1 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #2 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #3 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #4 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #5 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;h2&gt;&amp;nbsp;&lt;/h2&gt;<br />
&lt;h2&gt;another header goes here&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis.&lt;/p&gt;<br />
&lt;img src=&quot;thumbnails/01.gif&quot; alt=&quot;01&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;service-img&quot; /&gt;&lt;img src=&quot;thumbnails/02.gif&quot; alt=&quot;02&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;service-img&quot; /&gt;&lt;img src=&quot;thumbnails/03.gif&quot; alt=&quot;03&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;service-img&quot; /&gt;&lt;img src=&quot;thumbnails/04.gif&quot; alt=&quot;04&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;service-img&quot; /&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis.&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>You&#8217;ll now have to style the img tag&#8217;s and list&#8217;s in your stylesheet which looks like this.</p>
<p>[sourcecode language="css"]<br />
.service-list li{<br />
	padding-left: 10px;<br />
	font-size: 0.7em;<br />
	color: #FFFFFF;<br />
	margin-left: 40px;<br />
	line-height: 18px;<br />
	margin-top: 10px;<br />
	margin-bottom: 10px;<br />
}</p>
<p>.service-img {<br />
	padding: 5px;<br />
	background-color: #000000;<br />
	border: 1px solid #383838;<br />
	margin-left: 6px;<br />
	margin-top: 10px;<br />
	margin-bottom: 5px;<br />
}<br />
[/sourcecode]</p>
<p>My services page looks like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css2/step1.gif" alt="Step1" width="600" height="460" /></p>
<p>So basically when creating your new pages depending on what you have in there will determine what styles you will need in your style sheet otherwise you can re-use styles we have already set. Thats our services page done, lets start on our products page. Copy your services.html file and paste a copy in the main directory, rename the file to products.html then open it in your code editor. Keep all the classes associated with the services page as we can reuse them for this page just remove all the content inbetween them. </p>
<p align="center"><!--adsense#hv_banner--></p>
<p>Once you&#8217;ve removed all the content from the classes you should have something like this. (just remember if you change anything in the services page css it will automatically change on the products page also. You can get around this by using the same styles but change the class ID&#8217;s.)</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #1 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
CONTENT HERE<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>For the products page i think we&#8217;ll have 3 boxes, to do this all&#8217;s we need to do is copy and paste the code above 2 times.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX #1 STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #1 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
CONTENT HERE<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX #2 STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #1 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
CONTENT HERE<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX #3 STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #1 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
CONTENT HERE<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>All&#8217;s thats needed now is to stick some content inside each box. The content you choose to display and how you display it will determine what styles you have to put inside your style sheet. For instance if you look at the code below you&#8217;ll see what ive put in my three product boxes.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX #1 STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #1 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
&lt;p&gt;&lt;img src=&quot;thumbnails/03.gif&quot; alt=&quot;Product Sample&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;imgfloat-right&quot; /&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Quisque felis velit, sollicitudin ac pellentesque vehicula, fermentum ut velit. &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;#&quot;&gt;Etiam tellus ipsum, posuere nec molestie in, ultrices vel enim&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href=&quot;#&quot;&gt;.&lt;/a&gt; Donec vel est orci. Donec diam leo, fringilla sit amet vehicula eu, dictum quis elit.&lt;/p&gt;<br />
&lt;ul class=&quot;service-list&quot;&gt;<br />
&lt;li&gt;Service #1 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #2 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #3 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX #2 STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #2 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
&lt;p&gt;&lt;img src=&quot;thumbnails/01.gif&quot; alt=&quot;Product Sample&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;imgfloat-left&quot; /&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Quisque felis velit, sollicitudin ac pellentesque vehicula, fermentum ut velit. &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;#&quot;&gt;Etiam tellus ipsum, posuere nec molestie in, ultrices vel enim&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href=&quot;#&quot;&gt;.&lt;/a&gt; Donec vel est orci. Donec diam leo, fringilla sit amet vehicula eu, dictum quis elit.&lt;/p&gt;<br />
&lt;ul class=&quot;service-list&quot;&gt;<br />
&lt;li&gt;Service #1 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #2 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #3 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX #3 STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;product #1 here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;product short info&lt;/h2&gt;<br />
&lt;p&gt;&lt;img src=&quot;thumbnails/03.gif&quot; alt=&quot;Product Sample&quot; width=&quot;200&quot; height=&quot;170&quot; class=&quot;imgfloat-right&quot; /&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Quisque felis velit, sollicitudin ac pellentesque vehicula, fermentum ut velit. &lt;strong&gt;&lt;em&gt;&lt;a href=&quot;#&quot;&gt;Etiam tellus ipsum, posuere nec molestie in, ultrices vel enim&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;a href=&quot;#&quot;&gt;.&lt;/a&gt; Donec vel est orci. Donec diam leo, fringilla sit amet vehicula eu, dictum quis elit.&lt;/p&gt;<br />
&lt;ul class=&quot;service-list&quot;&gt;<br />
&lt;li&gt;Service #1 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #2 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;li&gt;Service #3 &#8211; Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Each box contains a short paragraph, an image floated either left or right and again a small list. We can use the orginal P tag styles from our style sheet already, aswell as the list we already styled inside services section. All&#8217;s we need to style are some image left and right float options so we can float our product images either left or right. We can do this by adding the following css into our stylesheet.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-PRODUCT&#8217;S PAGE STYLES&#8212;&#8212;&#8212;- */</p>
<p>.imgfloat-left {<br />
	float:left;<br />
	padding: 5px;<br />
	background-color: #000000;<br />
	border: 1px solid #383838;<br />
	margin-right: 6px;<br />
	margin-bottom: 6px;<br />
	margin-top: 6px;<br />
	margin-left: 6px;<br />
}</p>
<p>.imgfloat-right {<br />
	float:right;<br />
	padding: 5px;<br />
	background-color: #000000;<br />
	border: 1px solid #383838;<br />
	margin-left: 6px;<br />
	margin-bottom: 6px;<br />
	margin-top: 6px;<br />
	margin-right: 6px;<br />
}<br />
[/sourcecode]</p>
<p>Save your work and test your template in your browser. Here&#8217;s how mine looks.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css2/step2.gif" alt="Step2" width="600" height="569" /></p>
<p>Copy and paste the services page again, only this rename the file to testimonials.html. Remove ALL the content between the header ending div and container ending div. Were now going to make a new mockup but using some of the same styles. In the testimonials area we&#8217;ll have boxes the same as our products page but at the bottom of each box we&#8217;ll have some star ratings. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;testimonial&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;testimonial-inside&quot;&gt;<br />
&lt;h2&gt;customer #1&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;Thomas davis&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Mauris eget metus orci, et venenatis turpis. Quisque felis velit, sollicitudin ac pellentesque vehicula, fermentum ut velit. &lt;/p&gt;</p>
<p>&lt;div class=&quot;rating&quot;&gt;<br />
&lt;img src=&quot;images/star.png&quot; alt=&quot;1&quot; /&gt;&lt;img src=&quot;images/star.png&quot; alt=&quot;2&quot; /&gt;&lt;img src=&quot;images/star.png&quot; alt=&quot;3&quot; /&gt;&lt;img src=&quot;images/star.png&quot; alt=&quot;4&quot; /&gt;&lt;img src=&quot;images/star.png&quot; alt=&quot;5&quot; /&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We now need to style everything, we&#8217;ll use the same styles as our services page classes, but we&#8217;ll use the class testimonial instead. We&#8217;ve also created a new class called rating which will be for our stars. The css looks like this.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-TESTIMONIAL&#8217;S PAGE STYLES&#8212;&#8212;&#8212;- */</p>
<p>.testimonial {<br />
	float: left;<br />
	border: 1px solid #121212;<br />
	margin-bottom: 15px;<br />
	float: left;<br />
	width: 898px;<br />
	margin-right: 25px;<br />
	background-color: #0c0c0c;<br />
}</p>
<p>.testimonial-inside {<br />
	background-color: #0c0c0c;<br />
	border: 1px solid #030303;<br />
	float: left;<br />
	width: 876px;<br />
	padding: 10px;<br />
}</p>
<p>.testimonial-inside p {<br />
	padding-top: 10px;<br />
}</p>
<p>.rating {<br />
	float: left;<br />
	height: 18px;<br />
	width: 876px;<br />
	margin-top: 10px;<br />
}</p>
<p>.rating img{<br />
	float: right;<br />
}<br />
[/sourcecode]</p>
<p>You can now copy and paste the code for each box underneath each other to create more testimonial boxes. Just change the information inside each box. My testimonials page looks like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css2/step3.gif" alt="Step3" width="600" height="663" /></p>
<p>Copy and paste your services page once more then rename to contact.html, also on this page we&#8217;ll be using the services page classes. </p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;contact us&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;get in touch using the contact form below&lt;/h2&gt;<br />
CONTENT HERE<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside the contact page were going to need a form and maybe a short paragraph with some info. On the text fields that we use we&#8217;ll assign some classes which will enable us to style the form and text boxes etc&#8230; via our style sheet. </p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;services&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;services-inside&quot;&gt;<br />
&lt;h2&gt;contact us&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;get in touch using the contact form below&lt;/h2&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec iaculis porttitor massa eu scelerisque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Mauris eget metus orci, et venenatis turpis. Quisque felis velit, sollicitudin ac pellentesque vehicula, fermentum ut velit. Donec vel est orci. Donec diam leo, fringilla sit amet vehicula eu, dictum quis elit. &lt;/p&gt;<br />
&lt;form id=&quot;contact&quot; name=&quot;contact&quot; method=&quot;post&quot; action=&quot;&quot;&gt;<br />
  &lt;label&gt;<br />
  &lt;input name=&quot;textfield&quot; type=&quot;text&quot; class=&quot;textfield&quot; id=&quot;textfield&quot; value=&quot;Name:&quot; size=&quot;45&quot; /&gt;<br />
  &lt;/label&gt;<br />
  &lt;br /&gt;<br />
  &lt;label&gt;<br />
  &lt;input name=&quot;textfield2&quot; type=&quot;text&quot; class=&quot;textfield&quot; id=&quot;textfield2&quot; value=&quot;E-Mail:&quot; size=&quot;45&quot; /&gt;<br />
  &lt;/label&gt;<br />
  &lt;br /&gt;<br />
  &lt;label&gt;<br />
  &lt;input name=&quot;textfield3&quot; type=&quot;text&quot; class=&quot;textfield&quot; id=&quot;textfield3&quot; value=&quot;Subject:&quot; size=&quot;45&quot; /&gt;<br />
  &lt;/label&gt;<br />
  &lt;br /&gt;<br />
  &lt;label&gt;<br />
  &lt;textarea name=&quot;textarea&quot; cols=&quot;45&quot; rows=&quot;10&quot; class=&quot;textbox&quot; id=&quot;textarea&quot;&gt;Information:&lt;/textarea&gt;<br />
  &lt;/label&gt;<br />
  &lt;br /&gt;<br />
  &lt;label&gt;<br />
  &lt;input name=&quot;button&quot; type=&quot;submit&quot; class=&quot;form-button&quot; id=&quot;button&quot; value=&quot;Submit&quot; /&gt;<br />
  &lt;/label&gt;<br />
  &lt;label&gt;<br />
  &lt;input name=&quot;button2&quot; type=&quot;reset&quot; class=&quot;form-button&quot; id=&quot;button2&quot; value=&quot;Reset&quot; /&gt;<br />
  &lt;/label&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The css for our contact form looks like this.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-CONTACT PAGE STYLES&#8212;&#8212;&#8212;- */</p>
<p>.textfield, .textbox {<br />
	background-color: #000000;<br />
	border: 1px solid #383838;<br />
	padding: 2px;<br />
	margin-top: 5px;<br />
	margin-bottom: 5px;<br />
	color: #CCCCCC;<br />
	font-style: italic;<br />
}</p>
<p>.form-button {<br />
	background-color: #000000;<br />
	border: 1px solid #383838;<br />
	padding: 4px;<br />
	color: #CCCCCC;<br />
	margin-right: 5px;<br />
	font-size: 0.8em;<br />
}</p>
<p>#contact {<br />
	margin-top: 10px;<br />
	width: 300px;<br />
	float: left;<br />
	margin-right: 10px;<br />
	margin-bottom: 10px;<br />
}<br />
[/sourcecode]</p>
<p>Your contact page should now look something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css2/step4.gif" alt="Step4" width="600" height="358" /></p>
<p>All your pages should now be set and in working order. Before your template goes live you&#8217;ll have to change the links in your navigation, you will also have to set the ID of current for each individual page link. So for example if your on the contact page the link for your contact page in your navigation should have an ID of current. If your on the index page your index page should have an ID of current.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>Thats all for this tutorial you should now have a good idea of how to create a 5page website. Its not as hard as some people think, once you&#8217;ve coded the main page its just as simple as copy and paste for the others. Dont forget to subscribe via rss and twitter also please could you promote this post along with many of my others. Thats it till next time, look out for the next tutorial when we&#8217;ll be intergrating a jquery plugin called jflow for our featured area.</p>
<h2>Other Parts To This Project</h2>
<ul class="post-list">
<li><a href="http://hv-designs.co.uk/2009/05/22/your-project-pt1/" title="Learn To Design This Layout">Pt.1 PSD Designs</a></li>
<li><a href="http://hv-designs.co.uk/2009/05/23/my-project-psd-to-html/" title="PSD Conversion">Pt.2 PSD Conversion</a></li>
</ul>
<h2>Download The FREE Template</h2>
<p>You can download the FREE CSS Template by clicking <a href="http://hv-designs.co.uk/2009/05/28/your-project-free-template/" title="Download FREE CSS Template">HERE</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/05/26/your-project-4-additional-pages/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>My PROject Pt.2: PSD To HTML</title>
		<link>http://www.hv-designs.co.uk/2009/05/23/my-project-psd-to-html/</link>
		<comments>http://www.hv-designs.co.uk/2009/05/23/my-project-psd-to-html/#comments</comments>
		<pubDate>Sat, 23 May 2009 06:50:36 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1375</guid>
		<description><![CDATA[Hello welcome to part 2 of the 5 page template series. Today we&#8217;ll be converting our PSD into a one page working CSS template. In part 3 we&#8217;ll begin to add our additional pages. Right lets get started, the first thing you need to do is create a blank HTML and blank CSS file inside [...]]]></description>
			<content:encoded><![CDATA[<p>Hello welcome to part 2 of the 5 page template series. Today we&#8217;ll be converting our PSD into a one page working CSS template. In part 3 we&#8217;ll begin to add our additional pages.</p>
<p><span id="more-1375"></span></p>
<p>Right lets get started, the first thing you need to do is create a blank HTML and blank CSS file inside a folder called &#8220;your project&#8221;, save your blank HTML file as index.html and your blank CSS file as styles.css. Also inside your folder create an empty folder called images.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step1.gif" alt="Step1" width="600" height="450" /></p>
<p>Open up your blank HTML file and add your website title inbetween the title tag, underneath the title tag link your css file.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;Your PROject &#8211; Welcome&#8230;&lt;/title&gt;<br />
&lt;link href=&quot;styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>We can now start to mockup the top half of our layout, we start with a container div, this will be the big box our website lives in. Everything we create will go inside this container div.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;Your PROject &#8211; Welcome&#8230;&lt;/title&gt;<br />
&lt;link href=&quot;styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINTER STARTS&#8211;&gt;</p>
<p>EVERYTHING GOES INBETWEEN HERE</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>Our next div will be our header div.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINTER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;HEADER STARTS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;HEADER ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside our header div we need to add our website logo and navigation. Ive chosen to also wrap the logo and navigation in another div called top-elements, ive done this because i dont want any alignment / postioning issues when we code the featured area. So our code now looks like this. </p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;CONTAINTER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;HEADER STARTS&#8211;&gt;</p>
<p>&lt;div id=&quot;top-elements&quot;&gt;&lt;!&#8211;TOP ELEMENTS START&#8211;&gt;</p>
<p>&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;LOGO STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;LOGO ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;nav-bar&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;TOP ELEMENTS END&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;HEADER ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Before we start to add our styles in the style sheet we need to create a few images from our PSD file. Open up your PSD file in photoshop, hide all the layers associated with the featured area then make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step2.gif" alt="Step2" width="600" height="240" /></p>
<p>Make sure you select the background underneath the divider line, the selection should also be the whole width of your canvas (900px). Save the file as &#8220;bg.png&#8221; inside your images folder. You also need to make a selection around your website logo.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step3.gif" alt="Step3" width="600" height="300" /></p>
<p>Get your selection around the logo has tight as you can get it. Copy and paste your logo to a new canvas with a transparant background then save the image as &#8220;logo.png&#8221;. We now also need the background in the header, so make a selection around the top part of the header including the divider line. </p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step4.gif" alt="Step4" width="600" height="218" /></p>
<p>You dont have to use the big image if you dont want to, if you prefer you can use a chunk of the background and repeat it then code the divider line seperatly. Right now we have some images to work with lets begin to add our css styles, head over to your css style sheet and add the following code. (refer to commented code for each style)</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-MAIN BODY STYLES&#8212;&#8212;&#8212;- */</p>
<p>* {<br />
	margin: 0px; /*sets 0 margin to the whole website*/<br />
	padding: 0px; /*sets 0 padding to the whole website*/<br />
}</p>
<p>body {<br />
	font-family: Verdana, Arial, Helvetica, sans-serif; /*website font family*/<br />
	background-color: #000000; /*website background color*/<br />
	color: #999a9a; /*website default text color*/<br />
	background-image: url(images/bg.png); /*our background image*/<br />
	background-repeat: repeat-y; /*repeats background image along the Y axis*/<br />
	background-position: center; /*centers our background*/<br />
}</p>
<p>a:link {<br />
	color: #0096FF; /*color of our hyperlinks*/<br />
}<br />
a:visited {<br />
	color: #FFFFFF; /*color of visited hyperlinks*/<br />
}<br />
a:hover {<br />
	color: #FFFFFF; /*color of the hyperlink when hovered over*/<br />
}<br />
a:active {<br />
	color: #0096FF; /*color of our active links*/<br />
}</p>
<p>p {<br />
	font-size: 0.7em; /*sets default paragraph text size*/<br />
	line-height: 18px; /*sets default paragraph line height*/<br />
	text-align: justify; /*justifys our paragraphs*/<br />
}</p>
<p>h1 {<br />
	color: #727372; /*color of our H1 tag*/<br />
	text-transform: uppercase; /*sets all H1 tags to uppcase*/<br />
	font-size: 1.2em; /*sets H1 font size*/<br />
	font-weight: normal; /*sets H1 font weight to normal*/<br />
}</p>
<p>h2 {<br />
	color: #FFFFFF; /*color of our H2 tag*/<br />
	text-transform: uppercase; /*sets all H2 tags to uppcase*/<br />
	font-size: 1em; /*sets H2 font size*/<br />
	font-weight: normal; /*sets H2 font weight to normal*/<br />
}</p>
<p>h3 {<br />
	color: #727372; /*color of our H3 tag*/<br />
	text-transform: uppercase; /*sets all H3 tags to uppcase*/<br />
	font-size: 0.9em; /*sets H3 font size*/<br />
	font-weight: normal; /*sets H3 font weight to normal*/<br />
}</p>
<p>h4 {<br />
	color: #727372; /*color of our H4 tag*/<br />
	text-transform: uppercase; /*sets all H4 tags to uppcase*/<br />
	font-size: 0.8em; /*sets H4 font size*/<br />
	font-weight: normal; /*sets H4 font weight to normal*/<br />
}</p>
<p>img {<br />
	border:none; /*removes borders from images*/<br />
}</p>
<p>.float-left {<br />
	float:left; /*class for float left*/<br />
}</p>
<p>.float-right {<br />
	float:right; /*class for float right*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-MAIN CONTAINER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#container {<br />
	width: 900px; /*width of our container*/<br />
	margin-top: 0px; /*sets top margin to 0*/<br />
	margin-right: auto; /*sets right margin to auto which centers our website*/<br />
	margin-left: auto; /*sets left margin to auto which centers our website*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-HEADER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#header {<br />
	background-image: url(images/hd_bg.png); /*sets our header background image*/<br />
	background-repeat: no-repeat; /*sets our background to no repeat*/<br />
	float: left; /*floats our header left*/<br />
	width: 900px; /*gives our header a width of 900px*/<br />
}</p>
<p>#top-elements {<br />
	float: left; /*floats top elements left*/<br />
	width: 900px; /*sets our top elements width to 900px*/<br />
	padding-top: 20px; /*gives our top elements a padding of 20px*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-LOGO STYLES&#8212;&#8212;&#8212;- */</p>
<p>#logo {<br />
	float: left; /*floats our logo left*/<br />
	height: 37px; /*gives our logo a height of 37px same as our logo image*/<br />
	width: 270px; /*sets our logo div&#8217;s height to 270px same as our logo image*/<br />
}</p>
<p>/* &#8212;&#8212;&#8212;-NAVIGATION STYLES&#8212;&#8212;&#8212;- */</p>
<p>#nav-bar {<br />
	float: right; /*floats our navigation right*/<br />
	height: 29px; /*gives our navigation a height of 29px*/<br />
	padding-top: 8px; /*gives our navigation top padding*/<br />
	margin-bottom: 40px; /*gives our navigation a bottom margin*/<br />
}</p>
<p>.navlinks ul {<br />
	margin: 0px; /*gives our unordered list 0 margin*/<br />
	padding: 0px; /*gives our unordered list 0 padding*/<br />
}</p>
<p>.navlinks li {<br />
	display: inline; /*displays our navigation links inline*/<br />
	list-style-type: none; /*removes bullets points from our navigation*/<br />
	padding-left: 20px; /*gives our navigation list items left padding*/<br />
}</p>
<p>.navlinks li a {<br />
	text-decoration: none; /*removes bottom line from nav links*/<br />
	font-size: 12px; /*sets navigation font size*/<br />
	color: #FFFFFF; /*sets navigation link color*/<br />
	padding-bottom: 2px; /*gives our navigation links bottom padding*/<br />
}</p>
<p>.navlinks li a:hover {<br />
	border-bottom-width: medium; /*gives links a medium thickness bottom border*/<br />
	border-bottom-style: solid; /*makes the bottom border line solid*/<br />
	border-bottom-color: #0096ff; /*sets the color of the border*/<br />
}</p>
<p>.navlinks li.current a{<br />
	border-bottom-width: medium; /*gives links a medium thickness bottom border*/<br />
	border-bottom-style: solid; /*makes the bottom border line solid*/<br />
	border-bottom-color: #0096ff; /*sets the color of the border*/<br />
}<br />
[/sourcecode]</p>
<p>Loads of css, believe it or not but that huge chunk isnt even half of the css file. In the css code above we have set our header tags up to H4, we&#8217;ve added the styles for our hyperlinks and some minor styles for images and paragraphs all pretty straight forward stuff. We have also set our styles for our container, logo and navigation, so now we can start adding our items to our header. Head over to your index.html file, inbetween the logo start and ending div insert your logo as an image. Inbetween the start and ending nav-bar div add a simple unorder list with a class of navlinks. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;LOGO STARTS&#8211;&gt;<br />
&lt;img src=&quot;images/logo.png&quot; alt=&quot;Welcome To Your PROject&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;LOGO ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;nav-bar&quot;&gt;&lt;!&#8211;NAVIGATION STARTS&#8211;&gt;<br />
&lt;ul class=&quot;navlinks&quot;&gt;<br />
&lt;li class=&quot;current&quot;&gt;&lt;a href=&quot;index.php&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;services.php&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;products.php&quot;&gt;Products&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;testimonials.php&quot;&gt;Testimonials&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;contact.php&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;NAVIGATION ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>Notice in our style sheet the navigation should have a medium solid blue line underneath each link. If you test your layout in firefox and internet explorer you will see that internet explorer doesnt have the bottom line. We now have to do some cross browser styles to make it work. Open up a blank notepad file and save it as &#8220;ie.css&#8221; inside your main folder. Opne up the ie.css file inside your code editor, inside this file we need to add all our little fixes for internet explorer. To fix our little navigation problem we need to add these styles.</p>
<p>[sourcecode language="css"]<br />
.navlinks li a:hover {<br />
	position: relative;<br />
}</p>
<p>.navlinks li.current a{<br />
	position: relative;<br />
}<br />
[/sourcecode]</p>
<p>Before we go ahead and test out our layout again we need to link our ie.css file in our index.html file, when we link the ie.css file we dont do it in the normal way we basically want to insert a statment which says &#8220;if im using internet explorer overwrite the following styles&#8221;. We can do that by adding this bit of code inside the head section of our index.html file.</p>
<p>[sourcecode language="php"]<br />
&lt;!&#8211;[if IE 7]&gt;<br />
&lt;link href=&quot;ie.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;![endif]&#8211;&gt;<br />
[/sourcecode]</p>
<p>Save your work and test your layout in firefox and internet explorer, the navigation should now work as planned. Also in our navigation code you will notice the &#8220;home&#8221; link has an ID of current this ID of current will basically keep the link hover styling for that specific page, so if your on the home page the medium solid blue line will stay under the link &#8220;home&#8221; when we create our additional pages later on we&#8217;ll need to remove the ID of current from the home link and add it to another link which ever page your making next.</p>
<p>Moving on&#8230; we now have to code up our featured section, head over to your PSD file, the images we need to slice are the little bullet point in the featured title area, our featured image with frame, our left button and our right button.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step5.gif" alt="Step5" width="600" height="220" /></p>
<p>Save all images separatly on transparant backgrounds within your images folder. We can now begin to add our div&#8217;s for our featured area. Add the following code underneath our ending div for our top elements but above our header ending div. Ive also added dummy text and titles for our featured area.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;TOP ELEMENTS END&#8211;&gt;</p>
<p>&lt;div id=&quot;featured&quot;&gt;&lt;!&#8211;FEATURED CONTENT STARTS&#8211;&gt;<br />
&lt;div class=&quot;featured-text&quot;&gt;&lt;!&#8211;FEATURED TEXT STARTS&#8211;&gt;<br />
&lt;h1 class=&quot;featured&quot;&gt;featured text here 01&lt;/h1&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus porttitor est et ante euismod vel euismod tortor ornare. Quisque turpis augue, iaculis vel luctus non, dapibus a ante. Quisque vitae turpis augue. Nulla facilisi.  Continue Reading&#8230;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED TEXT ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;featured-image01&quot;&gt;&lt;!&#8211;FEATURED IMAGE STARTS&#8211;&gt;<br />
&lt;div class=&quot;featured-buttons&quot;&gt;&lt;!&#8211;NEXT AND PREVIOUS BUTTONS STARTS&#8211;&gt;<br />
&lt;div class=&quot;featured-btn&quot;&gt;&lt;img src=&quot;images/next_btn.png&quot; alt=&quot;Next&quot;  /&gt;&lt;/div&gt;<br />
&lt;div class=&quot;featured-btn&quot;&gt;&lt;img src=&quot;images/prev_btn.png&quot; alt=&quot;Previous&quot; /&gt;&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;NEXT AND PREVIOUS BUTTONS END&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED IMAGE ENDS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FEATURED CONTENT ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;HEADER ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We can now style our featured content area using the following styles. (please refer to commented code for each style).</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-FEATURED CONTENT STYLES&#8212;&#8212;&#8212;- */</p>
<p>#featured {<br />
	float: right; /*floats our featured area right*/<br />
	width: 900px; /*gives our featured area a width of 900px*/<br />
	margin-bottom: 20px; /*gives our featured area a bottom margin*/<br />
}</p>
<p>.featured-text {<br />
	float: left; /*floats our featured text left*/<br />
	width: 450px; /*sets our featured text box width*/<br />
	margin-top: 40px; /*gives our featured text box a top margin*/<br />
}</p>
<p>#featured-text p {<br />
	font-size: 0.7em; /*sets our featured text paragraph font size*/<br />
	line-height: 24px; /*sets our featured text line height*/<br />
	text-align: justify; /*justifys our paragraphs*/<br />
	padding-top: 10px; /*adds top padding to our featured text paragraph*/<br />
}</p>
<p>#featured-image01 {<br />
	float: right; /*floats our featured images rights*/<br />
	width: 449px; /*gives our featured images a fixed width same as our images*/<br />
	background-repeat: no-repeat; /*stops images from repeating*/<br />
	background-position: right; /*sets background position right*/<br />
	height: 214px; /*gives our featured image a fixed height same as our images*/<br />
}</p>
<p>#featured-image01 {<br />
	background-image: url(images/featured_image.png); /*our featured image #1*/<br />
}</p>
<p>h1.featured {<br />
	color: #FFFFFF; /*sets featured H1 color*/<br />
	text-transform: uppercase; /*transforms featured H1 tag to uppercase*/<br />
	font-size: 18px; /*sets font size of featured H1 tag*/<br />
	background-image: url(images/bullet_icon.png); /*addeds our bullet image to our featured H1 tag*/<br />
	background-repeat: no-repeat; /*stops bullet from repeating*/<br />
	padding-left: 30px; /*adds padding to the left of our featured H1 tag*/<br />
	line-height: 24px; /*sets featured H1 tag&#8217;s line height*/<br />
}</p>
<p>#featured-image {<br />
	float: right; /*floats our featured image right*/<br />
	width: 449px; /*sets our featured image width same dimensions as our featured image*/<br />
	background-image: url(images/featured_image.png); /*adds a featured image as a background*/<br />
	background-repeat: no-repeat; /*stops featured image repeatsing*/<br />
	background-position: right; /*sets our featured image backgroud position*/<br />
	height: 214px; /*adds a fixed height same dimensions as our featured image*/<br />
}</p>
<p>.featured-btn {<br />
	height: 34px; /*adds a fixed height*/<br />
	width: 34px; /*adds a fixed width*/<br />
	cursor: pointer; /*sets cursor to point cursor*/<br />
}</p>
<p>.featured-buttons {<br />
	height: 144px; /*sets fixed height*/<br />
	width: 34px; /*sets fixed width*/<br />
	margin-left: 75px; /*adds left margin*/<br />
	padding-top: 70px; /*adds top padding*/<br />
}<br />
[/sourcecode]</p>
<p>Test your layout inside your browser and see how it looks i have something like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step6.gif" alt="Step6" width="600" height="373" /></p>
<p>Time to move onto our main content area, we&#8217;ll be start with the left content first. The boxes for our content will all be made using css. If you look at the PSD file you will see the boxes have two strokes in two different colors we can accomplish this by creating a div with one of the borders, then inside that div create another div slightly smaller with the other border added. We mock it up like this.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;content-left&quot;&gt;&lt;!&#8211;CONTENT AREA STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;box-inside&quot;&gt;<br />
&lt;h2 class=&quot;boxtitle1&quot;&gt;a content title here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;May 20, 2009&lt;/h2&gt;<br />
&lt;p&gt;SOME TEXT HERE&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTENT AREA ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>The styles for our left content area look like this.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-CONTENT LEFT STYLES&#8212;&#8212;&#8212;- */</p>
<p>#content-left {<br />
	float: left; /*floats left*/<br />
	width: 600px; /*adds a fixed width*/<br />
	padding-bottom: 40px; /*adds bottom padding*/<br />
}</p>
<p>.box {<br />
	float: left; /*floats left*/<br />
	width: 498px; /*adds a fixed width*/<br />
	border: 1px solid #121212; /*adds a 1 px colored border*/<br />
	margin-bottom: 15px; /*adds a bottom margin*/<br />
	width: 490px; /*adds a fixed width*/<br />
}</p>
<p>.box-inside {<br />
	background-color: #0c0c0c; /*adds a background color*/<br />
	border: 1px solid #030303; /*adds a 1px colored border*/<br />
	float: left; /*floats left*/<br />
	width: 576px; /*adds a fix width */<br />
	padding: 10px; /*adds padding all the way around*/<br />
}</p>
<p>.box-inside p {<br />
	padding-top: 10px; /*adds top padding*/<br />
}</p>
<p>.boxtitle1 {<br />
	color: #FFFFFF; /*text color*/<br />
	text-transform: uppercase; /*transforms text to uppercase*/<br />
	font-size: 1em; /*sets font size*/<br />
	font-weight: normal; /*sets font weight*/<br />
	background-image: url(images/post_icon.png); /*adds our right icon to our header*/<br />
	background-repeat: no-repeat; /*stops icon repeating*/<br />
	background-position: right; /*positions background right*/<br />
}</p>
<p>.boxtitle2 {<br />
	color: #aaaaaa; /*sets font color*/<br />
	text-transform: uppercase; /*transforms text to uppercase*/<br />
	font-size: 0.7em; /*sets font size*/<br />
	background-image: url(images/divider.png); /*adds our divider image*/<br />
	background-repeat: repeat-x; /*repeats our divider image horizontally*/<br />
	background-position: bottom; /*positions divider at the bottom*/<br />
	padding-bottom: 10px; /*adds bottom padding*/<br />
}<br />
[/sourcecode]</p>
<p>If you look at the class &#8220;boxtitle1&#8243; you will see it has a background image of &#8220;post_icon.png&#8221;, this is the little paper icon in the right side of content box. Cut the icon from your PSD and save it as &#8220;post_icon.png&#8221;, You will also need to cut out the divider from underneath sample header. Thats all you need to do for the left content, if you want more boxes all&#8217;s you need to do is copy all the code from the class &#8220;box&#8221; then paste it underneath. Alter the content as needed. So two boxes would looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;content-left&quot;&gt;&lt;!&#8211;CONTENT AREA STARTS&#8211;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;box-inside&quot;&gt;<br />
&lt;h2 class=&quot;boxtitle1&quot;&gt;a content title here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;May 20, 2009&lt;/h2&gt;<br />
&lt;p&gt;SOME TEXT HERE&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;</p>
<p>&lt;div class=&quot;box&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;box-inside&quot;&gt;<br />
&lt;h2 class=&quot;boxtitle1&quot;&gt;a content title here&lt;/h2&gt;<br />
&lt;h2 class=&quot;boxtitle2&quot;&gt;May 20, 2009&lt;/h2&gt;<br />
&lt;p&gt;SOME TEXT HERE&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTENT AREA ENDS&#8211;&gt;<br />
[/sourcecode]</p>
<p>We code and style the sidebar in exactly the same way, only difference is the widths will be alot smaller and you need to use a different icon.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;content-right&quot;&gt;&lt;!&#8211;CONTENT AREA STARTS (sidebar)&#8211;&gt;</p>
<p>&lt;div class=&quot;sidebar&quot;&gt;&lt;!&#8211;BOX STARTS&#8211;&gt;<br />
&lt;div class=&quot;sidebar-inside&quot;&gt;<br />
&lt;h2 class=&quot;sidebar-title1&quot;&gt;a content title here&lt;/h2&gt;<br />
&lt;h2 class=&quot;sidebar-title2&quot;&gt;May 20, 2009&lt;/h2&gt;<br />
&lt;p&gt;CONTENT HERE&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;BOX ENDS&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;CONTENT AREA ENDS (sidebar)&#8211;&gt;<br />
[/sourcecode]</p>
<p>The css looks like this.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-CONTENT RIGHT (sidebar) STYLES&#8212;&#8212;&#8212;- */</p>
<p>#content-right {<br />
	float: right; /*floats right*/<br />
	width: 290px; /*sets a fixed width*/<br />
	margin-left: 10px; /*adds a left margin*/<br />
	padding-bottom: 40px; /*adds bottom padding*/<br />
}</p>
<p>.sidebar {<br />
	float: left; /*floats left*/<br />
	width: 287px; /*adds a fixed width*/<br />
	border: 1px solid #121212; /*adds a 1 px colored border*/<br />
	margin-bottom: 15px; /*adds a bottom margin*/<br />
	float: left; /*floats left*/<br />
}</p>
<p>.sidebar-inside {<br />
	background-color: #0c0c0c; /*sets background color*/<br />
	border: 1px solid #030303; /*adds a 1px colored border*/<br />
	float: left; /*floats left*/<br />
	width: 266px; /*sets a fixed width*/<br />
	padding: 10px; /*adds padding all the way around*/<br />
}</p>
<p>.sidebar-inside p {<br />
	padding-top: 10px; /*adds top padding*/<br />
}</p>
<p>.sidebar-title1 {<br />
	background-image: url(images/sidebar_bullet.png); /*adds our sidebar bullet icon*/<br />
	background-repeat: no-repeat; /*stops background from repeating*/<br />
	background-position: right; /*positions background right*/<br />
}</p>
<p>.sidebar-title2 {<br />
	color: #aaaaaa; /*sets text color*/<br />
	text-transform: uppercase; /*transforms text to uppercase*/<br />
	font-size: 0.7em; /*sets font size*/<br />
	background-image: url(images/divider.png); /*adds our divider image*/<br />
	background-repeat: repeat-x; /*repeats divider imaage horizontally*/<br />
	background-position: bottom; /*positions background bottom*/<br />
	padding-bottom: 10px; /*adds bottom padding*/<br />
}<br />
[/sourcecode]</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step7.gif" alt="Step7" width="600" height="562" /></p>
<p>Now for our footer,&#8230;. we need to create our footer outside of our container div as were having the footer span across the hole browser. You will need two images for the footer, the first one will be the last 1 &#8211; 2 pixels from the edge of the canvas and the other one will be the whole footer image containing our radial gradient image.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p><img src="http://www.hv-designs.co.uk/tutorials/your_project_css/step8.gif" alt="Step8" width="600" height="101" /></p>
<p>We then mock up our footer like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;CONTAINER ENDS&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;FOOTER STARTS&#8211;&gt;<br />
&lt;div id=&quot;footer-content&quot;&gt;&lt;!&#8211;FOOTER CONTENT STARTS&#8211;&gt;<br />
&lt;p&gt;Copyright &amp;copy; your project | All Rights Reserved&lt;/p&gt;<br />
&lt;p&gt;Design By &lt;a href=&quot;http://www.richard-carpenter.co.uk&quot;&gt;Richard Carpenter&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;FOOTER CONTENT ENDS&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;FOOTER ENDS&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>We then add our footer css styling like this.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;&#8212;-FOOTER STYLES&#8212;&#8212;&#8212;- */</p>
<p>#footer {<br />
	background-image: url(images/footer_bg.png); /*adds our footer background image*/<br />
	background-repeat: repeat-x; /*repeats background horizontally*/<br />
	height: 140px; /*adds a fixed height*/<br />
	clear: both; /*clears both floats*/<br />
	margin-top: 40px; /*adds a top margin*/<br />
}</p>
<p>#footer-content {<br />
	background-image: url(images/footer_contentbg.png); /*adds our footer background image*/<br />
	background-repeat: no-repeat; /*stops background repeating*/<br />
	margin: auto; /*centers our footer*/<br />
	height: 90px; /*adds a fixed height*/<br />
	width: 900px; /*adds a fixed width*/<br />
	clear: both; /*clear&#8217;s both floats*/<br />
	padding-top: 50px; /*adds top padding*/<br />
}</p>
<p>#footer-content p {<br />
	text-align: center; /*aligns text center*/<br />
}<br />
[/sourcecode]</p>
<p>Your first page should now be completed, watch out for the 3rd part where we&#8217;ll be creating additional pages. Subscribe to our RSS feeds to stay updated. See you next time.</p>
<h2>Other Parts To This Project</h2>
<ul class="post-list">
<li><a href="http://hv-designs.co.uk/2009/05/22/your-project-pt1/" title="Learn To Design This Layout">Pt.1 PSD Design</a></li>
<li><a href="http://hv-designs.co.uk/2009/05/26/your-project-4-additional-pages/" title="Learn To Add More Pages">Pt.3 Add Additional Pages</a></li>
</ul>
<h2>Download The FREE Template</h2>
<p>You can download the FREE CSS Template by clicking <a href="http://hv-designs.co.uk/2009/05/28/your-project-free-template/" title="Download FREE CSS Template">HERE</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/05/23/my-project-psd-to-html/feed/</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>Web Design Layout #9 SiteBuild</title>
		<link>http://www.hv-designs.co.uk/2009/04/29/web-design-layout-9-sitebuild/</link>
		<comments>http://www.hv-designs.co.uk/2009/04/29/web-design-layout-9-sitebuild/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 17:55:18 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1268</guid>
		<description><![CDATA[Hello everybody today il be showing you how to code the web design layout #9 PSD. I recently setup a poll to see which one you all wanted to see as a coded tutorial, and this one won. Thanks to everyone who took part in the submission process. I promised to do this layout as [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody today il be showing you how to code the web design layout #9 PSD. I recently setup a poll to see which one you all wanted to see as a coded tutorial, and this one won. Thanks to everyone who took part in the submission process.</p>
<p><span id="more-1268"></span></p>
<p>I promised to do this layout as a 5page full site build BUT ive changed my mind, dont fret though there will be a very intresting complete 5 page website sitebuild coming soon which will also include a screencast. Right lets get started, the first thing you need to do is create a new folder somewhere on your desktop, give it a name. Inside your folder create another folder called &#8220;images&#8221;. Create a blank CSS &#038; HTML document, save the files as index.HTML and styles.CSS inside your main folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step1.gif" alt="Step1" width="600" height="241" /></p>
<p>Open up your index file and style sheet in your favourite code editor, im going to be using adobe dreamweaver CS3. The first thing we need to do is set our website title and link our stylesheet.</p>
<p>[sourcecode language="html"]<br />
&lt;title&gt;Web Design Layout #9 | Welcome&#8230;&lt;/title&gt;<br />
&lt;link href=&quot;styles2.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
[/sourcecode]</p>
<p>Inside our BODY tag we can start to mockup our layout, were going to need a main container which our whole template will sit inside, we then need a DIV for our header, logo and menu. The code for it all looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;container starts&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;</p>
<p>&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;logo starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;logo ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;</p>
<p>&lt;div id=&quot;menu&quot;&gt;&lt;!&#8211;menu starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;menu ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>With the top area mocked up we can begin to add some styles to each DIV. But first were going to need a background image and color. Open up your PSD file and hide all your layers apart from the background layer, the wood texture in our header, the navigation bar and our grey box on our background.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step2.gif" alt="Step2" width="600" height="315" /></p>
<p>Once you&#8217;ve got something like the image above goto &#8220;layer > flatten image&#8221; (make sure you dont save your PSD file). Select the rectangular marquee tool and make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step3.gif" alt="Step3" width="600" height="317" /></p>
<p>Start the selection from the start of one of the grains in the wood texture, then end the selection on another part of a grain.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step4.gif" alt="Step4" width="600" height="273" /></p>
<p>Selecting / slicing on the grains will ensure the background image is repeated properly, making the slice in the middle of a grain will cause the background image to have inapropriate lines. Save your background as &#8220;bg.PNG&#8221; inside your images folder. Open up our CSS file and add 0 margin and padding to the whole document, inside the body tag add your background that you just created. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
*{<br />
	padding:0;<br />
	margin:0;<br />
}</p>
<p>body { /*&#8211;WEBSITE BODY&#8211;*/<br />
	background-image: url(images/bg.png); /*sets background image*/<br />
	background-repeat: repeat-x; /*repeats background image horizontally*/<br />
	background-color: #e9e9e9; /*color of our background */<br />
	font-family: Arial, Helvetica, sans-serif; /*font family*/<br />
}<br />
[/sourcecode]</p>
<p>Refer to the comments within the style sheet, each style is comment coded on what it does. The next styles we need to add are for our main container, header and logo.</p>
<p>[sourcecode language="css"]<br />
#container { /*&#8211;WEBSITE CONTAINER&#8211;*/<br />
	margin: auto; /*centers our website*/<br />
	width: 850px; /*gives our website a width of 850px*/<br />
}</p>
<p>#header { /*&#8211;HEADER CONTAINER&#8211;*/<br />
	float: left; /*floats our header left*/<br />
	height: 123px; /*gives our header a height of 123px*/<br />
	width: 850px; /*gives our header a width of 850px same as our container*/<br />
}</p>
<p>#logo { /*&#8211;LOGO CONTAINER&#8211;*/<br />
	float: left; /*floats our logo left*/<br />
	height: 123px; /*height of the actual image used for the logo*/<br />
	width: 279px; /*width of the actual image used for the logo*/<br />
}<br />
[/sourcecode]</p>
<p>To determine the height of our header measure the height of the wood texture used in our PSD file. The logo container&#8217;s height will also be the same as the header eles our logo will overlap our navigation. To make the logo goto your PSD file and make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step5.gif" alt="Step5" width="449" height="189" /></p>
<p>Once you&#8217;ve made the selection goto &#8220;layer > flatten image&#8221;, then goto &#8220;image > crop&#8221; save the logo as &#8220;logo.PNG&#8221; inside your images folder. Goto your HTML file inside the &#8220;logo DIV&#8221; insert your image.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;logo starts&#8211;&gt;<br />
&lt;a href=&quot;http://www.hv-designs.co.uk&quot;&gt;&lt;img src=&quot;images/logo.png&quot; alt=&quot;Welcome&#8230;&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;<br />
&lt;/div&gt;&lt;!&#8211;logo ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Double check the dimensions of your logo.PNG file and update the height and width of the logo container within the CSS file. Before we add our styles for our menu lets quickly mockup our menu. Create an unordered list with a class of menu-links, then add in your 5 links. For the first link we&#8217;ll add a list ID of current. The current ID will basically keep one of the menu items in hover state to show the user what page there on. The code for the menu looks like this.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;menu&quot;&gt;&lt;!&#8211;menu starts&#8211;&gt;<br />
&lt;ul class=&quot;menu-links&quot;&gt;&lt;!&#8211;menu links start&#8211;&gt;<br />
&lt;li id=&quot;current&quot;&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Gallery&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Digital Portfolio&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;&lt;!&#8211;menu links end&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;menu ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>We style the menu like this.</p>
<p>[sourcecode language="css"]<br />
#menu { /*&#8211;NAVIGATION CONTAINER&#8211;*/<br />
	float: left; /*floats our menu left*/<br />
	width: 850px; /*gives our menu a width of 850px same as our container*/<br />
	height: 57px; /*height of our menu*/<br />
}</p>
<p>.menu-links li { /*&#8211;NAVIGATION LINKS&#8211;*/<br />
	list-style:none; /*removes bullets from our list*/<br />
	display:block; /*displays links as a block*/<br />
	font-size: 14px; /*font size*/<br />
	float: left; /*floats our links left*/<br />
	font-weight: bold; /*gives our links a bold look*/<br />
}</p>
<p>.menu-links li#current a { /*&#8211;NAVIGATION CURRENT STATE&#8211;*/<br />
	background-image: url(images/menu_hover.png); /*image for the link current state*/<br />
	background-repeat: no-repeat; /*image doesnt repeat*/<br />
	background-position: center; /*centers our background image*/<br />
	color: #ff9833; /*text color*/<br />
}</p>
<p>.menu-links a { /*&#8211;NAVIGATION LINKS&#8211;*/<br />
	text-decoration: none; /*removes underscore from our links*/<br />
	color: #707070; /*sets our link colors*/<br />
	display: block; /*displays each link as a block*/<br />
	height: 35px; /*gives our block a height of 35px*/<br />
	padding-top: 22px; /*adds 22px padding to the top*/<br />
	padding-right: 17px; /*adds 17px padding right*/<br />
	padding-left: 17px; /*adds 17px padding left*/<br />
	text-transform: uppercase; /*transforms text into uppercase*/<br />
}</p>
<p>.menu-links a:hover { /*&#8211;NAVIGATION HOVER&#8211;*/<br />
	background-image: url(images/menu_hover.png); /*link hover image*/<br />
	background-repeat: no-repeat; /*stops hover image repeating itself*/<br />
	background-position: center; /*sets the position of the background image*/<br />
	color: #ff9833; /*text color when hovered*/<br />
}<br />
[/sourcecode]</p>
<p>On the right side of our navigation on our PSD file we had an RSS icon with some text. We can easily achieve this in CSS by simply adding another DIV inside the navigation which is floated right. We&#8217;ll need a DIV for our logo then another DIV for the text next to it. Firstly lets create our RSS icon, open up your PSD file and save your RSS icon as a single image called &#8220;rss.png&#8221;, save the image into your images folder. The code inside our menu DIV will now look like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;menu&quot;&gt;&lt;!&#8211;menu starts&#8211;&gt;<br />
&lt;ul class=&quot;menu-links&quot;&gt;&lt;!&#8211;menu links start&#8211;&gt;<br />
&lt;li id=&quot;current&quot;&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Gallery&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Digital Portfolio&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;&lt;!&#8211;menu links end&#8211;&gt;</p>
<p>&lt;div id=&quot;rss-text&quot;&gt;&lt;!&#8211;rss text starts&#8211;&gt;<br />
&lt;p class=&quot;rss-header&quot;&gt;Subscribe Via RSS&lt;/p&gt;<br />
&lt;p class=&quot;text-rss&quot;&gt;Updates in your reader&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;rss text end&#8211;&gt;</p>
<p>&lt;div id=&quot;rss&quot;&gt;&lt;!&#8211;rss icon starts&#8211;&gt;<br />
&lt;a href=&quot;#&quot;&gt;&lt;img src=&quot;images/rss.png&quot; alt=&quot;Subscribe&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;<br />
&lt;/div&gt;&lt;!&#8211;rss icon ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;menu ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>We then style our RSS DIV&#8217;s like this.</p>
<p>[sourcecode language="css"]<br />
#rss { /*&#8211;RSS ICON CONTAINER&#8211;*/<br />
	float: right; /*floats our rss div to the right*/<br />
	height: 31px; /*gives our rss div a height of 31px exactly the same as the rss icon*/<br />
	width: 31px; /*gives our rss div a width of 31px exactly the same as the rss icon*/<br />
	margin-top: 15px; /*adds a top marhin of 15px*/<br />
	margin-right: 10px; /*adds a right margin of 10px*/<br />
}</p>
<p>#rss-text { /*&#8211;RSS TEXT CONTAINER&#8211;*/<br />
	float: right; /*floats our rss text right*/<br />
	height: 31px; /*gives our div a height of 31px*/<br />
	margin-top: 15px; /*adds a 15px top margin*/<br />
}</p>
<p>.rss-header { /*&#8211;RSS SUBSCRIBE TEXT&#8211;*/<br />
	color: #707070; /*sets color of the subscribe text*/<br />
	font-weight: bold; /*sets subscribe text to bold*/<br />
	font-size: 14px; /*adds a font size of 14px*/<br />
}</p>
<p>.text-rss { /*&#8211;RSS DESCRIPTION TEXT&#8211;*/<br />
	color: #828282; /*sets the color of our rss description text*/<br />
	font-size: 11px; /*sets font size of our rss description text*/<br />
}<br />
[/sourcecode]</p>
<p>Give the HTML a blast in your favourite browser and see how things pan out. The layout has been tested in both IE7 and FF and works fine without any hiccups. The next part of the template we need to mockup is our featured area, for now we&#8217;ll be using a static background which will contain our drop shadow, then inside we&#8217;ll add our featured image. The mockup for the featured area is relatively simple, we first make a container which will hold our elements. Inside the container we&#8217;ll have two DIV&#8217;s, one for the text on the left and one for our image on the right.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;featured&quot;&gt;&lt;!&#8211;featured starts&#8211;&gt;<br />
&lt;div id=&quot;content-featured&quot;&gt;&lt;!&#8211;content starts here&#8211;&gt;<br />
&lt;h1&gt;Portfolio Layout&lt;/h1&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ac justo vel enim congue accumsan. Fusce ut metus quis lorem consequat mollis. Pellentesque eleifend interdum diam. Phasellus adipiscing ligula sit amet erat consectetur fringilla. Vestibulum viverra eleifend enim. Ut congue pharetra nibh. Suspendisse feugiat, turpis ac ornare ullamcorperd bibendum, dolor. Phasellus at dui. Sed lectus.&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;content ends here&#8211;&gt;</p>
<p>&lt;div id=&quot;content-featured-image&quot;&gt;&lt;!&#8211;featured image starts&#8211;&gt;<br />
&lt;img src=&quot;images/featured-example.png&quot; alt=&quot;Featured Example&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;featured image ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;featured ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>In the code above we have our first DIV of featured, this is our container for the featured area. We then have an ID of content-featured, this DIV is for our image description. As you can see from the code above inside the content-featured DIV we have a h1 tag and a big paragraph. We then move onto our image, which is a simple DIV of content-featured-image which contains our sample image. Our sample image does not contain our drop shadow, we need to cut the drop shadow from our PSD file and set it as a background in our CSS file. Our featured image will then go straight over the top. This is what my featured image background looks like.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step6.png" alt="Step6" width="523" height="263" /></p>
<p>The code for our featured area looks like this.</p>
<p>[sourcecode language="css"]<br />
#featured { /*&#8211;FEATURED CONTENT CONTAINER&#8211;*/<br />
	float: left; /*floats our featured div left*/<br />
	width: 850px; /*adds a width of 850px same as our container*/<br />
	margin-top: 30px; /*adds a top margin of 30px*/<br />
	clear: both; /*clears left and right floats*/<br />
}</p>
<p>#content-featured { /*&#8211;FEATURED CONTENT TEXT BOX&#8211;*/<br />
	float: left; /*floats our featured text left*/<br />
	height: 195px; /*gives us a height of 195px*/<br />
	width: 292px; /*gives us a width of 292px*/<br />
}</p>
<p>#content-featured h1{ /*&#8211;FEATURED CONTENT HEADER&#8211;*/<br />
	color: #707070; /*sets our featured area h1 tag text color*/<br />
	text-transform: uppercase; /*transform our h1 tag to uppercase*/<br />
	font-family: Impact; /*sets our font family to impact*/<br />
	font-size: 26px; /*gives our h1 tag a font size of 26px*/<br />
}</p>
<p>#content-featured p{ /*&#8211;FEATURED CONTENT BOX TEXT&#8211;*/<br />
	color: #9f9e9e; /*sets our paragraph text color*/<br />
	font-family: Arial, Helvetica, sans-serif; /*sets our font family for the p tag*/<br />
	font-size: 10px; /*sets our paragraph font size*/<br />
	line-height: 18px; /*increases our line height to 18px*/<br />
	text-align: justify; /*justifys our paragraph*/<br />
}</p>
<p>#content-featured-image { /*&#8211;FEATURED CONTENT BACKGROUND&#8211;*/<br />
	height: 241px; /*sets our featured image div height to 241px*/<br />
	width: 501px; /*sets our featured image width to 501px*/<br />
	float: left; /*floats left*/<br />
	margin-left: 35px; /*adds a left margin to 35px*/<br />
	background-image: url(images/featured-bg.png); /*adds our background image for our featured images*/<br />
	background-repeat: no-repeat; /*sets background to no repeat*/<br />
	padding-top: 19px; /*sets top padding to 19px*/<br />
	padding-left: 22px; /*sets top padding-left of 22px*/<br />
}<br />
[/sourcecode]</p>
<p>On our PSD file underneath our featured area we have two blocks of text with simple headers. We start with a simple DIV of left and a DIV of right, all the left content in the left DIV and right content in the right DIV. We then create a class for our header tag to sit into and a class for our paragraph. Because we&#8217;ve used classes we can apply them to both the left and right content.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;left&quot;&gt;&lt;!&#8211;left content starts&#8211;&gt;<br />
&lt;div class=&quot;info-header&quot;&gt;<br />
&lt;h1&gt;What can i do for you?&lt;/h1&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;information&quot;&gt;&lt;!&#8211;information starts&#8211;&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ac justo vel enim congue accumsan. Fusce ut metus quis lorem consequat mollis. Pellentesque eleifend interdum diam. Phasellus adipiscing ligula sit amet erat consectetur fringilla. Vestibulum viverra eleifend enim. Ut congue pharetra nibh. Suspendisse feugiat, turpis ac ornare ullamcorperd bibendum, dolor. Phasellus at dui. Sed lectus.&lt;/p&gt;<br />
&lt;p&gt;&amp;nbsp;&lt;/p&gt;<br />
&lt;p&gt; Phasellus adipiscing ligula sit amet erat consectetur fringilla. Vestibulum viverra eleifend enim. Ut congue pharetra nibh. Suspendisse feugiat, turpis ac ornare ullamcorperd bibendum, dolor. Phasellus at dui. Sed lectus. &lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;information ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;left content starts&#8211;&gt;</p>
<p>&lt;div id=&quot;right&quot;&gt;&lt;!&#8211;right content starts&#8211;&gt;<br />
&lt;div class=&quot;info-header&quot;&gt;<br />
&lt;h1&gt;Who am i?&lt;/h1&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;information&quot;&gt;&lt;!&#8211;information starts&#8211;&gt;<br />
 &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas ac justo vel enim congue accumsan. Fusce ut metus quis lorem consequat mollis. Pellentesque eleifend interdum diam. Phasellus adipiscing ligula sit amet erat consectetur fringilla. Vestibulum viverra eleifend enim. Ut congue pharetra nibh. Suspendisse feugiat, turpis ac ornare ullamcorperd bibendum, dolor. Phasellus at dui. Sed lectus.&lt;/p&gt;<br />
&lt;p&gt;&amp;nbsp;&lt;/p&gt;<br />
&lt;p&gt; Phasellus adipiscing ligula sit amet erat consectetur fringilla. Vestibulum viverra eleifend enim. Ut congue pharetra nibh. Suspendisse feugiat, turpis ac ornare ullamcorperd bibendum, dolor. Phasellus at dui. Sed lectus. &lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;information ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;right content ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>The styles for our boxes are.</p>
<p>[sourcecode language="css"]<br />
.information { /*&#8211;CONTENT CONTAINER&#8211;*/<br />
	width: 400px; /*sets a width of 400px*/<br />
	float: left; /*floats our information class left*/<br />
	color: #9f9e9e; /*sets our font color for our information class*/<br />
	font-size: 12px; /*sets our font size*/<br />
	text-align: justify; /*justify&#8217;s our text*/<br />
	line-height: 18px; /*sets a line height of 18px*/<br />
	margin-right: 25px; /*adds a right margin of 25px*/<br />
}</p>
<p>.info-header { /*&#8211;CONTENT BOX TITLE CONTAINER&#8211;*/<br />
	width: 400px; /*sets our header width to 400px same as our information class*/<br />
	float: left; /*floats left*/<br />
	margin-right: 25px; /*adds a 15px margin right*/<br />
	margin-bottom: 10px; /*adds a bottom margin of 10px*/<br />
}</p>
<p>.info-header h1 { /*&#8211;CONTENT BOX TITLE&#8211;*/<br />
	color: #ff9833; /*sets our text color*/<br />
	text-transform: uppercase; /*transforms our text to uppercase*/<br />
	font-family: Impact; /*sets font family to impact*/<br />
	font-size: 18px; /*sets font size to 18px*/<br />
	line-height: 20px; /*increases line height to 20px*/<br />
	border-bottom-width: 1px; /*adds a bottom border with a width of 1px*/<br />
	border-bottom-style: solid; /*sets border style to solid*/<br />
	border-bottom-color: #c9c9c9; /*sets border color*/<br />
}</p>
<p>#left { /*&#8211;LEFT CONTENT TEXT BOX&#8211;*/<br />
	float: left; /*floats left*/<br />
	width: 400px; /*sets a width of 400px*/<br />
	margin-top: 30px; /*adds a top margin of 30px*/<br />
	margin-bottom: 40px; /*adds a bottom margin of 40px*/<br />
}</p>
<p>#right { /*&#8211;RIGHT CONTENT TEXT BOX&#8211;*/<br />
	float: right; /*floats right*/<br />
	width: 400px; /*sets a width of 400px*/<br />
	margin-top: 30px; /*adds a top margin of 30px*/<br />
	margin-bottom: 40px; /*adds a bottom margin of 40px*/<br />
}<br />
[/sourcecode]</p>
<p>Now finally for our footer, we need to create the footer outiside our container DIV as the background will be repeating across the screen. Open up your PSD file and make a small selection on your footer area.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p><img src="http://www.hv-designs.co.uk/tutorials/webdesign_layout9_css/step7.gif" alt="Step7" width="600" height="357" /></p>
<p>Crop the image then save it as &#8220;footer_bg.PNG&#8221; inside your images folder. We mock our footer up like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;footer starts&#8211;&gt;</p>
<p>&lt;div id=&quot;footer-content&quot;&gt;<br />
&lt;p&gt; Copyright &amp;copy; yoursite.com All Rights Reserved&lt;/p&gt;<br />
&lt;/div&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;footer ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Pretty simple, our styles for our footer are.</p>
<p>[sourcecode language="css"]<br />
#footer { /*&#8211;FOOTER CONTAINER&#8211;*/<br />
	background-image: url(images/footer-bg.png); /*sets our footer background8*/<br />
	background-repeat: repeat-x; /*sets background to repeat horizontally*/<br />
	clear: both; /*clears left and right floats*/<br />
}</p>
<p>#footer-content { /*&#8211;FOOTER CONTENT&#8211;*/<br />
	width: 850px; /*adds a width of 850px same as our container*/<br />
	margin-top: 50px; /*adds a top margin of 50px*/<br />
	margin-right: auto; /*sets right margin to auto*/<br />
	margin-bottom: auto; /*sets bottom margin to auto*/<br />
	margin-left: auto; /*sets left margin to auto*/<br />
	padding-top: 50px; /*adds 50px top padding*/<br />
	padding-bottom: 50px; /*adds bottom padding of 50px*/<br />
	color: #9F9E9E; /*sets color of footer text*/<br />
	text-align: center; /*aligns text center*/<br />
}<br />
[/sourcecode]</p>
<p>Finally give your template a blast in your browser to see how it looks. Thats all from me, dont forget to subscribe via RSS and twitter. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/04/29/web-design-layout-9-sitebuild/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>BLOOpress CSS Template</title>
		<link>http://www.hv-designs.co.uk/2009/04/21/bloopress-css-template/</link>
		<comments>http://www.hv-designs.co.uk/2009/04/21/bloopress-css-template/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 17:18:17 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1249</guid>
		<description><![CDATA[Hello everybody welcome to part #2 of the BLOOpress wordpress theme, today we&#8217;ll be converting the BLOOpress photoshop mockup into a one page CSS template. The CSS template will basically immertate the main page of our wordpress theme. Most of the styles used in the main page of our theme will be re-used over and [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everybody welcome to part #2 of the BLOOpress wordpress theme, today we&#8217;ll be converting the BLOOpress photoshop mockup into a one page CSS template.</p>
<p><span id="more-1249"></span></p>
<p>The CSS template will basically immertate the main page of our wordpress theme. Most of the styles used in the main page of our theme will be re-used over and over in other areas of the website. Right lets get started, create a new folder on your desktop called &#8220;BLOOpress&#8221; inside this folder also create another folder called &#8220;images&#8221;. Open up notepad then goto &#8220;file &gt; save as&#8221; save the blank notepad document as &#8220;style.css&#8221; within the &#8220;BLOOpress&#8221; folder. Open up dreamweaver and start a new HTML document.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step1.gif" alt="Step1" width="600" height="462" /></p>
<p>Straight away goto &#8220;file &gt; save as&#8221;, save the HTML file as &#8220;index.html&#8221; inside your &#8220;BLOOpress&#8221; folder on your desktop. Select the &#8220;code view&#8221; within the dreamweaver interface.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step2.gif" alt="Step2" width="600" height="255" /></p>
<p>Lets add our website title and link our style sheet just to get the ball rolling. In between the &#8220;TITLE&#8221; tag add your website title or what ever it is you want to be displayed in the main window. Then link your style sheet.</p>
<p>[sourcecode language="html"]<br />
&lt;title&gt;BLOOpress &quot;another wordpress blog&quot; | Welcome&#8230;&lt;/title&gt;</p>
<p>&lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
[/sourcecode]</p>
<p>You dont have to type out the whole line of text to add your style sheet, there are tools available within the dreamweaver application to automate this process. You can use this tool by rolling out the right panel by clicking the little grey arrow, once open click the little chain icon.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step3.gif" alt="Step3" width="374" height="439" /></p>
<p>I strongly recommend you get to grips with some of the tools within the dreamweaver application as they can make your life a whole lot easier, some of the tools include browser compatability tests as well as CSS/HTML validation.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step4.gif" alt="Step4" width="600" height="200" /></p>
<p>Okay lets get this template moving, open up your PSD in photoshop, zoom into the top left hand corner of the template, hide the top nav link text, the second nav link text, header rectangle and the website title including the pattern and shine effect. Select the rectangular marquee tool, at the top change style to &#8220;fixed size&#8221; enter the values 25px for the width and 225px the height. Goto &#8220;layer &gt; flatten image&#8221; then make a selection like the image below (DONT SAVE PSD)</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step5.gif" alt="Step5" width="600" height="673" /></p>
<p>Once you&#8217;ve made the selection like above goto &#8220;image &gt; crop&#8221;. Now goto &#8220;file &gt; save as&#8221;, save the image as &#8220;bg.PNG&#8221; in the images folder within the BLOOpress folder. Close your PSD FILE and head back over to dreamweaver lets start to mockup some of the layout in HTML. Take alook at the image below, this will give you some idea on how we will be doing it.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step6.gif" alt="Step6" width="600" height="164" /></p>
<p>In code we mock it up like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;container starts&#8211;&gt;</p>
<p>&lt;div id=&quot;nav1&quot;&gt;&lt;!&#8211;nav1 starts&#8211;&gt;<br />
&lt;ul class=&quot;nav1-links&quot;&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sitemap&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact Me&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;nav 1 ends&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;</p>
<p>&lt;div id=&quot;nav2&quot;&gt;&lt;!&#8211;nav2 starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;nav2 ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>First we make a container which will be the container which holds the whole site, we then add a DIV for our first navigation, a DIV for our header and a DIV for our second navigation. Inside our first navigation DIV we need to add a simple unordered list. Now we&#8217;ve mocked up some of the top half of the website lets begin adding our styles to our style sheet. Open up your style.CSS file and copy the code below, each style element is comment coded already for your convience.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;MAIN STYLES&#8212;&#8212; */</p>
<p>*{<br />
padding:0;<br />
margin:0;<br />
}</p>
<p>body {<br />
background-color: #202020; /*sets background color for the whole website*/<br />
font-family: Verdana, Arial, Helvetica, sans-serif; /*sets font family for the whole website*/<br />
font-size: 12px; /*sets a font size of 12px for the whole website*/<br />
color: #FFFFFF; /*sets default color of text to white*/<br />
background-image: url(images/bg.png); /*our repeated background image*/<br />
background-repeat: repeat-x; /*repeats background horizontally*/<br />
}</p>
<p>#container {<br />
width: 900px; /*sets a website width of 900px*/<br />
margin-right: auto; /*centers website*/<br />
margin-bottom: 40px; /*adds 40px margin to the bottom*/<br />
margin-left: auto; /*centers website*/<br />
}</p>
<p>/* &#8212;&#8212;NAV1 STYLES&#8212;&#8212; */</p>
<p>#nav1 {<br />
float: left; /*floats nav1 left in the container*/<br />
height: 26px; /*gives nav1 a height of 26px*/<br />
width: 900px; /*gives nav1 a width of 900px*/<br />
padding-top: 10px; /*adds 10px padding to the top*/<br />
}</p>
<p>.nav1-links li{<br />
list-style:none; /*removes bullet points from list*/<br />
display:inline; /*displays links horizontally*/<br />
}</p>
<p>.nav1-links a {<br />
color: #FFFFFF; /*sets nav links to white*/<br />
font-family:Verdana, Arial, Helvetica, sans-serif; /*sets nav1&#8242;s font family*/<br />
font-size: 12px; /*sets nav1&#8242;s font size*/<br />
text-decoration: none; /*removes underline from links*/<br />
padding-right: 20px; /*adds 20px right padding to each link*/<br />
}</p>
<p>.nav1-links a:hover {<br />
color: #0390c5; /*sets nav1 link hover color*/<br />
}</p>
<p>/* &#8212;&#8212;HEADER STYLES&#8212;&#8212; */</p>
<p>#header {<br />
}</p>
<p>/* &#8212;&#8212;NAV2 STYLES&#8212;&#8212; */</p>
<p>#nav2 {<br />
float: left; /*floats our nav2 left in the container*/<br />
height: 46px; /*gives our nav2 a height of 46px*/<br />
width: 900px; /*gives our nav to a width of 900px*/<br />
}<br />
[/sourcecode]</p>
<p>Most of the styles are pretty simple the only thing that may be different are the heights of the elements, depending on how you made your PSD file, you may want to double check the height of your navigations and header. Notice we left the header DIV blank, this is the next part we need to tackle. Open up your PSD file and select the header layer, make a selection of the whole header exluding all the header elements. Save the header background as &#8220;header_bg.PNG&#8221; inside your images folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step7.gif" alt="Step7" width="600" height="110" /></p>
<p>Depending on how big you made your header part, the height values may differ to mine. You may need to determine your header image height. We can then add our header styles to the CSS file.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;HEADER STYLES&#8212;&#8212; */</p>
<p>#header {<br />
float: left; /*floats our header left in the container*/<br />
height: 136px; /*gives our header a height of 136px*/<br />
width: 900px; /*gives our header a width of 900px*/<br />
background-image: url(images/header_bg.png); /*our header background image*/<br />
background-repeat: no-repeat; /*stops header background repeating itself*/<br />
}<br />
[/sourcecode]</p>
<p>You may now test your HTML file inside your browser and see how it looks, heres a small screenshot of mine.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step8.gif" alt="Step8" width="600" height="200" /></p>
<p>The next item we need to tackle will be our website title, slogan and search field. Unfortunetly we aint going to be able to use plain text for the website title, so were going to have to use an image. Open up your PSD file, hide all yours layer apart from your website title, slogan, lines pattern and shine. Make a selection like the image below, NOTE ive left the background on so you can see the selection. Once you&#8217;ve made the selection goto &#8220;image &gt; crop&#8221; save the image as &#8220;title.PNG&#8221; inside your images folder.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step9.gif" alt="Step9" width="600" height="111" /></p>
<p>Inside your &#8220;header DIV&#8221; create another DIV of title.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;<br />
&lt;div id=&quot;title&quot;&gt;&lt;!&#8211;title image start&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;title image end&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Notice ive left a space inbetween the &#8220;title DIV&#8221; in this bit we need to add our title image.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;<br />
&lt;div id=&quot;title&quot;&gt;&lt;!&#8211;title image start&#8211;&gt;<br />
&lt;img src=&quot;images/title.png&quot; alt=&quot;BLOOpress&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;title image end&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Now we&#8217;ve inserted our image we need to style our &#8220;title DIV&#8221;, head over to your style sheet, within the &#8220;header styles section&#8221; create a new style of &#8220;title&#8221;.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;HEADER STYLES&#8212;&#8212; */</p>
<p>#header {<br />
float: left; /*floats our header left in the container*/<br />
height: 136px; /*gives our header a height of 136px*/<br />
width: 900px; /*gives our header a width of 900px*/<br />
background-image: url(images/header_bg.png); /*our header background image*/<br />
background-repeat: no-repeat; /*stops header background repeating itself*/<br />
}</p>
<p>#title {<br />
}<br />
[/sourcecode]</p>
<p>For the title we need to float it left, add a fixed width and height which should be exactly the same as our image. We then need to add a top margin to push the title down so its kind of centered inside our header, the code looks like this.</p>
<p>[sourcecode language="css"]<br />
#title {<br />
float: left; /*floats our header title image in the container*/<br />
height: 37px; /*our title div has a height of 37px*/<br />
width: 367px; /*our title div has a width of 367px*/<br />
margin-top: 50px; /*push our image down from the top 50px*/<br />
}<br />
[/sourcecode]</p>
<p>Check your website inside your browser to reflect the changes you just made. Once you&#8217;ve checked it and all is fine, create yea another DIV inside your &#8220;header DIV&#8221; called &#8220;search-from&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;<br />
&lt;div id=&quot;title&quot;&gt;&lt;!&#8211;title image start&#8211;&gt;<br />
&lt;img src=&quot;images/title.png&quot; alt=&quot;BLOOpress&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;title image end&#8211;&gt;</p>
<p>&lt;div id=&quot;search-form&quot;&gt;&lt;!&#8211;search form starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;search form ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside the &#8220;search-form DIV&#8221; insert a text field and button. It doesnt need to be a valid form as the form will automatically be created in wordpress. On each field and button add a class that will be relivant to the certain item, ive used a class of &#8220;search-field&#8221; for the search field and &#8220;search-button&#8221; for the submit button.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;search-form&quot;&gt;&lt;!&#8211;search form starts&#8211;&gt;<br />
&lt;input type=&quot;text&quot; class=&quot;search-field&quot; value=&quot;Search&#8230;&quot; size=&quot;30&quot; /&gt;<br />
&lt;input name=&quot;Submit&quot; type=&quot;submit&quot; class=&quot;search-button&quot; value=&quot;Go!&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;search form ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>We now need to add our styling to the search field &amp; button to match our PSD. The first item we will style will be the &#8220;search-form DIV&#8221;. The code looks like this.</p>
<p>[sourcecode language="css"]<br />
#search-form{<br />
float: right; /*floats our search div to the right*/<br />
margin-top: 54px; /*adds a margin of 54px to the top of our div*/<br />
}<br />
[/sourcecode]</p>
<p>Now the form is postioned lets go about adding our styling to the text field and button. You need to add two classes into your style sheet. &#8220;.search-field&#8221; &amp; &#8220;.search-button&#8221;. Lets style the search field first.</p>
<p>[sourcecode language="css"]<br />
.search-field{<br />
font-style: italic; /*adds font type intalic to text inside the search field*/<br />
padding: 5px; /*gives 5px padding all the way around the field*/<br />
background-color: #262626; /*changes background color*/<br />
border: 1px solid #323232; /*adds a 1 pixel border*/<br />
color: #FFFFFF; /*color of the text typed into the field*/<br />
}<br />
[/sourcecode]</p>
<p>The submit button or go button whatever you want to call it, is going to use an image as the button. Firstly we must open our PSD and make a selection around the button.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step10.gif" alt="Step10" width="487" height="351" /></p>
<p>Crop your PSD around your button then save it as &#8220;submit_bg.PNG&#8221; into your images folder. We now need to alter our search button code. Head over to your HTML file in dreamweaver inside the code view. We need to change the type from submit to image, then add our image url. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;search-form&quot;&gt;&lt;!&#8211;search form starts&#8211;&gt;<br />
&lt;input type=&quot;text&quot; class=&quot;search-field&quot; value=&quot;Search&#8230;&quot; size=&quot;30&quot; /&gt;<br />
&lt;input name=&quot;Submit&quot; type=&quot;image&quot; SRC=&quot;images/submit_bg.png&quot; HEIGHT=&quot;30&quot; WIDTH=&quot;40&quot; BORDER=&quot;0&quot; ALT=&quot;Submit Form&quot; class=&quot;search-button&quot; value=&quot;Go!&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;search form ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Then we need to add a single style to our &#8220;.search-button&#8221; class, which looks like this.</p>
<p>[sourcecode language="css"]<br />
.search-button{<br />
vertical-align: top; /*vertically aligns the button from the top*/<br />
}<br />
[/sourcecode]</p>
<p>Thats the header part pretty much finished, just one last item to finish off and thatst he second navigation. In the &#8220;nav 2 DIV&#8221; add a simple unordered list, you can use the class of &#8220;nav1-links&#8221; for this menu also. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;nav2&quot;&gt;&lt;!&#8211;nav2 starts&#8211;&gt;<br />
&lt;ul class=&quot;nav1-links&quot;&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#1&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#2&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#3&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#4&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#5&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#6&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#7&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#8&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#9&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#10&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Page#11&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;nav2 ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>We have already set out some styles for a nav2 DIV, all&#8217;s we need to do is add some top padding to center the navigation links.</p>
<p>[sourcecode language="css"]<br />
#nav2 {<br />
float: left; /*floats our nav2 left in the container*/<br />
height: 31px; /*gives our nav2 a height of 46px*/<br />
width: 900px; /*gives our nav to a width of 900px*/<br />
padding-top: 15px; /*gives a 15px padding to the top of the nav2 div*/<br />
}<br />
[/sourcecode]</p>
<p>Okay now for our content area which will contain our main posts and sidebar. Each wordpress post will look like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step11.gif" alt="Step11" width="600" height="243" /></p>
<p>In code we lay it out like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;left-content&quot;&gt;&lt;!&#8211;left content starts&#8211;&gt;</p>
<p>&lt;div class=&quot;post-box&quot;&gt;&lt;!&#8211;wordpress post content box starts&#8211;&gt;<br />
&lt;div class=&quot;post-thumb&quot;&gt;&lt;!&#8211;wordpress post thumbnail starts&#8211;&gt;<br />
&lt;img src=&quot;images/example-thumbnail.gif&quot; alt=&quot;EXAMPLE THUMBNAIL&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;wordpress post thumbnail ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;wordpress post content box ends&#8211;&gt;</p>
<p>&lt;div class=&quot;post-footer&quot;&gt;&lt;!&#8211;wordpress posts footer&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;wordpress post footer ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;left content ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>we start by making a DIV of left content, which is where all our main posts within wordpress will lie. We then make 2 class DIV&#8217;s for our main post box, and our post thumbnail. Inside the class &#8220;post-thumb&#8221; ive added a example thumbnail using the actual size i made it on the PSD file. We will remove the thumbnail from the code when were coding it to wordpress. Lastly we add another class which is for our post footer. Now for the styles.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;LEFT CONTENT STYLES&#8212;&#8212; */</p>
<p>#left-content {<br />
float: left; /*floats our left content to the left*/<br />
width: 600px; /*gives the left-content div a width of 600px*/<br />
margin-top: 20px; /*adds 40px margin to the bottom*/<br />
}</p>
<p>.post-box {<br />
background-color: #292929; /*adds a background color to our post box*/<br />
border: 1px solid #2f2f2f; /*gives our box a 1px border*/<br />
padding: 10px; /*adss 10px padding all the way around our box*/<br />
float: left; /*floats our box left inside &quot;left-content div*/<br />
width: 580px; /*gives our box a width of 580px with the 10px padding makes a total of 600px*/<br />
}</p>
<p>.post-thumb {<br />
float: left; /*floats our post thumbnail left*/<br />
padding: 4px; /*adds 4px padding around the thumbnial*/<br />
background-color: #1d1d1d; /*adds a background color behind our thumnail*/<br />
border: 1px solid #2f2f2f; /*adds a 1px solid border around our thumbnail*/<br />
}<br />
[/sourcecode]</p>
<p>Once you&#8217;ve added the styles you can test your template inside the browser. Still with our content box we need to add our post-title and some example post text. Underneath your &#8220;post-thumb class&#8221; add another class called &#8220;post-title&#8221;. Inside the class &#8220;post-title&#8221; also wrap an exaple header in a H1 tag.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;post-title&quot;&gt;&lt;!&#8211;wordpress post title starts&#8211;&gt;<br />
&lt;h1&gt;Example WordPress Title&lt;/h1&gt;<br />
&lt;/div&gt;&lt;!&#8211;wordpress post title ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>The styling for our &#8220;post-title&#8221; and H1 tag looks like this.</p>
<p>[sourcecode language="css"]<br />
.post-title h1 {<br />
color: #0c78a8; /*h1 tag text color*/<br />
font-family: Verdana, Arial, Helvetica, sans-serif; /*h1 tag font group*/<br />
font-size: 24px; /*h1 tag font size*/<br />
}</p>
<p>.post-title {<br />
float: left; /*floats our post title left*/<br />
width: 378px; /*adds a width to our post-title class*/<br />
margin-left: 4px; /*adds a 4px left margin*/<br />
}<br />
[/sourcecode]</p>
<p>Test your template inside your browser, you should now have an example post title, heres how mine looks in IE7.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step12.gif" alt="Step12" width="600" height="505" /></p>
<p>We can now add our example paragraph to our example post. Similar to what we did above, underneath our post title class we need to add another class called &#8220;post-content&#8221; inside the post-content class add a simple P tag with an example paragraph. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;post-content&quot;&gt;<br />
&lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce velit nulla, pretium sit amet, sagittis et, tristique at, libero. Duis quam. Aliquam libero lacus, tristique et, pellentesque nec, commodo et, tortor. Proin sem. Cras elit nunc, luctus id, consectetur vel, placerat id, ipsum. Suspendisse eleifend laoreet velit.&lt;/p&gt;<br />
&lt;/div&gt;<br />
[/sourcecode]</p>
<p>We can then begin to style our &#8220;post-content class&#8221;, which looks like this.</p>
<p>[sourcecode language="css"]<br />
.post-content {<br />
float: left; /*floats our post content left*/<br />
width: 378px; /*adds a width to our content class*/<br />
margin-left: 4px; /*adds a 4px left margin*/<br />
font-family: Verdana, Arial, Helvetica, sans-serif; /*content font group*/<br />
line-height: 18px; /*post content line height*/<br />
font-size: 11px; /*adds a font size of 11px to our post content*/<br />
text-align: justify; /*justifys our paragraphs inside our post content class*/<br />
margin-top: 4px; /*adds a 4px top margin to our post-content class*/<br />
font-style: italic; /*gives our paragraphs a italic look*/<br />
}<br />
[/sourcecode]</p>
<p>Finally underneath your post-content class there should be a class called &#8220;post-footer&#8221;. Inside this class add a simple paragraph saying &#8220;104 Comments | Posted on 16/04/09 @ 10:38am&#8221;. Or something similar, in wordpress it will all be replaced with PHP code.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;post-footer&quot;&gt;&lt;!&#8211;wordpress posts footer&#8211;&gt;<br />
&lt;p&gt;104 Comments | Posted on 16/04/09 @ 10:38am&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;wordpress post footer ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Before we add our styling to the post-footer class we firstly need to make the post footer background. Head over to your PSD file and make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step13.gif" alt="Step13" width="600" height="601" /></p>
<p>Once you&#8217;ve made the selection goto &#8220;layer &gt; flatten image&#8221; Once flattened goto &#8220;image &gt; crop&#8221;. Save the final image as &#8220;post_footer_bg.PNG&#8221; inside your images folder. Then add these styles to your &#8220;post-footer class&#8221;.</p>
<p>[sourcecode language="css"]<br />
.post-footer {<br />
border: 1px solid #0c5b7d; /*adss 10px padding all the way around our box*/<br />
float: left; /*floats our box left inside &quot;left-content div*/<br />
width: 580px; /*gives our box a width of 580px*/<br />
background-image: url(images/post_footer_bg.png); /*adds background image*/<br />
background-repeat: repeat-x; /*repeats background horizontally*/<br />
height: 20px; /*gives our class a height of 20px*/<br />
padding-top: 6px; /*adss 6px padding to the top*/<br />
padding-right: 10px; /*adds 10 px padding to the right*/<br />
padding-left: 10px; /*adds 10px padding to the left*/<br />
margin-bottom: 20px; /*adds a 20px margin between each post*/<br />
[/sourcecode]</p>
<p>Test your template in your browser to see how everything measures up. Heres mine.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step14.gif" alt="Step14" width="600" height="550" /></p>
<p>To add an extra 2 posts underneath each other you need to copy from the class &#8220;post-box&#8221; to the ending DIV of &#8220;post-footer&#8221; then just paste the text underneath all the code for the first box. Right lets get one with the sidebar area. Underneath the ending DIV of the &#8220;left-content DIV&#8221; add another DIV called &#8220;right-content&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;right-content&quot;&gt;&lt;!&#8211;sidebar starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;sidebar ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Add these styles for the right-content DIV inside your stylesheet.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;SIDEBAR STYLES&#8212;&#8212; */</p>
<p>#right-content {<br />
float: right; /*floats right content div to the right*/<br />
width: 280px; /*gives our div right content a width of 280px*/<br />
margin-top: 20px; /*adds 40px margin to the bottom*/<br />
}<br />
[/sourcecode]</p>
<p>Inside your &#8220;right-content DIV&#8221; add another DIV called &#8220;stay-connected&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;right-content&quot;&gt;&lt;!&#8211;sidebar starts&#8211;&gt;</p>
<p>&lt;div id=&quot;stay-connected&quot;&gt;&lt;!&#8211;stay connected box starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;stay connected box ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;sidebar ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>We need to now extract the background from our stay connected box within our PSD file. Make a selection like the image below, miss out the stroke that is applied to the box.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step15.gif" alt="Step15" width="600" height="483" /></p>
<p>Save the image as &#8220;stay_connected_bg.PNG&#8221; inside your images folder. We now need to add our styles for our stay connected box.</p>
<p>[sourcecode language="css"]<br />
#stay-connected {<br />
float: right; /*floats our box to the right*/<br />
width: 258px; /*gives our box a width of 258px*/<br />
border: 1px solid #0a6085; /*adds a 1px border to our box*/<br />
background-image: url(images/stay_connected_bg.png); /*adds our background image*/<br />
background-repeat: repeat-x; /*repeats our background image horizontally*/<br />
background-color: #0474a5; /*chnanges background color*/<br />
padding-top: 10px; /*adds 10px padding top*/<br />
padding-right: 10px; /*adds 10px padding right*/<br />
padding-bottom: 20px; /*adds 20px padding bottom*/<br />
padding-left: 10px; /*adds 10px padding left*/<br />
}<br />
[/sourcecode]</p>
<p>Head back over to your HTML code, inside your &#8220;stay connected DIV&#8221; add a h1 tag with the text &#8220;stay connected&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;stay-connected&quot;&gt;&lt;!&#8211;stay connected box starts&#8211;&gt;<br />
&lt;h1&gt;Stay Connected&#8230;&lt;/h1&gt;<br />
&lt;/div&gt;&lt;!&#8211;stay connected box ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside your style sheet add the styles for your H1 tag.</p>
<p>[sourcecode language="css"]<br />
#stay-connected h1 {<br />
font-family: Verdana, Arial, Helvetica, sans-serif; /*font family for the H1 tag*/<br />
font-size: 16px; /*font size for the H1 tag*/<br />
color: #FFFFFF; /*color of the H1 tag*/<br />
text-align: center; /*aligns H1 tag center*/<br />
margin-bottom: 20px; /*adds a 20px margin to the bottom of the h1 tag*/<br />
}<br />
[/sourcecode]</p>
<p>The next part will be adding the icons to our stay connected box, but first we must save them as individual images from our PSD file. Copy and paste your icons to a blank canvas of 30px x 30px you may need to resize them abit. Make sure your icons are on transparant backgrounds then save them as what_ever_icon.PNG inside your images folder. Once you&#8217;ve sorted all your icons head back over to your HTML code. Underneath your H1 tag we need to add another two CLASSES, a class of &#8220;sc-icons&#8221; and &#8220;icon-text&#8221;. Inside the &#8220;sc-icon&#8221; class add your icon, inside the &#8220;icon-text&#8221; class add to P tags each with a class to represent each P tag.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;right-content&quot;&gt;&lt;!&#8211;sidebar starts&#8211;&gt;</p>
<p>&lt;div id=&quot;stay-connected&quot;&gt;&lt;!&#8211;stay connected box starts&#8211;&gt;<br />
&lt;h1&gt;Stay Connected&#8230;&lt;/h1&gt;</p>
<p>&lt;div class=&quot;sc-icon&quot;&gt;<br />
&lt;img src=&quot;images/rss_icon.png&quot; alt=&quot;Subscribe RSS&quot; /&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;icon-text&quot;&gt;<br />
&lt;p class=&quot;subscribe&quot;&gt;Subscribe via RSS&lt;/p&gt;<br />
&lt;p class=&quot;subscribe2&quot;&gt;Updates in your reader&lt;/p&gt;<br />
&lt;/div&gt;<br />
&lt;/div&gt;&lt;!&#8211;stay connected box ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;sidebar ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>We style these classes like this.</p>
<p>[sourcecode language="css"]<br />
.sc-icon {<br />
float: left; /*floats icons left*/<br />
height: 30px; /*has height of 30px (relates to height of actual image*/<br />
width: 30px; /*has width of 30px (relates to width of actual image*/<br />
margin-right: 10px; /*adds a 10px margin right*/<br />
margin-bottom: 10px; /*adds a 10px margin bottom*/<br />
margin-left: 20px; /*adds a 20px margin left*/<br />
}</p>
<p>.icon-text {<br />
float: left; /*floats icon text to the left*/<br />
height: 30px; /*gives the text BOX a height of 30px*/<br />
width: 180px; /*gives the box a width of 180px*/<br />
margin-bottom: 10px; /*adds a 10px margin bottom*/<br />
}</p>
<p>.subscribe {<br />
color: #FFFFFF; /*color of text*/<br />
font-size: 14px; /*font size of text*/<br />
font-weight: bold; /*gives text a bold look*/<br />
}</p>
<p>.subscribe2 {<br />
font-size: 10px; /*gives text a font size of 10px*/<br />
color: #8bdbff; /*changes color fo text*/<br />
}<br />
[/sourcecode]</p>
<p>Now you need to duplicate the code for the icon and text to add further icons, making sure you change the image SRC to another icon. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;stay-connected&quot;&gt;&lt;!&#8211;stay connected box starts&#8211;&gt;<br />
&lt;h1&gt;Stay Connected&#8230;&lt;/h1&gt;</p>
<p>&lt;div class=&quot;sc-icon&quot;&gt;&lt;!&#8211;RSS icon&#8211;&gt;<br />
&lt;img src=&quot;images/rss_icon.png&quot; alt=&quot;Subscribe RSS&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;RSS icon ends&#8211;&gt;</p>
<p>&lt;div class=&quot;icon-text&quot;&gt;&lt;!&#8211;RSS icon text&#8211;&gt;<br />
&lt;p class=&quot;subscribe&quot;&gt;Subscribe via RSS&lt;/p&gt;<br />
&lt;p class=&quot;subscribe2&quot;&gt;Updates in your reader&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;RSS icon text ends&#8211;&gt;</p>
<p>&lt;div class=&quot;sc-icon&quot;&gt;&lt;!&#8211;TWITTER icon&#8211;&gt;<br />
&lt;img src=&quot;images/twitter_icon.png&quot; alt=&quot;Subscribe Twitter&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;TWITTER icon ends&#8211;&gt;</p>
<p>&lt;div class=&quot;icon-text&quot;&gt;&lt;!&#8211;TWITTER icon text&#8211;&gt;<br />
&lt;p class=&quot;subscribe&quot;&gt;Subscribe via twitter&lt;/p&gt;<br />
&lt;p class=&quot;subscribe2&quot;&gt;Updates on your twitter&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;TWITTER icon text ends&#8211;&gt;</p>
<p>&lt;div class=&quot;sc-icon&quot;&gt;&lt;!&#8211;EMAIL icon&#8211;&gt;<br />
&lt;img src=&quot;images/mail_icon.png&quot; alt=&quot;Subscribe Mail&quot; /&gt;<br />
&lt;/div&gt;&lt;!&#8211;EMAIL icon ends&#8211;&gt;</p>
<p>&lt;div class=&quot;icon-text&quot;&gt;&lt;!&#8211;EMAIL icon text&#8211;&gt;<br />
&lt;p class=&quot;subscribe&quot;&gt;Subscribe via email&lt;/p&gt;<br />
&lt;p class=&quot;subscribe2&quot;&gt;Updates in your mailbox&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;EMAIL icon text ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;stay connected box ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Test your template to see if any changes need making, mine loads up fine in IE7 and firefox. Heres my preview in IE7.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/bloopress/pt2/step16.gif" alt="Step16" width="600" height="345" /></p>
<p>The rest of the sidebar we&#8217;ll make when we move it over to wordpress. Now for the footer, firstly we need our repeated background image from our PSD&#8230; you should know how to do that by now. Goto your HTML code UNDERNEATH your ending container DIV draft out your footer. We need two DIV&#8217;s one for the footer background and another one for the actual footer. Inside the actual footer we need to add two P tags with a class.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;div id=&quot;footer-bg&quot;&gt;&lt;!&#8211;footer background starts&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;actual footer starts&#8211;&gt;<br />
&lt;p class=&quot;footer-left&quot;&gt;BLOOpress &quot;your slogan here&quot;&lt;/p&gt;&lt;!&#8211;left text&#8211;&gt;<br />
&lt;p class=&quot;footer-right&quot;&gt;Copyright BLOOpress All Rights Reserved&lt;/p&gt;&lt;!&#8211;right text&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;actual footer ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;footer background ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>The styles for our footer are as follows.</p>
<p>[sourcecode language="css"]<br />
/* &#8212;&#8212;FOOTER STYLES&#8212;&#8212; */</p>
<p>#footer-bg {<br />
height: 25px; /*gives footer a height of 25px*/<br />
clear: both; /*clears both floats*/<br />
background-image: url(images/footer_bg.png); /*adds background image*/<br />
background-repeat: repeat-x; /*repeats background image horizontally*/<br />
}</p>
<p>#footer {<br />
width: 900px; /*gives the footer a width of 900px*/<br />
margin-right: auto; /*centers div*/<br />
margin-left: auto;/*centers div*/<br />
}</p>
<p>.footer-left {<br />
float: left; /*floats left*/<br />
padding-top: 5px; /*adds top padding of 5px*/<br />
}</p>
<p>.footer-right {<br />
float: right; /*foats rights*/<br />
padding-top: 5px; /*adds 5px padding to the top*/<br />
}<br />
[/sourcecode]</p>
<p>CONGRATULATIONS, you&#8217;ve completed the conversion to CSS. I hope you&#8217;ve enjoyed this tutorial, dont forget to subscribe via RSS and twitter. Next time we&#8217;ll be converting it into a live wordpress theme.</p>
<p><strong>MINOR FIX 24/04/2009</strong><br />
<span style="color: #ff00ff;">Remove the 40px margin from the container DIV<br />
Add 20px bottom margin to the DIV nav#2</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/04/21/bloopress-css-template/feed/</wfw:commentRss>
		<slash:comments>36</slash:comments>
		</item>
		<item>
		<title>PSD to CSS to WordPress PT.2</title>
		<link>http://www.hv-designs.co.uk/2009/03/29/psd-to-css-to-wordpress-pt2/</link>
		<comments>http://www.hv-designs.co.uk/2009/03/29/psd-to-css-to-wordpress-pt2/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 07:52:21 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=1206</guid>
		<description><![CDATA[Hello welcome to part #2 of the &#8220;mywordpress&#8221; tutorial, today were going to be converting our PSD file into a working CSS template ready for when we convert it over to wordpress. You can download the CSS template for FREE by using the button above. Right lets get started, create a folder on your desktop [...]]]></description>
			<content:encoded><![CDATA[<p>Hello welcome to part #2 of the &#8220;mywordpress&#8221; tutorial, today were going to be converting our PSD file into a working CSS template ready for when we convert it over to wordpress. </p>
<p><span id="more-1206"></span></p>
<p>You can download the CSS template for FREE by using the button above. Right lets get started, create a folder on your desktop called &#8220;mywordpress&#8221; inside this folder create another folder called &#8220;images&#8221;. Open up a blank notepad document then goto &#8220;file > save as&#8221; then save the blank file as &#8220;style.css&#8221; inside the &#8220;mywordpress&#8221; folder. Open up dreamweaver and start a new HTML document.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step1.gif" alt="Step1" width="600" height="462" /></p>
<p>Once the new blank HTML document has loaded goto &#8220;file > save as&#8221; then save it as &#8220;index.html&#8221; into your &#8220;mywordpress&#8221; folder on your desktop. Select the code view tab to view the code to the index.html file.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step2.gif" alt="Step2" width="600" height="255" /></p>
<p>Inside the &#8220;code view&#8221; edit the TITLE TAG to display what ever you want in your title bar of the browser. &#8220;MYWORDPRESS &#8211; fancy wordpress slogan here &#8211; Welcome&#8230;&#8221;.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;MYWORDPRESS &#8211; fancy wordpress slogan here &#8211; Welcome&#8230;&lt;/title&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>On the far right side of the dreamweaver window there should be a big box in which you can slide in and out.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step3.gif" alt="Step3" width="296" height="609" /></p>
<p>If you cant see it, click the little black arrow. If you find there are loads of boxes open just collapse them the only window we need is the CSS window. In the CSS window we can attach our style sheet by clicking the little chain button. OR if you prefer type it out by hand.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step4.gif" alt="Step4" width="374" height="439" /></p>
<p>Once you&#8217;ve clicked the chain button, you&#8217;ll be presented with a box like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step5.gif" alt="Step5" width="506" height="260" /></p>
<p>Just click browse and select your .CSS file in your &#8220;mywordpress&#8221; folder. Then click ok. You&#8217;ll notice once you click ok the style sheet is attached and the code is automatically written for you.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;MYWORDPRESS &#8211; fancy wordpress slogan here &#8211; Welcome&#8230;&lt;/title&gt;<br />
&lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>You can also add and edit any styles linked to your HTML document in the CSS window. Although i prefer to write out my CSS then edit or tweak in the CSS window just for quickness. When you start to write your CSS styles they will be automatically added into the CSS window, all&#8217;s you need to do is just double click what ever style you want to edit then a box will pop up with loads of wonderfull options. Right lets start mocking up our DIV&#8217;s in our HTML document, we&#8217;ll start with the top half first. Were going to need a container DIV, a DIV for the topbar, header and navigation. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />
&lt;title&gt;MYWORDPRESS &#8211; fancy wordpress slogan here &#8211; Welcome&#8230;&lt;/title&gt;<br />
&lt;link href=&quot;style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;/head&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;container starts&#8211;&gt;</p>
<p>    &lt;div id=&quot;top-bar&quot;&gt;&lt;!&#8211;top bar starts&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;top bar ends&#8211;&gt;</p>
<p>    &lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;</p>
<p>    &lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;navigation starts&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;navigation ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>Notice all my DIV&#8217;s are commented, i cant stress enough how important it is that you should comment code, it will save bags of time when finding you DIV&#8217;s later on as things can get quite messy. Another thing i tend to do is always TAB in DIV&#8217;s that are inside other DIV&#8217;s, it just keeps things nice and neat. Right open up your style sheet inside dreamweaver, the first items we need to style is the body of our document.</p>
<p>[sourcecode language="css"]<br />
/* MAIN BODY STYLES */</p>
<p>*{<br />
	padding:0;<br />
	margin:0;<br />
}</p>
<p>body {<br />
	background-image: url(images/bg.png);<br />
	background-repeat: repeat-x;<br />
	background-color: #f6f7f1;<br />
	font-family: Verdana, Arial, &quot;Century Gothic&quot;;<br />
	font-size: 12px;<br />
	color: #878787;<br />
}<br />
[/sourcecode]</p>
<p>Let me explain a little bit about the code above, firstly we dont want any of our document to have any padding or margin, setting the margins and padding to 0 will make the document sit flush at the top, sides and bottom of the browser. In the body style we have a background image which we&#8217;ll be creating in a moment, the background repeats along the x axis (horizontal). Then we have our document background color which is the color of the last pixel on the background image, then we have our font family, font size and default font color. Lets create our background image. Duplicate your PSD file (a backup is always good) open up your backup PSD file in photoshop, goto &#8220;layer > flatten image&#8221;. Select the rectangular marquee tool and make a 2 pixel wide selection spanning from the very top of your document down to the end of the last post. Keep the selection 1 pixel from the left side of the edge. If you start the selection from the edge you&#8217;ll get small inperfections on the image. as the last pixel on the navigation is slighly lighter. If you zoom in you&#8217;ll see. Once you&#8217;ve made the selection goto &#8220;image > crop&#8221; then save the image as &#8220;bg.png&#8221; inside your images folder. Once you&#8217;ve saved the image select the eye dropper tool, zoom right in to the bottom of the image and select the last pixel on the image, get the color code by clicking on your forground color, you&#8217;ll see the color code in the window that pops up.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step6.gif" alt="Step6" width="506" height="636" /></p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step7.gif" alt="Step7" width="550" height="371" /></p>
<p>The hex color code of the last pixel you need to paste into the &#8220;background-color&#8221; style in your CSS file. If you view you HTML document in your browser you should see your background in action. Now lets style the container, topbar and header.</p>
<p>[sourcecode language="css"]<br />
#container {<br />
	margin: auto;<br />
	width: 900px;<br />
}</p>
<p>#top-bar {<br />
	float: left;<br />
	height: 24px;<br />
	width: 900px;<br />
	padding-top: 8px;<br />
}</p>
<p>#header {<br />
	float: left;<br />
	height: 125px;<br />
	width: 900px;<br />
}<br />
[/sourcecode]</p>
<p>For the container we just want a 900px wide box which is centered, the 900px is what we created our PSD file at, you dont need a height as the container will increase or decrese depending on the amount of content. For the topbar we want to float it left, we also want it to be 900px wide. We also need to set a height, to determine the height i measured it in photoshop, the topbar was actually 32px in height, but we have to minus the padding 32 &#8211; 8 = 24. So we set the height to 24px. We also want abit of padding as we dont want the text in our topbar to be stuck right underneath our URL bar in the browser. If you find your text isnt quite centered due to you using a bigger size or something just adjust the padding. The header is pretty much the same as the top bar, 900px wide, floated left and a measured height of 125px. Now we need to fugure out how were going to display our elements inside our divs.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step8.gif" alt="Step8" width="600" height="257" /></p>
<p>As you can see from the image above its pretty straight forward, the topbar will have 2 lists inside of it, the header DIV will have to more DIV&#8217;s inside it one for the website title and slogan and another for the search fields. We write this in our HTML document like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;container starts&#8211;&gt;</p>
<p>&lt;div id=&quot;top-bar&quot;&gt;&lt;!&#8211;top bar starts&#8211;&gt;</p>
<p>&lt;ul class=&quot;nav1&quot;&gt;<br />
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Login&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Wordpress.org&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;ul class=&quot;nav2&quot;&gt;<br />
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Sitemap&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;top bar ends&#8211;&gt;</p>
<p>&lt;div id=&quot;header&quot;&gt;&lt;!&#8211;header starts&#8211;&gt;</p>
<p>&lt;div id=&quot;site-title&quot;&gt;&lt;!&#8211;site title starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;site title ends&#8211;&gt;</p>
<p>&lt;div id=&quot;search&quot;&gt;&lt;!&#8211;search starts&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;search ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside the topbar there is two unordered lists one with class of nav1 and the other with a class of nav2, then we&#8217;ve simply added two more DIV&#8217;s inside our header DIV. Lets style our topbar lists first, head over to your style sheet and add this code underneath your &#8220;top-bar&#8221; DIV.</p>
<p>[sourcecode language="css"]<br />
#top-bar a{<br />
	color: #FFFFFF;<br />
	text-decoration: none;<br />
}</p>
<p>#top-bar a:hover{<br />
	color: #323232;<br />
	text-decoration: none;<br />
}</p>
<p>.nav1 li {<br />
	display: inline;<br />
	list-style-type: none;<br />
	margin-right: 20px;<br />
	color: #FFFFFF;<br />
	float: left;<br />
}</p>
<p>.nav2 li{<br />
	display: inline;<br />
	list-style-type: none;<br />
	color: #FFFFFF;<br />
	float: right;<br />
	margin-left: 20px;<br />
}<br />
[/sourcecode]</p>
<p>The first two styles refer to the list&#8217;s links. &#8220;top-bar a&#8221; sets the links to have a color of white and the text-decoration removes the line underneath the link. The next one is the hover state of the link, when you hover over a link in the list the color will change to #323232. Then we have out two lists, we display our links inline oppsosed to vertically, list style type is set to none, this removes the bullet points from the list. nav1 is floated left and nav2 is floated right. The list that is floated left will have a right margin of 20px spacing the links apart by 20px then vise-versa for nav2. If you view your document in your browser you should see your lists active. Now lets add our website title and slogan, add the following code inside your &#8220;site-title&#8221; DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;site-title&quot;&gt;&lt;!&#8211;site title starts&#8211;&gt;</p>
<p>&lt;h1&gt;your&lt;span class=&quot;blue-title&quot;&gt;wordpress&lt;/span&gt;&lt;span class=&quot;slogan&quot;&gt; &quot;your wordpress slogan here&quot;&lt;/span&gt;&lt;/h1&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;site title ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>First we wrap out website title and slogan inside a H1 tag, because one of our words is blue in our title we need to add a span class before the word. So we add a span class of &#8220;blue-title&#8221; before the word &#8220;wordpress&#8221;. Then because our slogan will look different again we need to add another span class. A span class of slogan. Now we can style the word &#8220;wordpress&#8221; and the whole slogan sentance though css. You could just use an image but why mess about with images when the effect can be pulled off with CSS. We style our website title and slogan like this.</p>
<p>[sourcecode language="css"]<br />
#site-title{<br />
	height: 80px;<br />
	float: left;<br />
	padding-top: 45px;<br />
}</p>
<p>#site-title h1{<br />
	color: #FFFFFF;<br />
	text-transform: uppercase;<br />
	font-size: 24px;<br />
	font-style: italic;<br />
	font-weight: bold;<br />
}</p>
<p>.blue-title {<br />
	color: #309dcf<br />
}</p>
<p>.slogan {<br />
	font-size: 12px;<br />
	font-weight: normal;<br />
	text-transform: none;<br />
}<br />
[/sourcecode]</p>
<p>Our site-title DIV has the same height as our header box &#8220;125px&#8221; but also has 45px padding to the top so we have to do 125px &#8211; 45px = 80px. We also want our text to the left so we float it left. Next we style our H1 tag, the H1 tag has a color of white (#ffffff), the text has to be uppercase in italic and bold, then the font size is a nice big 24px. Then we had a span class of &#8220;blue-title&#8221; which was our word &#8220;wordpress&#8221; we just wanted to change the color so we set a new color. Then the slogan inherits the H1 tags color (#ffffff) we just need to set a different font size so we set a smaller 12px. The slogan will also inherit the H1 tags uppercase and font weight style so we just set the slogan style to normal and none. Thats our title and slogan out the way now for our search field, add the following code to your search DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;search&quot;&gt;&lt;!&#8211;search starts&#8211;&gt;<br />
	&lt;form action=&quot;&quot; method=&quot;get&quot;&gt;<br />
		&lt;input type=&quot;text&quot; class=&quot;search-field&quot; value=&quot;Search&#8230;&quot; size=&quot;30&quot; /&gt;<br />
		&lt;input name=&quot;Submit&quot; type=&quot;submit&quot; class=&quot;search-button&quot; value=&quot;Go!&quot; /&gt;<br />
	&lt;/form&gt;<br />
&lt;/div&gt;&lt;!&#8211;search ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Here we have a simple form mockup, we have a text field which will be our search field, the search field has a class of &#8220;search-field&#8221; allowing us to style it in CSS. Then we have our go button with a class of &#8220;search-button&#8221;. We style our search field and button like this.</p>
<p>[sourcecode language="css"]<br />
#search {<br />
	float: right;<br />
	padding-top: 45px;<br />
}</p>
<p>.search-field {<br />
	margin-right: 10px;<br />
	padding: 4px;<br />
	background-color: #494949;<br />
	border: 1px solid #666666;<br />
	color: #FFFFFF;<br />
}</p>
<p>.search-button {<br />
	background-color: #494949;<br />
	border: 1px solid #666666;<br />
	color: #FFFFFF;<br />
	padding: 2px;<br />
}</p>
<p>.search-button:hover {<br />
	background-color: #707070;<br />
}<br />
[/sourcecode]</p>
<p>We set our main search DIV to float right with the same top padding as our website title. Our search field had a class of &#8220;search-field&#8221; in this style we add a 10px right margin will push the go button over by 10px, we set 4px padding all the way around the search field. The search field has a background color of #494949 and a 1px border all the way around it in the color #666666. Finally the text inside the search field we want to be white so we add our color: #ffffff. The search button has a class of &#8220;search-button&#8221; and has the same styles as the search field part from the padding is 2px and it has no margin. The last style is optional really, i always find its better to have a hover effect on buttons. We just want the color of the go button to change slightly once hovered over it. Test your HTML document to reveal the search field iin action. Obviously it doesnt work yet. The next part we need to create is our navigation, we mock this up like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;header ends&#8211;&gt;</p>
<p>&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;navigation starts&#8211;&gt;</p>
<p>&lt;ul class=&quot;nav_links&quot;&gt;<br />
	&lt;li&gt; &lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #1&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #2&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #3&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #4&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #5&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #6&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #7&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #8&lt;/a&gt;&lt;/li&gt;<br />
	&lt;li class=&quot;withdiv&quot;&gt;&lt;a href=&quot;#&quot;&gt;Page #9&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;navigation ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside our navigation DIV we add a simple unordered list and within that unordered list i have 10 links. You might not get 10 links across if the words are longer. Ive just done page 1 &#8211; 9 for an example, in the wordpress template these links will be our pages which will load up dynamically. You&#8217;ll also notice links 1-9 has a class of &#8220;withdiv&#8221;, this basically means with divider, we&#8217;ll be creating the divider in a moment. The CSS for our navigation looks like this.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="css"]<br />
#navigation {<br />
	height: 42px;<br />
	float: left;<br />
	width: 900px;<br />
}</p>
<p>.nav_links ul {<br />
	margin: 0px;<br />
	padding: 0px;<br />
}</p>
<p>.nav_links li {<br />
	list-style:none;<br />
	display:block;<br />
	float: left;<br />
}</p>
<p>.nav_links a {<br />
	text-decoration: none;<br />
	color: #5f5f5f;<br />
	display: block;<br />
	height: 27px;<br />
	padding-right: 17px;<br />
	padding-left: 17px;<br />
	padding-top: 15px;<br />
}</p>
<p>.withdiv {<br />
	background-image: url(images/nav_divider.png);<br />
	background-repeat: no-repeat;<br />
}</p>
<p>.nav_links a:hover {<br />
	color: #FFFFFF;<br />
	background-image: url(images/nav_hover.png);<br />
	background-repeat: repeat-x;<br />
}<br />
[/sourcecode]</p>
<p>Our first style is our navigation DIV, it has a height of 42px which is the height of the actuall navigation in photoshop. The navigation is floated left and is 900px wide. The unordered list has no margin or padding, the list has no list style, this removes the bullet points from the list, its floated left and is displayed as a block. All the navigation links have no text decoration, 15px padding at the top. The links also have two identical padding of 17px. If your pages have longer words then you might want to reduce the size of the padding. Next up is our class &#8220;withdiv&#8221; this class basically place a small divider to the left of each link, we&#8217;ll be creating the divider in  moment. Finally the navigation hover, when we mouse over each button or link we want the text to change to white and have a background image called nav_hover show up. Lets create these image now open up your duplicated PSD file in photoshop if you havent already flattern your PSD FILE, and make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step9.gif" alt="Step9" width="600" height="233" /></p>
<p>Goto &#8220;image > crop&#8221; then save the file as &#8220;nav_divider.PNG&#8221; into your images folder. Next create a new document 200&#215;43 pixels. You need to create an image like the image below.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step10.gif" alt="Step10" width="600" height="209" /></p>
<p>The image above is exactly the same as our blue bar at the very top of our website you can refer to our PSD file for the layer styles. Once you&#8217;ve replicated the image above make a 2 pixel wide selection and crop it. Save the file as &#8220;nav_hover.PNG&#8221; save the file into the images folder. Test your HTML file in your browser to see if it works. You should have a working navigation with a nice hover, just make sure all the hovers look the way there surposed to. Now its time for our content, before we start were going to make the background images for our sidebar and content boxes or dummy posts. Open up photoshop with your PSD file HIDE all the layers apart from the background layer and the content box in which our wordpress posts will be. Double click your post content box and adjust the inner shadow layer style.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step11.gif" alt="Step11" width="600" height="355" /></p>
<p>Change the size to 2pixels, the reason why we&#8217;ve done this is because when we add our border in CSS it will overlap our white line and it wont be visable. Now we have a 2 pixel line so the border will cover up the 1st 1 pixel white border on our content box background image, leaving the 2nd white border visable. Make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step12.gif" alt="Step12" width="600" height="238" /></p>
<p>Only select the rectangle dont include the stroke on the box, we&#8217;ll be adding the border through CSS. Flattern your PSD file then goto&#8221;image > crop&#8221; save the image as &#8220;post_bg.PNG&#8221; Do exactly the same to the sidebar image, the sidebar image should be 280px wide. and the same height as the &#8220;post_bg.PNG&#8221; save the sidebar image as &#8220;sidebar_bg.PNG&#8221; You should have two images like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step13.png" alt="Step13" width="600" height="223" /></p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step14.png" alt="Step14" width="280" height="223" /></p>
<p>We mockup our content area like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/mywordpress_pt2/step15.gif" alt="Step15" width="600" height="255" /></p>
<p>We&#8217;ll be doing the left content first, the HTML looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;navigation ends&#8211;&gt;</p>
<p>&lt;div id=&quot;content&quot;&gt;&lt;!&#8211;content starts&#8211;&gt;<br />
	&lt;div id=&quot;content-left&quot;&gt;&lt;!&#8211;content left starts&#8211;&gt;<br />
	&lt;/div&gt;&lt;!&#8211;content left ends&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;content ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>The CSS styling for our two content DIV&#8217;s are.</p>
<p>[sourcecode language="css"]<br />
#content {<br />
	float: left;<br />
	width: 900px;<br />
	margin-top: 20px;<br />
	padding-bottom: 40px;<br />
}</p>
<p>#content-left {<br />
	float: left;<br />
	width: 602px;<br />
}<br />
[/sourcecode]</p>
<p>Our DIV &#8220;content&#8221; will basically be the container which holds all our content, we float this DIV left, we make it 900px wide. We also need to space it out abit so we add a 20px top margin and 40px padding. The reason why we added the 40px padding instead of margin was because for some reason in Internet Explorer the content seemed to sit on top of the footer. Adding a 40px padding to the bottom instead of a margin seemed to fix it. The content left DIV will be the container which holds our posts. We have to make the box 602px wide as we&#8217;ll be adding a border to the box, a left and right border makes up an extra 2px, 1px each side. Again we float it left. Now we need to start mocking up what our dummy post will look like. The code looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;content&quot;&gt;&lt;!&#8211;content starts&#8211;&gt;<br />
&lt;div id=&quot;content-left&quot;&gt;&lt;!&#8211;content left starts&#8211;&gt;</p>
<p>&lt;div class=&quot;a-post&quot;&gt;&lt;!&#8211;wordpress post starts&#8211;&gt;</p>
<p>&lt;div class=&quot;post-img&quot;&gt;<br />
&lt;img src=&quot;images/post_thumbnail.png&quot; alt=&quot;Test Image&quot; /&gt;<br />
&lt;/div&gt;   </p>
<p>&lt;div class=&quot;post-title&quot;&gt;<br />
&lt;h1&gt;This is a post title&#8230;&lt;/h1&gt;<br />
&lt;p&gt;Posted on 25/03/2009 By &quot;admin&quot;&lt;/p&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;post-desc&quot;&gt;<br />
&lt;p&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. &lt;/p&gt;<br />
&lt;/div&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;wordpress post ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;content left ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>Inside our content-left DIV we have a number of classes. (remember DIV&#8217;s should be unique and never repeated. Classes can be repeated as often as you like). The code above starting from the class &#8220;a-post&#8221; will be repeated everytime you make a post in the wordpress theme, so its important to use classes not DIV&#8217;s. The first class is &#8220;a-post&#8221; this will be the box which holds our background image and will also contain all other elements of a wordpress post. Inside the class &#8220;a-post&#8221; we have a class of &#8220;post-img&#8221; this will be our wordpress thumbnail for the posts. We then have &#8220;post-title&#8221; this class contains our post title and meta data. Finally we have our &#8220;post-desc&#8221; which is post description this class will contain our post content before the wordpress MORE tag. The CSS styles for each of the classes looks like this.</p>
<p>[sourcecode language="css"]<br />
.a-post {<br />
	background-color: #FFFFFF;<br />
	background-image: url(images/post_bg.png);<br />
	background-repeat: no-repeat;<br />
	border: 1px solid #bababa;<br />
	width: 580px;<br />
	padding: 10px;<br />
	float: left;<br />
	margin-bottom: 20px;<br />
}</p>
<p>.a-post h1{<br />
	color: #309DCF;<br />
	font-size: 24px;<br />
	font-weight: bold;<br />
	line-height: 34px;<br />
}</p>
<p>.a-post img{<br />
	border: 1px solid #d4d4d4;<br />
	padding: 5px;<br />
	float: left;<br />
}</p>
<p>.post-img {<br />
	float: left;<br />
	height: 198px;<br />
	width: 234px;<br />
	margin-right: 10px;<br />
}</p>
<p>.post-title {<br />
	float: left;<br />
	width: 336px;<br />
	margin-bottom: 10px;<br />
}</p>
<p>.post-title p {<br />
	color: #FFFFFF;<br />
	background-color: #90c6df;<br />
	float: left;<br />
}</p>
<p>.post-desc {<br />
	float: left;<br />
	width: 336px;<br />
	text-align: justify;<br />
	font-style: italic;<br />
	line-height: 16px;<br />
}<br />
[/sourcecode]</p>
<p>The class which we style is the &#8220;a-post&#8221; class this has a background color of #FFFFFF and a background image post_bg.png which is our image we created in photoshop. We then set our 1px border around the whole class, we also give the box 10px padding all the way around which then makes the width 580px. 580px + 10px padding left + 10px padding right + 1 px border left + 1 px border right = 602px wide. The next class is our H1 tag for our post, we want a nice big blue font then we use line height of 34px to space the title out abit. For every image in a post we want a nice little border, so we add a class for all images in &#8220;a-post img&#8221;. We then give each thumbnail its own container &#8220;post-img&#8221; the width and height set in these styles matches my thumbnail which i created in the PSD file. We then space out the thumbnail by giving it a margin to the right of 10px, this will push the post title and content 10px away from the thumbnail. The next class is the &#8220;post-title&#8221; class, this is the container which holds our post title and meta data. The class &#8220;post-title p&#8221; refers to our meta data which is the bit of text underneath our post title. Finally we have &#8220;post-desc&#8221; which relates to our content within the post. You should now have 1 single post in your CSS template, to create more posts we just need to duplicate everything inbetween the &#8220;a-post&#8221; class. Test your index.html file to see how it looks in your browser. Now lets mockup the sidebar. Inbetween the ending div &#8220;content left ends&#8221; and &#8220;content ends&#8221; mockup our sidebar which looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;content left ends&#8211;&gt;</p>
<p>&lt;div class=&quot;side-bar&quot;&gt;&lt;!&#8211;sidebar starts&#8211;&gt;</p>
<p>&lt;div class=&quot;side-bar-content&quot;&gt;<br />
&lt;img src=&quot;images/ad.png&quot; alt=&quot;Your AD Here&quot; class=&quot;side-bar-ads&quot; /&gt;&lt;img src=&quot;images/ad.png&quot; alt=&quot;Your AD Here&quot; class=&quot;side-bar-ads&quot; /&gt;&lt;img src=&quot;images/ad.png&quot; alt=&quot;Your AD Here&quot; class=&quot;side-bar-ads&quot; /&gt;&lt;img src=&quot;images/ad.png&quot; alt=&quot;Your AD Here&quot; class=&quot;side-bar-ads&quot; /&gt;   &lt;/div&gt;</p>
<p>&lt;div class=&quot;side-bar-content&quot;&gt;<br />
&lt;h1&gt;Some Text&lt;/h1&gt;<br />
&lt;p&gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry&#8217;s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.&lt;/p&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div class=&quot;side-bar-content&quot;&gt;<br />
&lt;h1&gt;Categories&lt;/h1&gt;<br />
 &lt;ul&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Categorie #1&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Categorie #2&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Categorie #3&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Categorie #4&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Categorie #5&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;sidebar ends&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;content ends&#8211;&gt;<br />
[/sourcecode]</p>
<p>The sidebar is pretty simple we just have 2 classes of which one is repeated. The class &#8220;sidebar&#8221; is our sidebar container which will hold our sidebar elements. Then the &#8220;side-bar-content&#8221; class holds our content, each bit of content is contained within the &#8220;side-bar-content&#8221; class. Think of each element in your sidebar as a seperate item, so for example you have 4 125x125px ads at the top thats one item, then you have your categories thats another item and so on and so forth. If you look at the code above you can easily look at it and determine what each item is. The CSS for our sidebar looks like this.</p>
<p>[sourcecode language="css"]<br />
.side-bar {<br />
	background-color: #FFFFFF;<br />
	border: 1px solid #bababa;<br />
	float: right;<br />
	width: 260px;<br />
	background-image: url(images/sidebar_bg.png);<br />
	background-repeat: no-repeat;<br />
	padding: 10px;<br />
}</p>
<p>.side-bar-content {<br />
	width: 260px;<br />
	float: left;<br />
	margin-bottom: 20px;<br />
}</p>
<p>.side-bar-ads {<br />
	margin-left: 3px;<br />
	margin-bottom: 3px;<br />
}</p>
<p>.side-bar h1{<br />
	color: #309DCF;<br />
	font-size: 20px;<br />
	font-weight: bolder;<br />
	line-height: 24px;<br />
}</p>
<p>.side-bar p {<br />
	text-align: justify;<br />
	line-height: 16px;<br />
}</p>
<p>.side-bar li {<br />
	line-height: 18px;<br />
	border-bottom-width: 1px;<br />
	border-bottom-style: solid;<br />
	border-bottom-color: #e1e1e1;<br />
	margin-left: 15px;<br />
	margin-top: 10px;<br />
	display: block;<br />
}<br />
[/sourcecode]</p>
<p>The first thing to style is our sidebar class, this class contains our background image that we created in photoshop. The styles are pretty much similar to our post styles. We then have a class of &#8220;side-bar-content&#8221; this is our little container for each sidebar item. We then have a few classes which relate to our sidebar content, &#8220;side-bar-ads&#8221; are the styless for my little 125x125px ads, the &#8220;side-bar h1&#8243; tag refers to each header that we have in our sidebar, if we have any plain text in our sidebar or paragraphs then these would be styled though the &#8220;side-bar p&#8221; style. Then finally we have our &#8220;side-bar li&#8221; style which we&#8217;ll use for any lists that we have in our sidebar. You can go ahead and test your template in your browser. Everything should be in order, you may need to copy the &#8220;ad image&#8221; from the images folder from my template unless you create your own. Finally we need to mockup our footer which looks like this.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;/div&gt;&lt;!&#8211;container ends&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;footer starts&#8211;&gt;</p>
<p>&lt;div id=&quot;footer-topbar&quot;&gt;<br />
&lt;h1&gt;mywordpress&lt;span&gt; &quot;Your fancy wordpress slogan here&quot;&lt;/span&gt;&lt;/h1&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div id=&quot;footer-content&quot;&gt;<br />
&lt;p&gt;Copyright &amp;amp;copy; mywordpress.co.uk | All Rights Reserved&lt;br /&gt;<br />
Design By &lt;a href=&quot;http://www.hv-designs.co.uk&quot;&gt;HV-Designs.co.uk&lt;/a&gt;&lt;/p&gt;<br />
&lt;/div&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;footer ends&#8211;&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;<br />
[/sourcecode]</p>
<p>Make sure you add your footer outside of the container DIV as we want our footer to span across the browser just like our header and top-bar does. We first add a DIV of footer and a DIV of footer-topbar this will be our footer container DIV a DIV for our topbar pretty much similar to our header and top-bar. We then add another DIV which will be for some copyright text so we add a DIV of &#8220;footer-content&#8221;. We need to make a background for our footer, we do this in the same way as we did when we created the top half of our template. You need to make a 2 px selection of your footer background in your PSD file. Then the image will be repeated through CSS. The CSS for our footer looks like this.</p>
<p>[sourcecode language="css"]<br />
#footer {<br />
	background-image: url(images/footer_bg.png);<br />
	background-repeat: repeat-x;<br />
	clear: both;<br />
	height: 147px;<br />
}</p>
<p>#footer-topbar {<br />
	height: 33px;<br />
	width: 900px;<br />
	margin: auto;<br />
}</p>
<p>#footer-topbar h1 {<br />
	color: #FFFFFF;<br />
	font-size: 20px;<br />
	font-weight: bold;<br />
	text-transform: uppercase;<br />
	font-style: italic;<br />
	padding-top: 3px;<br />
}</p>
<p>#footer-topbar span {<br />
	font-size: 12px;<br />
	font-style: normal;<br />
	font-weight: normal;<br />
	font-variant: normal;<br />
	color: #FFFFFF;<br />
}</p>
<p>#footer-content {<br />
	height: 113px;<br />
	width: 900px;<br />
	margin: auto;<br />
}</p>
<p>#footer-content p {<br />
	color: #FFFFFF;<br />
	padding-top: 45px;<br />
	text-align: right;<br />
}<br />
[/sourcecode]</p>
<p>We style our footer DIV first as you can see we&#8217;ve added our background which is repeated along the x axis. The height is the same height as a background image and importantly you have to clear the floats eles footer background will be 900px instead of spanning the entire browser width. We then have our footer top-bar, this is pretty much the same as when we created the header, our footer top-bar has a width of 900px, margin is set to auto to center everything so it matches the rest of our template, we then have a  height of 33px which is the actual height of the blue bar, which i measured in photoshop. We then have a H1 tag and a span, this is exactly the same as when we created the website title. The copyright text is put inside the DIV &#8220;footer-content&#8221; and styled through a P tag. All thats left to do now is style our default H tags for headers that aint styled through another DIV, and also we need to style our links.</p>
<p>[sourcecode language="css"]<br />
h1,h2 {<br />
	color: #309DCF;<br />
	font-weight: bold;<br />
}</p>
<p>h1 {<br />
	font-size: 24px;<br />
	line-height: 34px;<br />
}</p>
<p>h2 {<br />
	font-size: 18px;<br />
	line-height: 34px;<br />
}</p>
<p>h3 {<br />
	color: #333333;<br />
	font-size: 18px;<br />
	line-height: 34px;<br />
}</p>
<p>a:link {<br />
	color: #309DCF;<br />
	text-decoration: none;<br />
}<br />
a:visited {<br />
	text-decoration: none;<br />
	color: #309DCF;<br />
}<br />
a:hover {<br />
	text-decoration: none;<br />
	color: #333333;<br />
}<br />
a:active {<br />
	text-decoration: none;<br />
	color: #309DCF;<br />
}<br />
[/sourcecode]</p>
<p>All done, hope you enjoyed this tutorial, sorry its so long, to be honest it could of been longer if i went into more detail. In the next tutorial we&#8217;ll be converting it into wordpress. Dont forget to subscribe via RSS &#038; twitter. You can also share my tutorials by using the &#8220;share &#038; enjoy&#8221; buttons at the bottom. Till next time, cya.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/03/29/psd-to-css-to-wordpress-pt2/feed/</wfw:commentRss>
		<slash:comments>39</slash:comments>
		</item>
		<item>
		<title>Portfolio Layout #10: Learn To Code It</title>
		<link>http://www.hv-designs.co.uk/2009/02/27/portfolio-layout-10-learn-to-code/</link>
		<comments>http://www.hv-designs.co.uk/2009/02/27/portfolio-layout-10-learn-to-code/#comments</comments>
		<pubDate>Fri, 27 Feb 2009 20:21:40 +0000</pubDate>
		<dc:creator>Richard Carpenter</dc:creator>
				<category><![CDATA[PSD Sitebuilds]]></category>

		<guid isPermaLink="false">http://hv-designs.co.uk/?p=934</guid>
		<description><![CDATA[Hello, welcome to the coding tutorial of the portfolio #10 layout. In this tutorial il explain the steps to take in slicing and coding the layout. Before attempting this tutorial i highly suggest you create the layout before hand and have it ready You can also download the CSS layout for FREEEE using the download [...]]]></description>
			<content:encoded><![CDATA[<p>Hello, welcome to the coding tutorial of the portfolio #10 layout. In this tutorial il explain the steps to take in slicing and coding the layout. Before attempting this tutorial i highly suggest you create the layout before hand and have it ready</p>
<p><span id="more-934"></span></p>
<p>You can also download the CSS layout for <strong>FREEEE</strong> using the download button above, there is no licence with the download so your free to manipulate it as you wish. (just dont rip me off and decide to sell it). The whole of the css document is well documented with every style entry comment coded on what it does.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step1.gif" alt="" width="600" height="400" /></p>
<p>Right lets get started, the first thing you need to do is create your template directory, just make a folder on your desktop called &#8220;portfolio&#8221; within this folder you need another folder called &#8220;images&#8221;, a blank HTML document and a blank CSS document. Once you have those in place your ready to rock and roll.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step2.gif" alt="" width="600" height="400" /></p>
<p>Now when i code from a PSD file i generally code from the top and work my way down and slice the images as needed. When saving your images save them as a PNG file within the images folder, and try to use a name which corrosponds with the image. Right lets take alook at our PSD and work out what we need.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step3.gif" alt="" width="600" height="564" /></p>
<p>Right looking at the image above we need a container div which will hold all our content in, a header wrapping div which will hold our logo and navigation, inside the header wrapper div we need a logo div and a navigation div. Then we need to set up a class for our content. Why use a CLASS and not DIV i here you say??? well a class can be repeated as many times as needed, a DIV shouldnt, a DIV should be a unique element of the site. So our HTML structure should look like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;container&quot;&gt;&lt;!&#8211;BEGIN CONTAINER&#8211;&gt;</p>
<p>&lt;div id=&quot;head_wrap&quot;&gt;&lt;!&#8211;BEGIN HEAD WRAP&#8211;&gt;</p>
<p>&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;BEGIN LOGO&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;END LOGO&#8211;&gt;</p>
<p>&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;BEGIN NAVIGATION&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;END NAVIGATION&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;END HEAD WRAP&#8211;&gt;</p>
<p>&lt;div class=&quot;content&quot;&gt;&lt;!&#8211;BEGIN CONTENT&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;END CONTENT&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;END CONTAINER&#8211;&gt;</p>
<p>&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;BEGIN FOOTER&#8211;&gt;<br />
&lt;/div&gt;&lt;!&#8211;END FOOTER&#8211;&gt;<br />
[/sourcecode]</p>
<p>Add the following code to your HTML document, once your done with the structure of the document add the code below inbetween your HEAD tags. Without the code below your CSS style sheet will be useless.</p>
<p>[sourcecode language="html"]<br />
&lt;link href=&quot;styles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
[/sourcecode]</p>
<p>Open up your styles.css document in dreamweaver ready for your styles. The first thing we need to style is the main body of our document, we want to set all margins to 0, set our default font, size and color. We also need to set our background color and image. Head over to photoshop, flattern your layers into one layer (DONT SAVE IT THOUGH), select the rectangular marquee tool and make a selection like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step4.gif" alt="" width="600" height="564" /></p>
<p>The selection should cover your topbar and background up to the footer. Copy and paste the selection to a new document and save it as &#8220;bg.png&#8221; in your images folder. Now in the step above i mentioned we need to set our background color, well the background color we need to choose is the color in which ends at the bottom of the selection. You can get the color code by using the eye dropper tool in photoshop. How it works is the background image will be displayed up until the point it ends, then the background color will take over. Right now for the CSS.</p>
<p>[sourcecode language="css"]<br />
/*MAIN DOCUMENT STYLES*/</p>
<p>*{<br />
padding:0;<br />
margin:0;<br />
}</p>
<p>body {<br />
font-family: Arial, Helvetica, sans-serif; /*fonts for the main document*/<br />
font-size: 12px; /*font size for the main document*/<br />
color: #484941; /*font color for the main document*/<br />
background-color: #cccccc; /*background color*/<br />
background-image: url(images/bg.png); /*our background image*/<br />
background-repeat: repeat-x; /*background image repeated horizontally*/<br />
}<br />
[/sourcecode]</p>
<p>Refer to the commented code for each element. The next DIV we need to style will be our container DIV and head wrap DIV. The code for these DIV&#8217;S looks like this.</p>
<p>[sourcecode language="css"]<br />
/*CONTAINER STYLES*/</p>
<p>#container {<br />
width: 800px; /*the bottom margin is the negative value of the footer&#8217;s height*/<br />
margin: auto; /*centers our content*/<br />
}</p>
<p>#head_wrap {<br />
height: 90px; /*head wrap will be 90 px high*/<br />
width: 800px; /*head wrap will be 800 px wide*/<br />
margin-bottom: 20px; /*margin at the bottom will be 20px*/<br />
}<br />
[/sourcecode]</p>
<p>Right thats our containers sorted, now we need to add our logo or website text in our case. You can do this two ways, the 1st one is save the website text and box as an image BUT doing this means you&#8217;l have to edit the image each time you want to update your text inside the box. The 2nd way is to just slice the box into an image and add the text using CSS. Now the choice is yours on the route you take. Im going with the 2nd one as it offers the most flexability and is quickest. The way we go about it is first you need to hide all your layers on your photoshop document except the rounded see through box.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step5.gif" alt="" width="363" height="175" /></p>
<p>Select the rectangular marquee tool and draw a box around your rounded box, make sure you include the drop shadow, its best if you zoom in and just follow the last pixel on the drop shadow. Once you&#8217;ve made the selection just goto &#8220;image &gt; crop&#8221; (DONT SAVE PSD FILE) save the image as &#8220;logo.png&#8221;. Now for the code.</p>
<p>[sourcecode language="css"]<br />
/*LOGO STYLES*/</p>
<p>#logo {<br />
float: left; /*floats the logo to the left of our container*/<br />
height: 90px; /*height of our logo image*/<br />
width: 261px; /*width of our logo image*/<br />
background-image: url(images/logo.png); /*our logo image set as a background*/<br />
background-repeat: no-repeat; /*logo image wont repeat*/<br />
}</p>
<p>#logo h1 {<br />
text-transform: uppercase; /*transforms text into capital letters*/<br />
font-size: 30px; /*font size*/<br />
font-weight: bold; /*font weight*/<br />
margin-top: 15px; /*margin above the text*/<br />
margin-left: 40px; /*margin left side of the text*/<br />
}</p>
<p>#logo p {<br />
font-size: 12px; /*slogan font size*/<br />
font-weight: bold; /*slogan bold*/<br />
float: right; /*floats slogan to the right*/<br />
margin-right: 50px; /*margin right side of the slogan*/<br />
}<br />
[/sourcecode]</p>
<p>Right you will notice height and width of the logo is the same specified in the CSS file this is important, your&#8217;s might be different though as depends on where you made the selection in the PSD cutting stage. Also the HEAD_WRAP DIV is also 90px high which also corrosponds with the logo. The head_wrap DIV is the box which will hold our logo box and navigation, there is no need for the head_wrap DIV to be any higher than our logo. We have also set a h1 tag within our logo DIV this will be the actual text of our website I.E yourname, the #logo P tag is our slogan underneath our website title. Add the following to your HTML file within the logo DIV.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;logo&quot;&gt;&lt;!&#8211;BEGIN LOGO&#8211;&gt;<br />
	&lt;h1&gt;yourname&lt;/h1&gt;<br />
	&lt;p&gt;Digital Portfolio&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;END LOGO&#8211;&gt;<br />
[/sourcecode]</p>
<p>If you view your HTML document you should see everything display similar to your PSD file. The background, logo box, website title and slogan.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step6.gif" alt="" width="600" height="161" /></p>
<p>Right the next part we need to code is our navigation, firstly lets draft the navigation bar in our HTML document. Put the following code in your navigation DIV.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;navigation&quot;&gt;&lt;!&#8211;BEGIN NAVIGATION&#8211;&gt;<br />
     &lt;ul class=&quot;nav_links&quot;&gt;<br />
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;web design&lt;/a&gt;&lt;/li&gt;<br />
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;logo design&lt;/a&gt;&lt;/li&gt;<br />
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;graphic design&lt;/a&gt;&lt;/li&gt;<br />
        &lt;li&gt;&lt;a href=&quot;#&quot;&gt;contact me&lt;/a&gt;&lt;/li&gt;<br />
    &lt;/ul&gt;<br />
&lt;/div&gt;&lt;!&#8211;END NAVIGATION&#8211;&gt;<br />
[/sourcecode]</p>
<p>You&#8217;l notice there are now additional tags we need to style &#8220;ul&#8221;, &#8220;li&#8221;, &#8220;a&#8221; and some sort of hover. All these tags will have a class of &#8220;nav_links&#8221;. The CSS looks like this.</p>
<p>[sourcecode language="css"]<br />
/*NAVIGATION STYLES*/</p>
<p>#navigation {<br />
float: right; /*floats navigation to the right of the container*/<br />
margin-top: 10px; /*places a top margin*/<br />
}</p>
<p>.nav_links ul {<br />
list-style:none; /*removes bullet points from a list*/<br />
display: inline; /*displays links inline*/<br />
}</p>
<p>.nav_links li {<br />
list-style:none; /*removes bullet points from a list*/<br />
display: inline; /*displays links inline*/<br />
}</p>
<p>.nav_links a {<br />
padding-left: 50px; /*each links will have 50px padding on the left*/<br />
text-decoration: none; /*removes link underscore*/<br />
text-transform: uppercase; /*all links will be in capitals*/<br />
color: #8d8d8d; /*color of the link*/<br />
font-weight: bold; /*makes links in bold*/<br />
}</p>
<p>.nav_links a:hover {<br />
color: #0099FF; /*color of the links on mouseover*/<br />
}<br />
[/sourcecode]</p>
<p>Thats it for the top half, save your work and test it out in your browser. Were now going to code and style our content box, dont forget the content box will be a CLASS not a DIV. Your going to need to slice your content box image, to do this you need to hide all your layers in your PSD file and leave in view the content box and the pattern, goto &#8220;edit &gt; merge visable&#8221; (DONT SAVE PSD) draw out your selection using the rectangular marquee tool, either crop it or copy &amp; paste to a new document then save as content_box.png</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step7.gif" alt="" width="600" height="245" /></p>
<p>You can now add the styling to your content class, which looks like this.</p>
<p>[sourcecode language="css"]<br />
/*MAIN CONTENT STYLES*/</p>
<p>.content {<br />
height: 271px; /*height of our content box*/<br />
width: 706px; /*width of our content box*/<br />
margin-right: 47px; /*margin right*/<br />
margin-left: 47px; /*margin left*/<br />
background-image: url(images/content_box.png); /*our content box image */<br />
background-repeat: no-repeat; /*content image nor to repeat*/<br />
margin-bottom: 20px; /*margin bottom of 20px*/<br />
clear: both; /*clears the floats both left and right*/<br />
}<br />
[/sourcecode]</p>
<p>The height and width refer to the actual dimension of your content_box.png image. Yours might be different depending on where you made the selection. Once you&#8217;ve added the styles above you can view the HTML file and your content box should show up. The content inside the content box will each have there own classes and will be coded like this.</p>
<p><img src="http://www.hv-designs.co.uk/tutorials/portfolio10_css/step8.gif" alt="" width="600" height="329" /></p>
<p>The HTML code for the image above looks like this.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;content&quot;&gt;&lt;!&#8211;BEGIN CONTENT&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_thumb&quot;&gt;&lt;!&#8211;BEGIN THUMBNAIL&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END THUMBNAIL&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_desc&quot;&gt;&lt;!&#8211;BEGIN CONTENT DESC&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END CONTENT DESC&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_footer&quot;&gt;&lt;!&#8211;BEGIN APPLICATION&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END APPLICATION&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_footer&quot;&gt;&lt;!&#8211;BEGIN DATE&#8211;&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END DATE&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;END CONTENT&#8211;&gt;<br />
[/sourcecode]</p>
<p>The CSS styling for the class above looks like this.</p>
<p>[sourcecode language="css"]<br />
/*MAIN CONTENT STYLES*/</p>
<p>.content {<br />
height: 271px; /*height of our content box*/<br />
width: 706px; /*width of our content box*/<br />
margin-right: 47px; /*margin right*/<br />
margin-left: 47px; /*margin left*/<br />
background-image: url(images/content_box.png); /*our content box image */<br />
background-repeat: no-repeat; /*content image nor to repeat*/<br />
margin-bottom: 20px; /*margin bottom of 20px*/<br />
clear: both; /*clears the floats both left and right*/<br />
}</p>
<p>.content_thumb {<br />
height: 236px; /*height of our thumbnail*/<br />
width: 391px; /*width of our thumbnail*/<br />
float: left; /*floats our thumbnail to the left of our content box*/<br />
margin-top: 17px; /*margin of 17px*/<br />
margin-bottom: 17px; /*margin of 17px*/<br />
margin-left: 17px; /*margin of 17px*/<br />
}</p>
<p>.content_desc {<br />
float: right; /*floats description text to the right*/<br />
margin-top: 17px; /*description text has a top margin*/<br />
margin-right: 15px; /*description text has a right margin*/<br />
margin-left: 5px; /*description text has a left margin*/<br />
line-height: 20px; /*description text has a line height of 20px to space out the paragraph*/<br />
text-align: justify; /*description text is justifyed for nice clean columns*/<br />
overflow: hidden; /*text that overflow the box will be hidden*/<br />
height: 200px; /*fixed height of 200px*/<br />
width: 278px; /*fixed width of 278px*/<br />
}</p>
<p>.content_footer {<br />
float: left; /*content footer text is floated left*/<br />
width: 278px; /*has a fixed width of 278px*/<br />
margin-right: 15px; /*has a right margin*/<br />
margin-left: 5px; /*has a left margin*/<br />
margin-top: 3px; /*has a top margin*/<br />
}</p>
<p>.content_footer h1{<br />
font-size: 12px; /*content footer text has a font size of 12px*/<br />
}</p>
<p>.content_footer_col2 {<br />
color: #0099FF /*content footer text color two (the blue text)*/<br />
}<br />
[/sourcecode]</p>
<p>The width and height in the content_thumb class will refer to the height and width of your thumbnail image, we create our thumbnail image by merging the thumbnail and thumbnail border layers as one, then simply copy and paste to a new document, save as what ever thumb.png. Right lets insert out content into our content box. We need to place our thumbnail in there, our header for the image, descriptive text and then our footer app and date.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;content&quot;&gt;&lt;!&#8211;BEGIN CONTENT&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_thumb&quot;&gt;&lt;!&#8211;BEGIN THUMBNAIL&#8211;&gt;<br />
&lt;a href=&quot;images/example.gif&quot;&gt;&lt;img src=&quot;images/example_thumbnail.png&quot; alt=&quot;Example Thumbnail&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;/div&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END THUMBNAIL&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_desc&quot;&gt;&lt;!&#8211;BEGIN CONTENT DESC&#8211;&gt;<br />
    &lt;h1&gt;MY WORDPRESS&lt;/h1&gt;<br />
    &lt;p&gt;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec libero. Suspendisse bibendum. Cras id urna. Morbi tincidunt, orci ac convallis aliquam, lectus turpis varius lorem, eu posuere nunc justo tempus leo.&lt;/p&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END CONTENT DESC&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_footer&quot;&gt;&lt;!&#8211;BEGIN APPLICATION&#8211;&gt;<br />
&lt;h1&gt;Created In: &lt;span class=&quot;content_footer_col2&quot;&gt;Adobe Photoshop&lt;/span&gt;&lt;/h1&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END APPLICATION&#8211;&gt;</p>
<p>    &lt;div class=&quot;content_footer&quot;&gt;&lt;!&#8211;BEGIN DATE&#8211;&gt;<br />
&lt;h1&gt;Created On: &lt;span class=&quot;content_footer_col2&quot;&gt;01/01/2009&lt;/span&gt;&lt;/h1&gt;<br />
    &lt;/div&gt;&lt;!&#8211;END DATE&#8211;&gt;</p>
<p>&lt;/div&gt;&lt;!&#8211;END CONTENT&#8211;&gt;<br />
[/sourcecode]</p>
<p>Check your HTML document in your browser you should have everything placed nicely. If you wanted to create another box for another project just copy and paste everything in the content class. so from DIV CLASS CONTENT to CLOSING DIV CLASS CONTENT then paste it underneath. You will just need to edit the thumbnail and content within the box to your new project, as easy as that.</p>
<p>Finally we need to add our footer styles.</p>
<p>[sourcecode language="css"]<br />
/*FOOTER STYLES*/</p>
<p>#footer {<br />
background-image: url(images/footer_bg.png); /*footer background image*/<br />
background-repeat: repeat-x; /*background image repeats horizontally*/<br />
height: 32px; /*height of footer is 32px same as our image*/<br />
clear: both; /*clear the floats left and right*/<br />
margin-top: 50px; /*has a top margin of 50px*/<br />
}</p>
<p>#footer p {<br />
line-height: 30px; /*line height for footer text is 30px*/<br />
float: right; /*floats text right of the screen*/<br />
margin-right: 20px; /*pushes text 20px inwards from the right*/<br />
}<br />
[/sourcecode]</p>
<p>The footer background image will refer to the footer slice, you should no how to create the footer image by now ;) similar to how we created our background image, just make a selection about 4 pixels wide. The image will then be repeated in CSS. You just need to add your P tag in your HTML document.</p>
<p>[sourcecode language="html"]<br />
&lt;div id=&quot;footer&quot;&gt;&lt;!&#8211;BEGIN FOOTER&#8211;&gt;<br />
&lt;p&gt;Copyright yourname | All Rights Reserved&lt;/p&gt;<br />
&lt;/div&gt;&lt;!&#8211;END FOOTER&#8211;&gt;<br />
[/sourcecode]</p>
<p>Thats it basically all done, dont forget you can download the FREE css template from the button at the top. Spread the word and i hope to see all your portfolios out and about ;) you&#8217;ve got no excuse not to have one now.</p>
<h2>ADDITIONAL STEPS</h2>
<p>You can make your portfolio more intresting by adding abit of jquery interaction. These extra steps will get your images loading up in lightbox. The simple lightbox jquery plugin were using is by by Lokesh Dhakar, i havent really tested out alot of plugins but i no this one works and does the job. All the files needed for the lightbox are included in the download in a folder called lightbox. Just copy &amp; paste the folder into portfolio directory. Open up your index.html file and reference the files like we do our CSS file.</p>
<p align="center"><!--adsense#hv_banner--></p>
<p>[sourcecode language="html"]<br />
&lt;link href=&quot;lightbox/lightbox.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;<br />
&lt;script type=&quot;text/javascript&quot; src=&quot;lightbox/lightbox.js&quot;&gt;&lt;/script&gt;<br />
[/sourcecode]</p>
<p>The files are referenced find your thumbnail code and just add rel=&#8221;lightbox&#8221; within the A tag.</p>
<p>[sourcecode language="html"]<br />
&lt;div class=&quot;content_thumb&quot;&gt;&lt;!&#8211;BEGIN THUMBNAIL&#8211;&gt;<br />
      &lt;a rel=&quot;lightbox&quot; href=&quot;images/example.gif&quot;&gt;&lt;img src=&quot;images/example_thumbnail.png&quot; alt=&quot;Example Thumbnail&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;      &lt;/div&gt;<br />
[/sourcecode]</p>
<p>Upload your files to your server and test it out ;) Note lightbox only works with images and you need the full size image of the thumbnail in a folder somewhere on your server.</p>
<p>Many thanks for reading this tutorial, dont forget to subscribe VIA twitter and our RSS feeds. Till next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hv-designs.co.uk/2009/02/27/portfolio-layout-10-learn-to-code/feed/</wfw:commentRss>
		<slash:comments>68</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/


Served from: www.hv-designs.co.uk @ 2010-09-02 21:12:24 -->