In this thesis tutorial I will show you how to color your navigation bar. Everything shows up fine in Firefox and Opera, but doesn’t show up fine in Internet Explorer. You can see the images below of the before and after of this tutorial. If you have any problems with this tutorial, then let me know when I will help you with your navigation bar.
Create an image that is the width of your page. The width of my page happens to be 974 pixels so that’s how wide I create the image. The height of my navigation bar was already at 32 pixels so I decided to create my navigation bar a little taller. It will not show up on your blog being taller as long as you send your height correctly. I set mine at 32 pixels but make sure you set the height in the code below to however tall your navigation bar is.
The code below has to be used with the custom functions code no matter what. It will not work without it. Make sure you change my URL to your own images URL. Then changed the height and width to whatever you use for your navigation bar image.
Custom CSS
.custom #customnav { position: relative; height: 32px; width: 974px: padding: 0 1em; background: url('http://franklinbishop.net/wp-content/uploads/2009/06/nav-background.gif') 100% 100% no-repeat; border: none; }
OR
I recommend just using the code below because it is definitely the easiest way to go about having a colored navigation bar. You may also need to use the custom functions code to go along with it. Make sure you change the URL that I have going to my image to your own. Plus chang the height to whatever the height is of your navigation bar.
Custom CSS
.custom ul#tabs { width: auto; border: none; height: 32px; background: #7da46d url('http://franklinbishop.net/wp-content/uploads/2009/01/nav-bckg.gif') no-repeat; }
WITH
The custom functions code below will need to be added to your custom functions file. It is easiest if you use this code with both ways above. If you do not want your navigation bar before the header make sure to change it to after or wherever else you want the navigation bar.
Custom_functions
remove_action('thesis_hook_before_header', 'thesis_nav_menu');
function custtomnav() { ?>
<div id="customnav">
<?php thesis_nav_menu(); ?>
</div>
<?php }
add_action('thesis_hook_before_header', 'custtomnav');Unfinished Navigation Bar

Finished Navigation Bar

That’s basically all there is to it. Thesis is really easy to use once you get used to working with code. I know there are many people that did not know how to have a colored navigation bar in Internet Explorer, but this should work. If not let me know and I will try to help.
{ 5 comments }
As always – helpful stuff. Great blog.
Another helpful post, as expected
Thanks for sharing this tutorial on color navigation bars. This was easily understandable and will be very useful especially for the newbies. Great job!
frank,help me,how to put favicon in this thesis theme?can you give me the code?thx
I like your post,however I have a problem with my navbar.It is showing catagories andthere are too many.Before I try your customisation I have to remove the links/catagories in my nav bar.Any ideas how to do this,I have tried but with no success,?Cheers
Hi Franklin,
I found your post while searching for code to add color to my Thesis navigation bar and how to have two. Unfortuantely I am so new at this I am unsure where to begin. I am just glad to know that it is possible to have to nav bars both above and below the header that have color and span the length pf the blog. That is what I would like to create.
If you would be so kind as to help me with my code I will be honored to receive an email from you and I can show you what I have done so far code wise in setting up my first site with it’s own domain. I am trying to get it ready to import my wordpress.com hosted blog into as we speak.
Thanks is advance. Hope you can help me sir.
Comments on this entry are closed.