I'm designing a VBS tutorials website/script depot. I have a css style for displaying code.
I also use the <pre> tag to preserve the formatting.
Oddily, the <pre> seems to add an extra line-break (indicated by the blue veritcal bar) Where is that coming from!
What's with the extra line break?
Also, when content extends beyond the horizontal borders of the element, a horizontal scrollbar is added so you can see the rest of the content. Unfortunately, the scrollbar seems to get added WITHIN the element and thus forcing (at least from the perspective of the interpreter) a vertical scroll bar also be placed.
Is there a way to ONLY have a horizontal scrollbar?
-Geates
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon
Code:
.code {
background-color: #FFFFFF;
color: #000000;
font-family: courier;
font-size: 12px;
border: 1px solid #AAAAAA;
padding: 5px;
border-top: 2px solid #AAAAAA;
width: 100%;
overflow: auto;
}
I also use the <pre> tag to preserve the formatting.
Code:
<span class="code"><pre>
set objShell = WScript.CreateObject("WScript.Shell")
strSID = "S-1-5-21-725345543-57989841-1801674531-500"
strWallpaper = objShell.RegRead("HKU\" & strSID & "\Control Panel\Desktop\Wallpaper")
</pre></span>
Oddily, the <pre> seems to add an extra line-break (indicated by the blue veritcal bar) Where is that coming from!
What's with the extra line break?
Also, when content extends beyond the horizontal borders of the element, a horizontal scrollbar is added so you can see the rest of the content. Unfortunately, the scrollbar seems to get added WITHIN the element and thus forcing (at least from the perspective of the interpreter) a vertical scroll bar also be placed.
Is there a way to ONLY have a horizontal scrollbar?
-Geates
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
- Martin Golding
"There are seldom good technological solutions to behavioral problems."
- Ed Crowley, Exchange guru and technology curmudgeon