View Full Version : Extra newlines in code boxes

06-08-2009, 01:58 PM
Is it just me or is there always an extra blank line in (short) code boxes?

I tried viewing CBoard in a few different web browsers, with the same results. It's annoying me. :)

Attached is an image of this.

This is a single line of code.

06-08-2009, 02:16 PM
Either we are both imagining this problem, or it's not just your imagination!


06-08-2009, 02:19 PM
Well, ruling out mass hallucination, I'm glad to hear it's neither my imagination nor my web browsers. :)

Just thought I should mention: it's not affected by whether the [/code] is on the same line or not.



and this:



look the same.

06-08-2009, 02:57 PM
Maybe because the HTML is messed up?

Here's one of the 'code' segments:

<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: 1px; border: 1px inset; width: 100%; height: 34px; text-align: left; overflow: auto">something</div>

The 'pre' tag never gets ended. And this is consistent.

06-08-2009, 03:08 PM
Good catch! But I don't think it's the cause of the problem. I added a </pre> tag in manually, and there was no visible difference. (Of course, it should be fixed if possible anyway -- always a good idea to close HTML tags . . . .)

On the other hand, if I remove the "height: 34 pix", then it displays as I think it should. :) So the height calculations are messed up . . . .

06-08-2009, 04:30 PM
I think you people need to "get a life" at this point. Altho not closing a tag deserves chastisement. dwks is obviously right with the "height"; being a chair tipper, I have minimum 20pt fonts and this issue is much harder to notice that way than in the OP, because 34px is 34px.

06-08-2009, 04:41 PM
But if you're going to all the trouble (and unportableness . . . .) of putting an absolute height into a code box, it might as well be less than 34 pixels high . . . I don't think many people view CBoard with even size 32 font.

Okay, it's probably irrelevant, but I noticed it and thought I might as well bring it up.

See you later.