Customizing K2: Part 1

December 28, 2005 · 149 comments

With the long-awaited final version of the K2 theme for WordPress coming out before the New Year it is a good time to catch up on some tips and tricks to get your blog looking its best. I am trying to make this post be the definitive guide for helping beginners and amateurs out. A lot of the things covered in this tutorial have been lifted from frequently asked questions or problems within the Flickr Binary Bonsai support forums. After you’ve finished this, be sure to check out part 2 and part 3.


CSS Basics

Most of the things covered in this tutorial and in K2 can be done strictly in the CSS. CSS stands for Cascading Style Sheet and is a file that encompasses many aspects of every element on a website. Things such as padding, margins, backgrounds, colors, fonts and layout are all controlled by the CSS file. In K2, Michael has allowed users an easy way to manage their own stylesheet while affording tha ability of reverting to the default style or another custom style with schemes. Schemes allow additional functionality to the default style.css without touching it. Any K2 installation can have as many K2 schemes as necessary, easily switched from one to the other on the K2 Options page accessible via the WordPress admin panel » Presentation » K2 Options. Each K2 scheme lives in the styles folder within the K2 folder found in wp-content » themes » K2.

First let’s get familiar with some of the CSS lingo and attributes. Each entry in a CSS file is called a selector. Below is an excerpt of my CSS code to show you the typical format.

code { /* default was way too small to read */
font: 1.3em 'Courier New', Courier, Fixed;
text-align: left;
background: #fff;
border: 1px solid #A6B0BF;
}

You can see the selector is initiated with the name code and an open curly brace. Each attribute for the selector (font, text-align, background and border in this case) must have a colon after their name and a semicolon to end the line. This CSS snippet is the same styling that created the code box it is in. A color is usually entered in it’s hex format and begins with a pound sign. If you are going to be entering a color such as #FFFFFF, #000000 or #3388CC you have the ability to save a few keystrokes and enter it in shorthand. Every second digit will be repeated when you enter three digits. For example, #38C is the same as #3388CC. It really doesn’t matter how you input the color but when you move on to making large CSS files this shorthand helps reclaim some of the monotony. It is also a good idea to comment each CSS selector or at least the not so obvious ones so you can easily keep track of what you have done. Comments can be started and ended with /* Comment Text Isn’t Parsed By The Browser */.

When you are working in your K2 scheme it might be a good idea to add !important to your selector attributes if they don’t seem to be having any effect. Adding this overrides the style.css with your custom scheme attribute. This may not always be the case, but if so this is the solution. Such an entry may look like this: border: 1px solid #A6B0BF !important;.

Sifting through the style.css included with K2 you may seen something like padding: 0 5px 2px 0;. The first time I saw this format, I was baffled as well. Thanks to Bryan I found out that each of those four numbers refers to the following directions: up, right, down, left. That means that there will be 5 pixels of padding to the right and 2 pixels of padding below. Unless the number is zero, you need to specify the unit, such as pixels with px.

One last thing before we jump into the K2 stuff involves browser compatibility. Your stylesheet may make your site look just the way you wanted in Safari or Firefox, but visit your site in Internet Explorer and you’ll be in a world of hurt. For example, if you have a piece of text controlled by the div “text” that is too close to the left border and you had already created an attribute in the text selector as follows: padding-left: 5px;. To make the same attribute work in Internet Explorer, copy it and prepend an underscore. This way you will have another entry _padding-left: 5px;. This trick applies for many CSS attributes. Testing your K2 design in multiple browsers is always a good idea. Firefox is a free and a fantastic browser as is Safari. If you don’t have access to a Macintosh computer you can see what your site looks like in Safari with this website.


Adding a Header Image

To change the header from the default blue background you can add any image. Before we get into the CSS, find a picture you like and open it in PhotoShop or Gimp and get it in the proper size. Check out my blog header graphic tutorial if you’d like some PhotoShop pointers. A standard installation of K2 uses an image size of 780 pixels wide by 200 pixels high. For the purpose of this tutorial, we will assume that you have a scheme named testscheme within the K2 » styles folder. Save your image as header.jpg (the name does not matter) in the K2 » styles » testscheme folder. Then add something as follows to your scheme stylesheet, testscheme.css. All paths are relative so the image has to be in your scheme folder. The reason we have #38C in the front is in case the image doesn’t get loaded, it will paint a background of color #38C first. Think of it as a failsafe. Another reason for this approach could be you have a transparent image and want that color to show through (beware, Internet Explorer does not play well with transparent PNG’s). Before you apply the following code, make sure that you have set your blog to fixed width under width style in K2 Options.

