MyBB Community Forums

Full Version: HTML allowed - problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I'm testing myBB at home right now and I think it's great!
When I allowed HTML in a forum and added some code (table) to my post I got some problems, though.
First in the preview the html code was not translated. Don't know if this is intended, search gave me no usable results.
Secondly - after I had found out that in the final post everything looked o.k., I noticed some empty lines where there shouldn't be any. Especially below the table headline, where the code starts. I've configured the table via CSS (color, width, border and such). Even when I pulled all the code lines together so there were no line breaks in between them, there still was a huge gap between the headline and the table.
Any ideas how to fix that? On WBB the very same code worked flawlessly (no gap)...


Can
Can you provide a screen shot or a link please.
Of course.
First the code:
[B][COLOR=darkblue]Driver list Le Mans 2005[/COLOR][/B]
<table style="color:#000000; background-color: #F1E7D9; border:1px solid #000000"">
<tr><td style="width:180px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Arial; font-size:10pt; font-weight: bold">Driver</td>
<td style="width:120px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Tahoma; font-size:10pt; font-weight: bold">Car</td>
<td style="width:40px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Tahoma; font-size:10pt; font-weight: bold">Nr.</td>
<td style="width:80px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Tahoma; font-size:10pt; font-weight: bold">Times</td>
</tr>
<tr>
<td><font style="font-face: Arial; font-size:8pt">
1
2
3
4
5
6
7
8
9
...
</td>
<td><font style="font-face: Arial; font-size:8pt">
Toyota
Mazda
Mercedes Benz
Mercedes Benz
Mercedes Benz/Jaguar
Mazda
Jaguar
?
Mercedes Benz
...
</td>
<td><font style="font-face: Arial; font-size:8pt">
#11
#64
#5
#10
#42
#75
#33
#16
#177
...
</td>
</td>
<td><font style="font-face: Arial; font-size:8pt">
3:31.748min
?
3:37.099min
?
?
?
3:43.1xxmin
?
3:32.xxxmin
...
</td>
</tr>
</table>

You can see the result in the attached picture. Every line break between the headline and the actual table content is shown es empty line. But even when I put all the html stuff on a single line without line breaks there's still a gap.
While we're at it:
I sometimes use the <pre> tag when there's no time to tamper with tables and stuff. In mybb the tag seems to be re-configured with another font that's really hard to read. How or where can I change that back for it to work as expected? I've attached a second image that shows the difference between IE view (top line) and mybb.
Thanks for your help.


Can
To change the font size go to the admin cp, under Themes click Modify / Delete. Edit the theme you are working on.

The huge gap, i'm not sure what could be doing that. It could be a problem with IE since it's known you display things very odd, or it could be something in the CSS. When I tested the code you posted it didn't come out like the pictures you attached. I'm using Firefox 1.0.5 by the way.

I've found the tab for changing the font size, but I don't want to change it for the whole forum. Just inside the <pre> tag in posts, where html is enabled.
I wrote a small test page for demonstration (pre.html). That's how it's supposed to look like.
The image shows how this is displayed in IE (left) and FF inside a mybb post. FF gets the font quite right, but you will notice the gaps between the lines in both browsers. This only appears on pages where html is enabled in mybb.
I added another picture where I put the html-table and the <pre>-formatted text in a post in wbb2 - no problems, whether IE or FF is used, it looks the same. Difference here is I have to add <br> at the end of each line manually, not so in mybb (that's why it looks different when you put it in a single html file, the code was for testing in a mybb postWink). Is there an option to change that for html-posts, maybe that's got something to do with my probs.
I really want to use mybb because I think it's better than wbb2 in many ways (...and it's freeWink).
Hope we can work this out...


Can
Yip. The gap problem is due to the line breaks in the code your using. Theres no fix for it atm except for getting rid of any white space in the table stuff and using <br> instead of new lines. eg:
Driver list Le Mans 2005<table style="color:#000000; background-color: #F1E7D9; border:1px solid #000000""><tr><td style="width:180px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Arial; font-size:10pt; font-weight: bold">Driver</td><td style="width:120px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Tahoma; font-size:10pt; font-weight: bold">Car</td><td style="width:40px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Tahoma; font-size:10pt; font-weight: bold">Nr.</td><td style="width:80px;border-bottom:1px solid #000000;" valign="top"><font style="font-face: Tahoma; font-size:10pt; font-weight: bold">Times</td></tr><tr><td><font style="font-face: Arial; font-size:8pt">1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>...</td><td><font style="font-face: Arial; font-size:8pt">Toyota<br>Mazda<br>Mercedes Benz<br>Mercedes Benz<br>Mercedes Benz/Jaguar<br>Mazda<br>Jaguar<br>?<br>Mercedes Benz<br>...</td><td><font style="font-face: Arial; font-size:8pt">#11<br>#64<br>#5<br>#10<br>#42<br>#75<br>#33<br>#16<br>#177<br>...</td></td><td><font style="font-face: Arial; font-size:8pt">3:31.748min<br>?<br>3:37.099min<br>?<br>?<br>?<br>3:43.1xxmin<br>?<br>3:32.xxxmin<br>...</td></tr></table>
Let me know if that works Big Grin
Yup, fixed the gap problem, but editing will be a real pita like this.Wink Now I know what the checkbox "deactivate html in this post" in wbb2 is for, away from activating html: Once you uncheck it, all the line breaks get killed before the message is displayed.Cool Maybe that's something to put on the wish list for Gold, if it's not already there...
Any idea yet about the different font size in IE vs. FF using the <pre> tag?
Thanks so far, great support all around, keep up the good work!Smile


Can