You are here:  » Setting Page Height

Support Forum



Setting Page Height

Submitted by amplidyne on Wed, 2008-02-06 00:11 in

I am using user_header_after.php and user_footer_before.php to add side bars(table to display ads) on my pages. Everything works well except for some reason height of these side cell is not equal to the search result that displays in the center. Is there a way to make the height of these side bars variables(equal to the search result cell in the middle?

Thanks,

Submitted by support on Wed, 2008-02-06 08:21

Hi,

The height of any HTML element is generally only dictated by the content within it; (you cannot specify the HEIGHT of a DIV element); however if you use a table instead of DIVs then your sidebars will be the same height as the central (search results) column... I normally recommend something like this for creating left and right sidebars:

html/user_header_after.php

<table width='100%'>
  <tr>
    <td valign='top'>
      <!-- insert your left column code here, you can use PHP tags -->
    </td>
    <td valign='top'>

html/user_footer_before.php

    </td>
    <td valign='top'>
      <!-- insert your right column code here, you can use PHP tags -->
    </td>
  </tr>
</table>

Notice how i've used valign='top' - this is because the default vertical alignment for tables is center, so this will make sure that everything is aligned with the top of the page.

Cheers,
David.