View Full Version : How to fix [CODE]?
leftwich86
10-14-2009, 10:46 PM
<a href="http://www.virtualsportsnetwork.com/forum/showpost.php?p=777150&postcount=466" target="_blank">http://www.virtualsportsnetwork.com/...&postcount=466</a>
For some reason code has changed its formatting and now does not work properly. Any idea how to fix this? Any code I need to provide to make troubleshooting easier?
Lynne
10-14-2009, 11:13 PM
Since I have no idea what you expect it to look like, I can't tell you what's wrong. Maybe you changed the font? (for some reason, you are using Verdana in there instead of a basic typeface font)
leftwich86
10-15-2009, 12:18 AM
We're using verdana instead of a type face font -- there's no way to assign CODE a certain font?
Lynne
10-15-2009, 12:33 AM
We're using verdana instead of a type face font -- there's no way to assign CODE a certain font?
Sure, you can add it inline in the style tag in the template (along with all the other inline style stuff).
leftwich86
10-15-2009, 01:01 AM
What would the name of the style be?
.code {font-family: Arial;}?
Lynne
10-15-2009, 01:07 AM
Arial is also a sans-serif font. You want to use a monospace font like Courier.
leftwich86
10-15-2009, 01:27 AM
I tried doing this, but apparently I don't know how to do this. How do you give [code] a style set?
Lynne
10-15-2009, 02:45 AM
google "css font" and the first result is this - CSS Font (http://www.w3schools.com/css/css_font.asp)
leftwich86
10-15-2009, 04:20 AM
I mean what is code's actual title in the style sheet.
I tried this but could not get it to work:
code {
font-family: "Courier New";
}
Lynne
10-15-2009, 02:50 PM
You need to edit the actual template and use inline styling in this case since you have assigned it class alt1 (or alt2, I forget) and that class has a font assigned..
To find the template to modify, 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. Sometimes the template is the one mentioned at the very top of the page source.
leftwich86
10-15-2009, 04:51 PM
I turned the option on but am not seeing the template name around the tag. This is all the information before and after the code tag. There's a template called "message" before and after it but that's about it, and I know message refers to the entire message not just the BB code.
[code]
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: 6px;
border: 1px inset;
width: 640px;
height: 2162px;
text-align: left;
overflow: auto"> <b>
<b><u>Box Score</u></b>
1st 2nd 3rd 4th Final</b>
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" /> Cincinnati 5-3 -- 3 10 13 0 26
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/falcons_30.gif" border="0" alt="" /> Atlanta 4-4 -- 0 14 0 3 17
<u><b>1st</b></u>
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" />: 41 yd FG by Graham 4:46 -- 3-0
<u><b>2nd</b></u>
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" />: 35 yd FG by Graham 13:09 -- 6-0
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" />: 4 yd TD pass from Palmer to Spiller (Graham kick) 6:14 -- 13-0
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/falcons_30.gif" border="0" alt="" />: 6 yd TD pass from Ryan to Walter (Elam kick) 1:26 -- 13-7
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/falcons_30.gif" border="0" alt="" />: 30 yd TD run by Turner (Elam kick) 0:23 -- 13-14
<u><b>3rd</b></u>
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" />: 36 yd FG by Graham 7:39 -- 16-14
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" />: 22 yd FG by Graham 5:08 -- 19-14
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" />: 60 yd TD pass from Palmer to Ochocinco (Graham kick) 0:10 -- 26-14
<u><b>4th</b></u>
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/falcons_30.gif" border="0" alt="" />: 34 yd FG by Elam 7:43 -- 26-17
<b><u>Notable Statistics</u></b>
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/bengals_30.gif" border="0" alt="" /> <b>Cincinnati </b>
<u>
Passing RATING COMP ATT YDS TD INT </u>
9-QB Carson Palmer 101.5 20 29 232 2 1
<u>
Rushing ATT YDS TD </u>
35-RB Jerome Harrison 14 49 0
28-RB Bernard Scott 13 73 0
25-RB C.J. Spiller(R) 3 6 0
21-FB Jacob Hester 2 2 0
85-WR Chad Ochocinco 1 2 0
<u>
Receiving REC YDS TD</u>
85-WR Chad Ochocinco 7 105 1
25-RB C.J. Spiller(R) 5 41 1
80-TE Chase Coffman 3 33 0
89-WR Dane Looker 1 4 0
12-WR Brandon London 1 10 0
28-RB Bernard Scott 1 11 0
87-WR Mike Furrey 1 13 0
35-RB Jerome Harrison 1 15 0
<u>
Defensive SOLO AST TFL SCK INT</u>
58-MLB Rey Maualuga 5 1 2 0 0
55-OLB Keith Rivers 4 3 1 1 0
94-DE Domata Peko 3 0 1 1 0
29-CB Leon Hall 3 0 0 0 2
24-CB Joe Haden(R) 2 0 1 1 0
42-FS Taylor Mays(R) 1 4 0 0 1
<u>
Kicking FG MADE FG ATT LONG MISSED XP MADE XP ATT </u>
17-PK Shayne Graham 4 4 42 n/a 2 2
<b><u>Bengals Key Team Stats: </u></b>
Total Offensive Yards: 354
Rushing Yards: 132
Sacks Allowed: 1
3rd down conversions: 6-15 (40%)
Offensive Turnovers: 1
Penalties: 3 for 30 yards
Time of Possession: 31:57
<img src="http://i.cdn.turner.com/si/images/football/nfl/logos/falcons_30.gif" border="0" alt="" /> <b>Atlanta </b>
<u>
Passing RATING COMP ATT YDS TD INT </u>
2-QB Matt Ryan 47.8 13 27 213 1 3
<u>
Rushing ATT YDS TD </u>
33-RB Michael Turner 28 161 1
32-RB Jerious Norwood 3 11 0
<u>
Receiving REC YDS TD</u>
80-WR Kevin Walter 3 17 1
84-WR Roddy White 3 86 0
33-RB Michael Turner 2 18 0
32-RB Jerious Norwood 2 43 0
83-WR Harry Douglas 2 35 0
87-WR David Clowney 1 14 0
88-TE Tony Gonzales 0 0 0
<u>
Defensive SOLO AST TFL SCK INT</u>
50-MLB Curtis Lofton 6 5 1 0 1
94-DT Peria Jerry 4 2 3 0 0
51-OLB Jermaine Phillips 3 2 1 1 0
26-FS Erik Coleman 3 9 0 0 0
<u>
Kicking FG MADE FG ATT LONG MISSED XP MADE XP ATT </u>
1-PK Jason Elam 1 2 34 57 2 2
<b><u>Opponent Key Team Stats:</u></b>
Total Offensive Yards: 362
Rushing Yards: 172
Sacks Allowed: 3
3rd down conversions: 6-14 (42%)
Offensive Turnovers: 3
Penalties: 4 for 51 yards
Time of Possession: 28:03
<font color="White">. </font></pre>
</div>
Lynne
10-15-2009, 05:16 PM
Very odd that is doesn't show it (except it is probably in the post cache, so I guess it makes sense). Try a Search in Templates for <pre class="alt2" and you should find it. (I believe it is one of the bbcode_* templates.)
leftwich86
10-15-2009, 06:07 PM
Thanks for all the help Lynne. Almost there :) Found this in the bbcode template. What am I changing?
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">$vbphrase{code}:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: $stylevar[cellpadding]px;
border: 1px inset;
width: $stylevar[codeblockwidth];
height: {$blockheight}px;
text-align: left;
overflow: auto">$code</pre>
</div>
Lynne
10-15-2009, 08:13 PM
I would say you should add the font styling to the <pre> tag style info.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.