#header{
background: #38C url('testscheme/header.jpg');
}

If you are interested in setting up a header graphic that is not the default 200px high, you can add the following entrie to your #header: height: 165px !important;. This line assumes you have an image that is 165 pixels high. If you would like to have a header image that is not the default 780 pixels wide keep reading, I will discuss adjusting the page width.


Rotating Header Graphics

A rotating header randomly loads a different header graphic everytime your site is visited as well as adding a dynamic feel. Before continuing you will need to create several header graphics as described above. Make a new folder inside of testscheme and name it headers. Place your new header graphics in the newly created headers folder. You will also need to place a rotator script in that folder. A List Apart has a great article describing the use of the script and is worth a read if you have the time. Otherwise, you can find the file we need here (right-click » save link as/download link » rename to rotate.php). Place rotate.php in the headers folder. Now all you have to do is change your header CSS to point to the rotate file. It should look similar to the following:

#header{
background: #38C url('testscheme/headers/rotate.php');
}


Adjusting Page Width

For whatever reason, you may want to change the width of your K2 blog from 780 pixels wide to something larger for better readability or slimmer for a unique design. Regardless of your intentions, there is a simple way to go about achieving this. You need to add the following snippet to your current scheme stylesheet but edit the width pixels to represent what you are shooting for.

#page {
width: 640px; /* Width of entire blog */
_width: 640px; /* Check in IE and adjust accordingly */
}


Changing Background Color

The answer to this task lies in the body selector. Change #CCC to the color you would like to use. Visit ColourMod.com and use the demo on the right if you don’t know what color to use.

body {
background: #CCC !important;
}

Alternatively you can change the page color as follows.

#page {
background: #FFF !important; /* Again, the !important may not be necessary */
}


Moving the Blog Title and Description

You may not like where the header title and description are placed by default. You can move it by adjusting the margin of both elements in your scheme stylesheet. The first entry is for h1, the title of your blog, while the second is for the smaller description. To adjust the vertical height, change padding-top in h1; make it smaller to move the title higher and vice versa. If you want to move it to the right, increase 40px in both h1 and the description to something like 300px (depends on blog width, trial & error).

h1 { /* H1 is used for the title of your blog */
font-size: 3em; /* Change to adjust title size */
padding-top: 75px;
margin: 0 0 0 40px;
font-weight: bold; /* Change bold to normal if you prefer that */
}
#header .description { /* Blog description, under blog title */
font-size: 1em; /* Make it larger with something like 1.1em */
margin: 0 0 0 40px;
}


Using a Header That Has the Blog Name In It

If you would like to use a header graphic that already has the blog name in it you will need to hide the title and description text automatically displayed by WordPress. This can be done in CSS with a simple entry.

h1{
display: none;
}
#header .description {
display: none;
}


Asides 101

Asides are an easy way to post a little snippet that isn’t as important as a full blown post. They are ideal for mentioning a notable link you came across online or other tasty tidbits. Fortunately, K2 has excellent support for asides. You need to first enable them in the K2 Options page. Tell it whether you would prefer inline or sidebar asides and give it a category to use. I have made a category called asides that I use for this situation. Basically the idea is that whenever you make a post and give it the category you set for asides, it will be marked and styled as an aside when you publish it. If you opt for sidebar asides, set a number of asides to show in the sidebar. After you’ve set the K2 Options that strike your fancy, click Update Options on your way out.

PaulStamatiou.com runs on the Thesis Theme for WordPress

How smart is your Theme?  How good is your support? Check out ThesisTheme for WordPress.

Thesis is the search engine optimized WordPress theme of choice for serious online publishers. If you’re a blogger who doesn’t understand a lot of PHP, Thesis will give a ton of functionality without having to alter any code. For the advanced, Thesis has incredible customization possibilities via Thesis hooks.

With so many design options, you can use the template over and over and never have it look like the same site. The theme is robust and flexible enough not only to accommodate a site like PaulStamatiou.com, but also to enable the site to run far more efficiently than it ever has before.

