View Full Version : Second Alt and [code] tags
douffle
09-03-2009, 07:28 PM
On one of my sites I need the second alternating color to be dark blue however, when posting a code snippet in a message using the [CODE] tags it also makes the background of the code window dark blue which makes the code difficult to read. Is there a way to have the second alt color dark blue but change the [CODE] background to white? Some place where this could be coded in perhaps?
Thanks
Lynne
09-03-2009, 09:09 PM
Just change the code template. To find the template that the code is posted in, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
douffle
09-03-2009, 09:37 PM
Just change the code template. To find the template that the code is posted in, do this - vboptions > General Settings > Add Template Name in HTML Comments > set to Yes . Then go back to your page and view the source code and you will see the name of the template called around your part of the code.
I did that and I think it is in the BBcode_code template so I added the following to my .css file.
/* Third alternating background color */
.alt3
{
color: #402020;
background: #ffffff;
}
Then I changed the template where it says:
<pre class="alt2" dir="ltr" style="
to read:
<pre class="alt3" dir="ltr" style="
but it doesn't change the background color of the code window. Would there be a different template somewhere for the background of the [code] window?
Thanks
Lynne
09-04-2009, 01:29 AM
When I change it from alt2 to alt1 on my site (I don't feel like defining an alt3), it changes it just fine. Try that first and see. Otherwise, look to see if the template has already been modified and maybe someone added the color directly into the style.
douffle
09-04-2009, 05:16 AM
OK, Thanks Lynne,
I found a "work around" and it works now.
Thank you very much for your help.
Much appreciated!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.