extra breaks before table

Why might I get 7 extra breaks inserted before a simple table (containing an ordered list) that is placed in the description area? If I remove the table tags, everything works just fine.

Thanks.

Example:
http://share.gospelriver.com/Music/Array-Hymn/030-Gathered-Lord-around-Thy-table.mp3.php

Comments

  • acrylian Administrator, Developer
    How do you insert that table (Why do you actually need a table here at all???). You probably insert ed it into the editor, but you need to use the html view mode. TinyMCE will not add a `
    ` but a `
    ` (XHTML syntax) if ever.
  • I agree a table really isn't the best practice, but I can't figure out another better way to auto-find the max width of the text to be able to left-align the text (as ordered list) and still have it center aligned with CSS. I can use margin % but that does not truly center the text. Next best is to use a predefined width with a div, but I don't like that as well because I could get word wrap, and even then I won't get truly centered text due to differences in actual width.

    I inserted it simply with html in html view. It does not show breaks in the html view, even when going back to edit it again. There is a closing paragraph tag followed immediately by table tag (and it does the same thing with only a table in the description). When it renders the page, I get 7 consecutive break tags.

    Regarding type of tags, Chrome changes all my `
    ` to simply br, not sure about other browsers.

    Weird.
  • acrylian Administrator, Developer
    Ah, the `
    ` inserting is a bug I forgot as it is fixed in the trunk nightly already. So either use the trunk nightly build or wait for the soon to be release 1.4.2.3. Alternativey change the theme to use the "get" variant instead of the "print" function to get the image description.

    I don't understand the usage of the table. Use a list and give it and its ``elements a fixed width. Then center it. To avoid line breaks there is a html element for that.
  • Thanks for all the info. I tried replacing printImageDesc(true) with getImageDesc() and no luck, so might just wait for new release.

    Regarding the table, I would rather not set a width, because then I will get wrapping if I set it too narrow or it will appear off center if I set it too wide. Right? A table automatically gets the proper width.
  • acrylian Administrator, Developer
    You of course have to "echo" get variants...otherwise it would be a "print" variant..;-)
    You can set any blocklevel element to a variable width. Use min-width or max-width then modify the theme to have a wrapper element which content is centered. That should work.
  • ah, I get it. It looks like there are minor formatting variations with the get variant, so I'm going to stick with print.

    I must not have understood your CSS suggestion properly-- I created a double div with wrapper to the outside as follows but no luck. But you shouldn't have to answer css questions :)

    #descriptionWrapper {
    margin-left:auto;
    margin-right:auto;
    }

    #descriptionText {
    min-width:50px;
    text-align:left;
    }

    So looks like I just need to be patient for the next release.
Sign In or Register to comment.