{ 80 trackbacks }

K2 Customization Tutorials at CheckWeb
December 29, 2005 at 4:15 am
Tweaked at Secret Weapon Labs
December 31, 2005 at 11:35 am
links for 2006-01-01 at pedersondesigns
January 1, 2006 at 12:19 pm
Upgraded and restyled at philcrissman.com
January 6, 2006 at 9:15 pm
Test - ignorer at Webmercial.dk 2.0 - Weblog, Videoblog, Podcast & Moblog i en opportunistisk pærevælling
January 7, 2006 at 9:37 am
horticultura 101 at quintal do xanato
January 12, 2006 at 7:18 pm
Viva la Customization! at baileybug.com
January 13, 2006 at 5:12 pm
Hermes
January 18, 2006 at 8:23 pm
Tired of Myspace, so was I… at
January 20, 2006 at 12:16 pm
Customizing K2: Part 3 at PaulStamatiou.com
January 26, 2006 at 11:40 am
K2 Rockstar: PaulStamatiou.com at House of K2
January 26, 2006 at 3:08 pm
Customizing K2 » » Blog Archive Allyn Edmonds
January 29, 2006 at 5:43 pm
Climbing K2: Part 1 at Low End Theory
January 30, 2006 at 12:11 am
Take Two at Jeff Taff
February 2, 2006 at 12:51 am
WordPress 2.0 Theme Resources at The Miller Place
February 8, 2006 at 8:34 am
Adjusting K2 at Cyconet Blog
February 9, 2006 at 5:10 am
K2 at Webster MC
February 12, 2006 at 11:13 am
The header image is now rotating at Neil McIntyre
February 13, 2006 at 1:49 am
kudos at misternige
February 14, 2006 at 11:38 am
Spherical Phoke Interview #001 :: Paul Stamatiou at Dev Dawn
February 14, 2006 at 5:25 pm
Wordpress使用心得(-)模板设计 at punkprojekt.com
February 21, 2006 at 3:41 am
Configuring WordPress - Templates, Plugins, Themes, Services - Part 4 at Amar Galla’s Blog
February 23, 2006 at 6:25 am
Parallel Universe at I’m losing my favourite game
February 27, 2006 at 4:01 pm
Personal and Technology Blog » Switching to K2
February 28, 2006 at 4:12 am
Thank You Fellow Bloggers Meme! at Brendan McPhillips.com
March 7, 2006 at 11:39 pm
otro blog más » Unos cuantos de desarrollo web (LXXXI)
March 18, 2006 at 6:30 am
Today’s Blog Changes at MSTechToday
April 2, 2006 at 8:39 pm
K2 - More Than Just a Wordpress Theme at Stupid Wordpress Tricks
April 12, 2006 at 8:29 am
Customizing K2: Part 4 at Bharath Kumar
April 16, 2006 at 10:47 pm
Customizing K2 at JohnTP’s Home
April 18, 2006 at 9:54 am
Pimp my webblogg at Daniels webblogg
April 19, 2006 at 5:29 am
K2 Tutorials by PaulStamatiou at Raptrex
April 19, 2006 at 11:07 am
Roterande bilder at Daniels webblogg
April 21, 2006 at 5:08 pm
Customizing K2- Part 5 at JohnTP’s Home
April 22, 2006 at 4:28 am
Cha-Cha-Changes! at White Meadows & Scary Clouds
April 22, 2006 at 2:17 pm
BlogoSquare » Blog Archive » A question of theme
April 27, 2006 at 7:08 am
Smarking
April 27, 2006 at 10:37 pm
Hvordan gjøre K2 til din egen at Heavy Metal Jesus
May 8, 2006 at 2:46 am
Wordpress/K2 Tip: Use Proper Titles for Tag Pages at mackarus
May 30, 2006 at 2:36 am
Keeping you posted » K2 tutorial
May 30, 2006 at 3:37 am
Surfed on 6/14/06 at ~*~Raghu & Bindu’s Blog ~*~ :: Our Journey of Life
June 14, 2006 at 9:50 pm
How to create a custom K2 Scheme: Part 3 at JohnTP’s Home
June 16, 2006 at 7:45 pm
at Two Dinks
June 21, 2006 at 1:10 am
Megmondós » Blog Archive » Fejléc
June 25, 2006 at 4:41 am
Fejléc at
June 26, 2006 at 4:17 am
Design Cleanup at Martin Gordon’s Blog
July 4, 2006 at 11:00 pm
Customizing k2 at Unorthodox
July 19, 2006 at 6:37 pm
Customizing K2… at Crazymirage.net
July 25, 2006 at 4:18 am
A 7 step guide to fixing your Wordpress sidebar in Internet (bloody) Explorer » nektros - Cynicism in a Hot Dish
July 25, 2006 at 6:10 am
Template at Squid Entites
August 10, 2006 at 12:35 pm
Blogosopher » Blog Archive » K2 0.9 Release at K2
August 10, 2006 at 5:14 pm
Cutting Corners | K2 Customizations
August 20, 2006 at 6:32 pm
Redesign Part 1: Conquering K2 at Mama JunkYard’s
August 27, 2006 at 12:46 pm
Customizing K2 - The Complete Guide at Web (log) 2r
September 10, 2006 at 7:17 am
DeStructUred Blog » Blog Archive » links for 2006-09-16
September 16, 2006 at 5:42 am
Flickr Set Slideshow, featuring the Red Scare! at bavatuesdays
September 19, 2006 at 1:09 pm
The old blog at Rizm Interaction
October 2, 2006 at 4:22 pm
Another purpose, another site at Rizm Interaction
October 2, 2006 at 4:35 pm
CaÅ‚kiem nowy wyglÄ…d… at sebastianpietrzak.com
October 12, 2006 at 8:42 am
Whew, update complete at digital-alias.com
November 26, 2006 at 6:07 pm
Joe’s Blog » Blog Archive » K2 theme
December 15, 2006 at 7:27 am
Deja Vu ? at visualreactor
December 17, 2006 at 9:02 pm
[2006/12/18 - 2006/12/27] « Kirin Lin
December 26, 2006 at 11:47 pm
A Few Customizing Tips for K2 at bavatuesdays
January 5, 2007 at 9:34 am
Sublogâ„¢ » Back to the business, and the business is good!
February 11, 2007 at 9:24 am
Wordpress K2 Theme Styles, Mods, Guide and Tips at krynsky.com
February 14, 2007 at 1:55 am
Modifier K2! at Sachin Devlog
March 17, 2007 at 1:20 am
[站務日誌]wordpress初體驗 at 精神漫遊
March 27, 2007 at 11:16 am
Site Layout K2 Style!!! at HarleyStagner.com
March 29, 2007 at 11:15 pm
Customizing K2 Wordpress theme: resources and tutorials at Atty-at-Work
June 15, 2007 at 12:44 am
Modding K2 at In Theory, there is no Practice.
August 1, 2007 at 12:29 am
Antigua Web Solutions Blog » Blog Archive » K2 WordPress Theme
August 4, 2007 at 5:54 pm
Wordpress K2 customization « I Gede Sumardika
August 22, 2007 at 5:55 am
Kubrick and K2 WordPress Themes: Collection of Theme Tips « Lorelle on WordPress
September 8, 2007 at 7:58 am
New look for the site using the K2 theme - Stage 1 at graemehunter.co.uk
September 11, 2007 at 4:02 pm
REhasHed and re-orGanizinG~ at My Dirty Sketchbook
October 22, 2007 at 12:16 am
Wordpress, K2 and ecto at Nuclear Blog
November 6, 2007 at 3:58 pm
New site - Destiny Realised - Sponge Project » website creators :: Blog ::
November 29, 2007 at 4:15 pm
Building and Customizing your Blog… at Paintbits - Life in Colors.
July 2, 2008 at 5:07 am
WordPress: It’s a great CMS — Zero Percent Idle
August 24, 2009 at 9:05 pm

