• Resolved D-Spayre

    (@d-spayre)


    Hi,

    I have two pdf_icon.gif files that I want to put in one cell side by side. File 1 and File 2 and it downloads a file.

    My code is putting one under another instead of side by side.

    How can I fix this?

    Thanks

    <a href="/download/file1.pdf"><center><img src="/pdf_icon.gif"></center></a>
    <a href="/download/file2.pdf"><center><img src="/pdf_icon.gif"></center></a>

    http://wordpress.org/extend/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question.

    Please post a link to the page with the table, and I’ll gladly take a look to find the best solution to this.

    Regards,
    Tobias

    Thread Starter D-Spayre

    (@d-spayre)

    http://www.dowsproperties.ca/?page_id=1790 “Charles”

    Also I would like to put a lable below each image if possible.

    Thanks for your help…

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for the link.

    The reason why the icons don’t appear side by side is the HTML <center> tag that you are using. You should not use that, but instead center the cell content with some CSS code (the same holds for the table head row, in which you do this).
    So, please remove all <center> tags from the head row and the column with the icons.
    Then, add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress, to center everything again:

    .tablepress-id-6 .column-6 {
      text-align: center;
    }

    The HTML code for the icons should then look like this:

    <a href="/download/file1.pdf"><img src="/pdf_icon.gif"></a><a href="/download/file2.pdf"><img src="/pdf_icon.gif"></a>

    (without any line breaks).

    Now, adding a label (or so-called caption) is more tricky. That would require more sophisticated HTML code. Another idea would be to use the WP Media Library, as that can do this automatically. You can access that via the “Insert image” button below the table edit fields.

    Regards,
    Tobias

    Thread Starter D-Spayre

    (@d-spayre)

    Thank you very much.

    That worked great. 🙂

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    very nice! Thanks for the confirmation! 🙂

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin repository. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Side by Side Images in Cell’ is closed to new replies.