Support » Plugins and Hacks » Insert PHP » How to get Two rows in line?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author WillBontrager

    (@willbontrager)


    phattrance, this is a PHP/layout question rather than a question related to the function of Insert PHP.

    To get you started, you might try putting the two sets of PHP code into a table, something like this:

    <table>
    <tr>
    <td valign="top">
    [insert_php] if(function_exists('tptn_show_pop_posts')) tptn_show_pop_posts(); [/insert_php]
    <td>
    <td valign="top">
    [insert_php] if(function_exists('tptn_show_daily_pop_posts')) tptn_show_daily_pop_posts(); [/insert_php]
    </td>
    </tr>
    </table>

    Putting the PHP code into floating divs instead of into a table might also work.

    Will

    thank you, that worked.

    i was wondering if its possible to get some space between those two lines. is that possible?

    Plugin Author WillBontrager

    (@willbontrager)


    Yes, it’s possible.

    Here’s documentation for tables:

    http://www.w3schools.com/tags/tag_table.asp

    The same site has documentation for CSS, in case you want to add padding instead of a separate blank column.

    Will

    Thank you, ive checked that page but unfortunately i couldnt find any solution for this (im really bad at css) 🙂

    Is there any simple way to get more space between these two lines / tables by just adding some code?

    Plugin Author WillBontrager

    (@willbontrager)


    Try <td valign="top" style="padding-right:100px;"> at the first column. Adjust the number of pixels to adjust the space.

    I realize sometimes a project is such a rush that the time to learn new things seems to be unavailable. It’s prudent, however, to learn what you need to know as soon as you have the time. If you’ll be developing for web pages, being comfortable with CSS is a great big must.

    Will

    Thank you for you reply, i tested the code but it seems to only move one of the columns (the right one), while the other one on the left is still at the same place.

    is there a way to move the left column a little bit to the left?

    Once again, thank you for all the help!

    The code im using:

    <table>
    <tr>
    <td valign="top"></td><td valign="top" style="padding-right:50px;">
    [insert_php] if(function_exists('tptn_show_pop_posts')) tptn_show_pop_posts(); [/insert_php]
    </td><td>
    </td><td valign="top">
    [insert_php] if(function_exists('tptn_show_daily_pop_posts')) tptn_show_daily_pop_posts(); [/insert_php]
    </td>
    </tr>
    </table>
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to get Two rows in line?’ is closed to new replies.