{ 69 comments… read them below or add one }

1 Eli December 28, 2005 at 10:40 pm

I like the article a lot, great idea to explain CSS/customization for one and all ;)

Reply

2 cavemonkey50 December 29, 2005 at 12:37 am

Great guide to editing K2 and is even useful for non-K2 CSS beginners.

Reply

3 Tim December 29, 2005 at 12:46 am

Thank you! Very helpful pieces of information for a great template!

Reply

4 lubo December 29, 2005 at 2:12 am

very nice and helpful
How about some info on how to add another column on the right side? :)

Reply

5 cavemonkey50 December 29, 2005 at 3:38 am

I know Paul that you covered IE hacks briefly in this guide, but I have a more in-depth article on how to tweak your site for IE. I just finished writing it and thought I would let people know, since this may be of use to all the K2 tweakers out there.

You can read my article here: The Ultimate IE Hack Guide

Reply

6 Adam Teece December 29, 2005 at 3:50 am

Awesome post and something I have been wanting to learn how to do myself. I don’t know if I can ever make a scheme as good as Deviance, but at least I can tinker with it some more and make it more personal to my site.

Reply

7 Daniel December 29, 2005 at 4:24 am

Great idea Paul!
Perhaps you should also mention which software tools you are using for editing. I’m using the following tools:
Webdeveloper Plugin for Firefox – this plugin is so powerful (http://chrispederick.com/work/webdeveloper/)
Topstyle – offline Style Sheet Editor (http://www.bradsoft.com/topstyle/index.asp)
PSPAD – universal freeware editor for PHP, HTML, XHTML… (http://www.pspad.com/)
FilzeZilla – freeware FTP Editor (http://filezilla.sourceforge.net/)

Reply

8 Jon Mabale December 29, 2005 at 9:19 am

Great tutorial! I really appreciate your willingness to share and explain. You’re saving me a lot of trial and error steps for getting my website up. Look forward to reading more. Cheers!

Reply

9 Phil December 29, 2005 at 12:23 pm

Great start. I look forward to these with much aniticipation.

Any chance of running a tuturial on altering the page layout. Maybe for having asides seperate to the main posts but not in the sidebar (useful for those like you, who are/have removed the sidebar. I would also love a tutorial on plugins and such, how to code their seetup in the style sheet and how to dictate where they go, be it sidebar, at the top of the page, at the bottom of the page or where ever.

Reply

10 ed December 29, 2005 at 1:14 pm

howabout a guide to changing the nav. options ie adding new links etc?

Reply

11 trench December 29, 2005 at 5:50 pm

Well this is just part one Ed. Im sure we’ll see more of what your looking for in the upcoming parts. Great Job man so far with this…

Reply

12 Khesrau December 29, 2005 at 6:05 pm

Much appreciated. I am looking forward reading the next part of this really well done tutorial!

Reply

13 Ulrich December 29, 2005 at 6:40 pm

Great guide.

I would love it, if you could provide a guide on how to use a flash header like the one Rui’s got at http://the.taoofmac.com/space.

Ive tried to follow all the instructions at http://whatdoiknow.org/archives/001629.shtml and I can get it to work when its standalone. But when I try to include it in the Header. No luck.

Reply

14 Shahab December 30, 2005 at 3:36 am

Great work again Paul .. !
For customizing my stylesheet, I take much help from CSS and Xhtml guides available at ZVON… Check it out ..

On a different note, the comment list is appearing broken in Maxthon .. Its fixed in WP 2 and K2 133 .. So better upgrade soon .. :P

Reply

15 ed December 30, 2005 at 8:59 am

yes, sorry, forgot to say thanks for part 1!! :-)

Reply

16 Paul Stamatiou December 30, 2005 at 12:36 pm

Shahab, I’m on WP2 but still use a hacked WP1.5 r125 distro… I’m waiting for a final K2, hopefully today, because upgrading my theme is a lengthy process as I have modified every file in K2.

Reply

17 Eric Nentrup December 30, 2005 at 11:40 pm

Paul….curious about how to do the ubiquitous yellow alert adorning so many K2 blogs. In the code, I see the div “primary” or “alert”.

thoughts?

Reply

18 Dennis January 1, 2006 at 9:52 pm

Paul – just wanted to let you know that in K2 for WP2 the default header is 780×200.

Reply

19 mugget January 10, 2006 at 5:19 pm

Eric Nentrup, you can use the ‘alert’ class by writing something like this in a post or page:

Simplicity is something of infinite beauty.

of course take out the space after those “Simplicity is something of infinite beauty.

also Paul – i just wanted to say a big THANKS for writing these articles! :D these will be a gigantic help. i’m no CSS whiz at all, but can find my way around if someone tells me where to go. once again, thankyou. :)

Reply

20 BOK January 15, 2006 at 10:04 am

Thanks a bunch! Without *REAL* documentation inside the K2-package (nevermind, because Michael is pointing towards this site in the K2-forum ;-), these articles are very useful.

Reply

21 Josh January 24, 2006 at 1:13 pm

One point, whenever wanting to customize someone’s else’s CSS, I use an add-on for FireFox or Mozilla that instantly let’s you see what CSS element is being used just by clicking on it in the page. Then, you can jump right to that section in the css file- amazing! Makes it really quick to modify CSS.

https://addons.mozilla.org/extensions/moreinfo.php?id=60

Reply

22 Necati January 27, 2006 at 9:14 pm

I have just checked and the default page width was 780 px, not 760.

That is right where I am on your tutorial. I am having trouble with my header image not being at the very top of the page…

Thanks,

Necati

Reply

23 Paul Stamatiou January 27, 2006 at 9:56 pm

Necati, when I had written this it was 760px, it was changed fairly recently to 780px.

Reply

24 Necati January 28, 2006 at 9:16 am

I thought so. Just so that you could update your article.

Thanks for all your efforts; again.

Necati

Reply

25 Simon January 30, 2006 at 9:03 pm

Will read fully in the morning, however this looks to be a very interesting read :)

Reply

26 wess daniels February 7, 2006 at 11:59 pm

this was exactly what I was looking for. Thank you for your work here.

Reply

27 Psiablo February 11, 2006 at 10:36 pm

Okay so I am working on a new template using the K2 theme. I have almost everything done but I have run into a problem. Why is there a white space above my header image? Does anyone know how to get rid of it?

My new site template can be seen at http://eric-taylor.com/new

Username= guest
password= guest

Reply

28 Amu February 21, 2006 at 9:39 pm

Testing Ajax

Reply

29 yo man March 2, 2006 at 4:17 pm

great thanks for the info….

Reply

30 kristen March 15, 2006 at 12:16 am

HELP! I’ve tried everything you described to put my own header in K2. It’s 780 x 200, I put it in the right folder, I’ve tried every variation on the file path that exists… I’ve tried your advice, dopamine addict’s advice (http://dopamineaddict.com/2006/01/13/modifying-k2-series-headers/), 2 friends’ advice.. nothing I’ve tried has resulted in my header becoming visible. Even if I suppress the h1 blog title info. I’m really at a loss for what I’m missing.

Reply

31 David March 16, 2006 at 3:42 pm

Great tut, visit my site http://www.dyberemening.dk

Reply

32 kristen March 16, 2006 at 5:39 pm

I ended up solving my problem through trial & error. Thanks for your helpful guide.

Reply

33 Dimitris March 17, 2006 at 7:49 pm

Great guide, thank you :)

Reply

34 Alan March 25, 2006 at 10:32 pm

I would like to thank you for your precious info about k2.

I’m using this nice theme on my site, and I will try to make some changes using

your well done guidelines.

Many many thanks for your great work.

Reply

35 khursten March 26, 2006 at 4:15 pm

Wow. This is a really sweet tutorial. Actually, I’m here to ask another question, and I hope that you could discuss this in some future tutorials for suctomizing K2… How did you lose your sidebar? I’ve been wanting to lose mine, only to actually hardcode it in the K2 files, such as taking out #secondary from the sidebar.php. Did you do this to implement this no sidebar thing?

Also, is it possible to have my entries in two columns?

Reply

36 Ryan d'oily April 13, 2006 at 1:02 am

These tutorials are great! I’m having lots of success following them. And I can’t wait to go through them all. I’m usually a little lost when it comes to customizing.

Quick question about sidebar asides: I’m thinking about using it to stick a few thumbnails of photos I’ve previously posted, and so I’m wondering, if I’ve set my reading options to show “At Most: 6 posts” and three of those are sidebar asides, are the main posts going to start pushing the asides off the page?

I’ve set sidebar asides to “3″. But I’m worried that my seventh post will drop the posted asides down to just two visible ones, and will put a fourth in the main section.

Reply

37 Srinath April 13, 2006 at 2:57 pm

Nice info !! thx for it :)

Reply

38 garnet April 28, 2006 at 4:14 pm

I’ve read the css tuttorials and yours. But I still have not been able to make a narrower width for the primary text of the post. I have a single sidebar to the right, and I want the post text to have more space around it, and be narrower.

I’ve tried altering all the specs in the K2 css for primary, including the padding, margin, and width. Nothing makes the post narrower.

Please advise,

thanks,

David

Reply

39 USTommyMC May 7, 2006 at 6:40 pm

I’ve stayed away from K2 for so long because of its complex style. Thanks to you I have made the switch and am on my way to making it unique to me. Thank you very much.

Reply

40 djmitch May 8, 2006 at 8:35 am

Many many thanks for your information.
If you have a look on my site, that use k2,

I have with a little javascript, the possibility to change css, so from white to black in this case.

The only thing that I can’t do is when the background is white, a quote comment remain black, so is hard to read from user.

Where is the code in the css for the block quote comment ?

Thank you..

Reply

41 Steve May 22, 2006 at 2:48 pm

Thanks for that, the random image script is great.

I’m now using it on http://things.networkbase.co.uk and asking the users if it should stay or not!

Thanks again, I’m off to read the other parts now!

Steve

Reply

42 Jas June 16, 2006 at 12:59 am

This is nice!! Keep up the good work :)

