Menu

How to center yuor blog in geoBlog 1.0 Stable

Help
2004-07-01
2004-07-02
  • Craig Cmehil

    Craig Cmehil - 2004-07-01

    In order to center the blog you will need to modify the viewblog.php file.

    Search for this line:

    <td colspan="2"><br> <?php print $result['content']; ?></td>

    that is the table cell that displays the blog content, simply change it to:

    <td colspan="2" align="center"><br> <?php print $result['content']; ?></td>

    or

    <td colspan="2"><br><div align="center" <?php print $result['content']; ?></div></td>

    Your choice, however note that some browsers have a problem with div tags inside of table cells.

     
    • Craig Cmehil

      Craig Cmehil - 2004-07-02

      In case you'd like to center the entire blog and not just the content within the table you have a few different options:

      <table class="titleTable">
        <tr>
          <td class="titleText"><?php print($blog_user); ?></td>
        </tr>
      </table>
      <br>
      <table class="blogTable">

      and add a <div align="center"> in between the <br> and the <table class="blogTable">

      then a closing </div> should be placed after

      <?php
      include("footer.php")
      ?>

      Now of course the options come when you playing around with the placement of the DIV and closing DIV as you can arrange the page so that only certain parts are centered and not others.

      The other option is to modify the CSS file and alter the style .blogTable although for most browsers the DIV option is the best choice.

       

Log in to post a comment.

MongoDB Logo MongoDB