How to Convert a Slick PSD Design to XHTML/CSS

Styling the Page

Remember how we have two different CSS files? A reset.css and a global.css, well we are going to work on the reset.css file first. In this file we are going to just use the ready made availble YUI Reset 2. This will reset all of our elements in each browser to look the same.


The reset.css is as follows…..

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
table {
fieldset,img {
address,caption,cite,code,dfn,em,strong,th,var {
ol,ul {
caption,th {
h1,h2,h3,h4,h5,h6 {
q:before,q:after {
abbr,acronym { border:0;

Base Styling

The first part of the site we want to cover is the font & base structure of the site. We are going to set a font and background for the main body of the site, eliminate the underline on link element by using text-decoration: none; and user a basic container limiting the width to 1024px and centering it horizontally.

body {
	background: #F2F2F2;
	font: 10px Verdana;

a {
	text-decoration: none;

p, span {
	line-height: 20px;

#header, #featured, #content, #footer {
	overflow: hidden;

.container {
	margin: 0 auto;
	width: 1024px;

.clear {
	clear: both;


Your page should now look like this.

checkpoint 1

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14

This entry was posted on Thursday, September 16th, 2010 at 07:06 and is filed under Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Cody Robertson is a 19 year old freelancer. He is currently attending university, but loves to write and create beautiful websites whenever he can. He ranges with a large spectrum of coding languages, all the way from Objective-C to HTML. Follow Cody on Twitter

About the author Published by Cody Robertson

10 Responses »

  1. Brilliant tutorial I will have to try it out asap.
    Thanks alot ^^

  2. Awesome Tutorial.

    Thanks you for share.

  3. Good tutorial for beginner like me, thank you 🙂

  4. Very good tutorial, It covered a lot of things, thanks

  5. Dude, charset before title. 🙂

  6. i’m going to have to take time on this one.thanks for sharing