Reply

43 Florian Behrenbruch June 16, 2006 at 9:38 am

Hi! thanks a lot for these great guides to everything K2!! it’s like a sienece in itself for beginners… anyway. i’m having a smalish problem with the blog i’m setting up. i followed the instructions to how to include a header image but it kinda destroys the beauty of the page in IE: it’s repeating itself. Do you know a trick? the url to the new blog is:
http://www.florian-behrenbruch.de/blog/

Reply

44 Max June 17, 2006 at 5:35 am

Hi,

how can I change the sort of the “own sites” in the header menu?

max

Reply

45 Chris Bose June 19, 2006 at 9:35 am

I have been using your tutorials a lot recently.

I find them lucid, to the point and enormously helpful as a reference. I use them every time I forget something about K2 or want to see how to use it better.

Thanks

Chris

Reply

46 Kyle Korleski July 24, 2006 at 2:30 am

Great tutorial! Thanks Paul!

Reply

47 Daniel Markham July 30, 2006 at 1:17 am

Great tutorials so far. I changed my header image successfully but only after making the slightest of modifications to the code you provided:

#header{
background: #38C url(’testscheme/header.jpg’);
}

Of course I cannot duplicate it here (damn you plain text!) but in the example of the above code you gave in the tutorial “testscheme/header.jpg” is surrounded by “fancy quotes” (aka “typographer’s quotes”). I needed to change them to straight quotes (like they are above) to get the mod to work.

