View Full Version : Changing the navbar background color
johnstires
08-19-2006, 10:19 PM
How does one change the navbar background color without changing the other popup menus?
I tried to create a custom style named .navbar_bgcolor and replaced all the vbmenu_control tags in the navbar template with navbar_bgcolor, but it did not work.
I think my CSS was off
This is what I put in my custom style:
.navbar_color { font-color: #FFFFFF;
background-color:#4C1A79;
}
The color changes but not the font color. However the font defaulting to the body style color.
Ntfu2
08-20-2006, 05:58 AM
you dont want to use font-color as the links arent controled by the font attribute
try something like this
.navbar_color a:link, a:visited {font-size: 12px; color: #FFFFFF; text-decoration: underline;}
.navbar_color a:hover, a:active {color: #E1E1E2; text-decoration: underline;}
johnstires
08-21-2006, 02:18 AM
This works, however it is wreaking havoc on other links on the board in IE. Why would a custom class be changing the style in other templates when the only template I have been fiddling with is the navbar.
johnstires
08-22-2006, 04:47 PM
How can I hard code this to change the background. Everything else can stay the same. I just want to bg color to be:#4C1A79.
I can change the <td> but not the <table> or the <tr>
This is the start of the code, shouldn't I be able to place style="background: #4C1A79" somewhere in there for the entire navbar to be made dark purple?
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<td id="newlink" class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">PYC Home</a> <script type="text/javascript"> vbmenu_register("newlink"); </script></td>
Ntfu2
08-22-2006, 06:18 PM
try placing the code you mentioned within the <div align="center" tag
<div align="center" style="background:.......>
Maybe that'll work
johnstires
08-23-2006, 01:34 AM
I tried that before and it didn't work.
THe guys at vb.com helped me figure it out. I placed this in my additional CSS:
/* ***** navbar back color ***** */
.navbar_color
{
background: #4C1A79;
color: #FFFFFF;
font: bold 11px tahoma, verdana, geneva, lucida, 'lucida grande', arial, helvetica, sans-serif;
padding: 3px 6px 3px 6px;
white-space: nowrap;
}
.navbar_color a:link, .navbar_color_alink
{
color: #FFFFFF;
text-decoration: none;
text-transform: uppercase;
}
.navbar_color a:visited, .navbar_color_avisited
{
color: #FFFFFF;
text-decoration: none;
text-transform: uppercase;
}
.navbar_color a:hover, .navbar_color a:active, .navbar_color_ahover
{
color: #FFFFFF;
text-decoration: underline;
text-transform: uppercase;
}
Then I changed all the vbmenu_control tags in the navbar to navbar_color.
That worked.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.