Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
  1.  # 1
    I was wondering if anyone had an idea why I can't seem to post properly formatted html tables within Vanilla.

    I'm using SirNot's HTML formatter and I've gone through the code but I can't seem to find any cause.

    I've gone in to the CSS and edited the "CommentBody" div so that the text within a table won't be blue, but it seems as though there is some kind of positioning problem. The example below results in a different output, but there is still a problem.

    (EDIT: In the post preview, it showed the table as though it had large padding values. What you see below is what I see.)

    On my site, it moves the table down approximately the same distance as the height of the table, leaving a large gap between it and the last line of text. Does this have to do with the use of the line-height property used in the Vanilla default CSS?

    (EDIT2: I hadn't noticed this before but it seems as though it's adding a lot of br tags in the table.)

    Example:














































    100 200 300
    400 500 600
    400 500 600
    400 500 600
    400 500 600
    400 500 600
    400 500 600
    400 500 600
    400 500 600
    •  
      CommentAuthorMark
    • CommentTimeJul 11th 2006
     # 2
    The HtmlFormatter replaces hard-returns with <br /> tags. So, you're actually getting <table><br /><tr><br /><td>my content</td><br /><tr><br /></table>

    Which causes all of that white space.

    If you just write your table with no hard return between tags, it will format properly without any extra white space.

    I imagine he did it this way because NOT putting the br's in there when writing a table would be kind of processor intensive, and also it's a pain in the butt to code that.
  2.  # 3
    Thank you very much.

    So it should be like this:

    100200300
    100200300
    100200300
    100200300
    400500600
    400500600
    400500600
    400500600
    • CommentAuthorSirNot
    • CommentTimeJul 12th 2006 edited
     # 4
    That's actually an easily editable option within the file itself, though, so if you'd rather it not change newlines to line-breaks all you have to do is change the 1 in define('HTML_CONVERT_NEWLINES', 1);to 0.

    And by the way mark, I've made some updates to that (including a system which cleans up markup), if you want to try it out/update it.
Add your comments
    Username Password
  • Format comments as