Reply

48 Daniel Markham July 30, 2006 at 1:22 am

Aha! ‘Tis Wordpress that converts straight quotes to “fancy” quotes. Plaint text in the comments authoring box = “fancy” quotes once the comment has been published.

Reply

49 V September 8, 2006 at 10:57 pm

The custom header image doesn’t show. I’m using Kristin Pishdadi’s photoblog hack, so there’s no option to upload a header image. I put in all the right code, but it still doesnt show.

Reply

50 Caciano Gabriel November 23, 2006 at 6:15 am

Great… i will traduce this article for Portuguese-BR…

Thanks!!!

Reply

51 Jeff December 5, 2006 at 1:58 am

Thanks Paul for more great info. :-)

Reply

52 Ellie December 25, 2006 at 4:55 pm

Hello,

Thanks for all this info. I am trying to do the rotate image header in the above site. I am using an adapted version of the Andreas theme.The front image info is in the header.php thus:

and in the CSS I had it set as:
background: #38C url(’/headers/rotate.php’); added to what was there before, which was only the following:
#header{margin:25px 0 0;}

I just get a no image red X, as obviously this is not quite right.

Can you make any suggestions as to what I might be doing wrong?
Thanks
Ellie

Reply

53 John Baker January 8, 2007 at 8:42 am

