Creating Your Own WordPress Theme Part 4

-->

In Creating Your Own WordPress Theme Part 3 we managed to setup the basic layout. We’ll go ahead and pick up where we left off and see what we can get accomplished this evening.

Since I wasn’t happy with the link colors, I played around with various color combos for a couple of hours until I found something that I think looks good and is a little different. So here’s the changed css…


body, html {
	margin: 0;
	padding: 0;
	color: #000;
	background: #fff;
	font: 10pt verdana, arial, sans-serif;
	}

a, a:link, a:visited, a:active {
	color: #b00;
	text-decoration: none;
	}

a:hover {
	color: #fff;
	background: #555;
	text-decoration: none;
	}

h1, h2, h3, h4, h5, h6 {
	margin: 0;
	padding: 0;
	}

h1 {
	font-size: 12pt;
	}

h2, h3 {
	font-size: 11pt;
	}

h4, h5, h6 {
	font-size: 10pt;
	}

blockquote {
	margin: 10px 20px;
	padding: 10px;
	background: #eee;
	border: 1px solid #ccc;
	}

.alignleft {
	float: left;
	margin: 0;
	padding: 0;
	}

.alignright {
	float: right;
	margin: 0;
	padding: 0;
	}

.left {
	float: left;
	margin: 0 10px 5px 0;
	padding: 0;
	}

.right {
	float: right;
	margin: 0 0 5px 10px;
	padding: 0;
	}

p {
	line-height: 18px;
	}

small {
	font-size: 9pt;
	}

code {
	font-family: "Courier New", courier, verdana, arial, sans-serif;
	}

/* layout */

#page {
	width: 960px;
	margin: 0 auto;
	padding: 0;
	}

/* header */

#header {
	width: 960px;
	height: 80px;
	margin: 0;
	padding: 0;
	}

#header-l {
	float: left;
	width: 400px;
	margin: 0;
	padding: 0;
	}

#header-r {
	float: right;
	width: 560px;
	margin: 0;
	padding: 0;
	}

#header a img {
	border: none;
	text-decoration: none;
	}

.title {
	font: 20pt bold arial, verdana, sans-serif;
	margin: 15px 0 0 10px;
	padding: 0;
	}

.description {
	font: 11pt arial, verdana, sans-serif;
	margin: 0 0 0 83px;
	padding: 0;
	}

.title a, .title a:visited, .title a:link, .title a:active, .title a:hover {
	color: #000;
	text-decoration: none;
	background: #fff;
	}

#search {
	margin: 30px 10px 0 0 ;
	padding: 0;
	text-align: right;
	}

#searchform #s {
	width: 250px;
	}

#searchform #searchsubmit {
	color: #fff;
	background: #555;
	}

#searchform input {
	border: 1px outset #b00;
	color: #b00;
	}

/* navigation */

#navbar {
	display: block;
	width: 960px;
	margin: 0 auto;
	height: 30px;
	font-family: arial, verdana, sans-serif;
	font-weight: bold;
	/* border-top: 1px solid #000;
	border-bottom: 1px solid #000; */
	background: #000 url(images/navbar.gif);
	}

#navbar ul {
	margin: 0;
	padding: 0 0 0 10px;
	float: left;
	}

#navbar li {
	display: inline;
	}

#navbar ul li.current_page_item a {
	color: #ccc;
	height: 24px;
	border: 0px;
	padding: 6px 10px 0 10px;
	}

#navbar ul li.current_page_item a:hover {
	color: #fff;
	text-decoration: none;
	background: #b00 url(images/navbar-hover.gif) repeat-x;
	}

#navbar a {
	color: #ccc;
	float: left;
	margin: 0;
	height: 24px;
	padding: 6px 10px 0 10px;
	}

#navbar a:hover {
	color: #fff;
	text-decoration: none;
	background: #b00 url(images/navbar-hover.gif) repeat-x;
	}

/* content */

#content {
	float: left;
	width: 560px;
	margin: 10px 0 0 10px;
	padding: 0;
	}

.post {
	margin: 0 0 30px 0;
	padding: 0 0 20px 0;
	border-bottom: 1px dashed #000;
	}	

/* sidebar */

#sidebar {
	float: right;
	width: 360px;
	margin: 10px 10px 0 0;
	padding: 0;
	}

/* footer */

#footer {
	clear: both;
	text-align: center;
	}

/* single */

.navigation {
	margin: 0;
	padding: 0 0 50px 0;
	}

As you can see, I’ve changed few things, including adding 2 graphics for the navbar. Almost all of the changes have to do with color, although there are changes for the single page navigation, alignleft, alignright, and search.

So not a whole lot done this evening, but we’ll make better progress tomorrow. Until then…

Talk Back

2 Responses to “Creating Your Own WordPress Theme Part 4”

  1. Matt  

    nice tutorials here man, I’m consider switching my site over to WP, but didn’t want to use a BS theme, want to covert my own over.

  2. Darryl  

    Thanks! It’s really easy to create your own theme once you get the hang of it. Good Luck!

Leave a Reply