You are not logged in.
Pages: 1
Hi,
When you put something inside code tags, the resulting block has a big bottom padding.
See how big the box is and how much space is lost under that line?
IMO, that discourages the use of the code block for a few lines of code because the block itself is ridiculously bigger than what's in it. That's unlucky because you frequently have to indicate shell commands that take just one or two lines.
The solution to correct this is easy and actually tidies things up:
In the html source, codeblocks are
<div class="codebox">
<div class="incqbox">
<h4>Code:</h4>
<div class="scrollbox" style="height: 6em">
<pre>CODECODECODE</pre>
</div>
</div>
</div>
You just have to delete the style attribute of the scrollbox div.
Then in the css, you add to the scrollbox the property
max-height: 40 em
(or whatever size you want for the max size of a codeblock before it starts becoming scrollable)
Offline
Why not just change the padding property in the CSS?
Offline
this worked for me in a stylish css file i have:
div.scrollbox {
max-height:10em !important;
height:auto!important;
}
now it shows no extra empty lines! the max-height:10 is my preference for when it scrolls as described above.
Last edited by toxygen (2010-06-11 04:02:10)
"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"
Offline
But but, if we do this, our IE users dont gonna be happy
Thanks for the info, that extra space bothered me a lot. And its a general consensus (I'm right?) that style go into css and not into html.
But gohu, report this in the bug tracker, I think this the place for this suggestion (a patch is a bonus).
Offline
this worked for me in a stylish css file i have:
div.scrollbox { max-height:10em !important; height:auto!important; }
now it shows no extra empty lines! the max-height:10 is my preference for when it scrolls as described above.
Nice. I added that to my generic css file.
Offline
Pages: 1