Thanks for this introduction. I got through it and even understood most of it and feel just about ready to tackle part II.
My problem, mainly is where to look, in which file in the theme to find the code I need to alter to tweak the blog.
I suppose I’ll ‘get it’ eventually.

Reply

54 jack January 8, 2007 at 6:05 pm

Nice site actually. Gone to my favourites. Thanks for creation.

Reply

55 cloneofsnake May 24, 2007 at 4:05 pm

Your link to the wiki page for a great intro to CSS (http://www.developersdigest.org/wiki/index.php/Intro_To_CSS) is not reachable. (It required membership?)

Reply

56 Paul Stamatiou May 25, 2007 at 4:02 pm

That link seems to be down, I took it out of the post.

Reply

57 Srikanth August 3, 2007 at 8:25 am

Nice article and a life saver for people desperately wanting to alter K2! !!!

Reply

58 Big White Hat August 18, 2007 at 4:03 am

I can’t even begin to thank you enough for this.

I’ll have my beta blog looking right and be ready to convert over to it in no time.

Not to mention you are teaching me so much about CSS and K2 in the process.

You rock!

Reply

59 garth September 5, 2007 at 3:21 am

I see the option to activate Asides in the K2 options, but I don’t see where I can indicate that I want it on the side or inline. Where is that? I want it on the side but it defaults to inline.

Reply

60 Tad Suiter February 21, 2008 at 11:37 am

…This is a great series, here. I’m finding it incredibly helpful, as a WP-n00b.

That said, I’m a bit confused by one thing:

I can find parts 1, 2, and 5, but can’t find any links to parts 3 or 4– and simply changing the number at the end of this page’s URL to 3 or 4 isn’t working…

Are parts 3 and 4 out there somewhere? I’m a bit mystified…

Reply

61 Paul Stamatiou February 21, 2008 at 7:00 pm
62 Mike Kelly May 19, 2008 at 1:46 pm

Hi Paul,

i am trying to customize k2 theme by:

increasing page width to fit 640×480 QT files
add logo & graphic & image & text to header andd sidebar
Where in theme editor do I change codes and do I need extra codes?
Add my contact details to footer

Any help really appreciated

Mike
Mikekellytv.com made on a Mac

Reply

63 Mike Kelly May 22, 2008 at 12:02 pm

Thanks for article Paul

I am learning about style sheets and I am trying to customize my blog by increasing page width for my 640×480 QT files and putting logos Text, graphics and banners on the header and sidebar. I was having trouble understanding how to change the code.
In wordpress/K2 what is the difference between style.css and template.php in theme editor (in relation especially as to where to make code changes for width graphics etc).In other words which is used for what

Thanks

mike

Reply

64 Michael Zick Doherty November 29, 2008 at 7:43 pm

Correct me if I’m wrong, but since paths are relative it should be:

#header{
background: #38C url(“header.jpg”);
}

NOT:

#header{
background: #38C url(“testscheme/header.jpg”);
}

Reply

65 Paul Stamatiou November 29, 2008 at 8:26 pm

@Michael, I’m not sure as I can’t test this right now but I think its fine since in my example it was within a “testscheme” folder – the purpose of which being so you don’t edit core CSS properties within K2.

For the purpose of this tutorial, we will assume that you have a scheme named testscheme within the K2 » styles folder

Regardless, this post is very outdated so I would not be surprised if newer features in K2 broke certain elements discussed in this and related K2 posts on this blog.

Reply

66 dante March 13, 2009 at 3:11 pm

Hi Paul! Excellent TUTS. Thanks. Quick question. I have a graphic header. I tweaked the “style.css” with the following code to hide the blog title and caption:

h1{
display: none;
}
#header .description {
display: none;
}

However, I notice on the actual post pages I still see the Blog Title. What can i do to eliminate this from happening. Thanks in advance!

Dante

Reply

67 balabo3_oa June 8, 2009 at 10:08 am
68 MaxTheITpro September 10, 2009 at 1:01 am

Great info dude!! I truly believe that proficiency in CSS goes a loooong way in taking WordPress to another level. “WP addicts…reveal yourselves!!!” :-)
BTW, I have a client who wants to change the background colour to an off yellow/beige with the font being a sea-blue colour. Any ideas?? It’s for a travel site here on the Indian Ocean.
Again, thanks for taking the time to put up this stuff. The WP gods in CSS-land are smiling at YOU. :-)

Reply

69 Sixten September 20, 2009 at 5:22 pm

Thank you so much for these guides!

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: