TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,004
  • Total Topics: 21,330
  • Online today: 500
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 99
  • Total: 99

Hidden Center Block has bottom-margin problem

Started by haxen, January 24, 2007, 05:06:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

haxen

Hello, at my forum http://www.ps3hax.com , I have TP 9.7 with left, center, right and front blocks turned on in my front page.  The center blocks are 2 hidden blocks (1 is for Guest Page View Limit and the other is for Google Analytics).

When center blocks are turned OFF, the top of the left, front and right blocks are perfectly lined up in Firefox browser (not so in IE).

When center blocks are turned ON, even though they are hidden, the front blocks get pushed down slightly by the bottom-margin setting in TPortalBlocks.template.php with this line:

Quote
      echo
   '<div', (($theme || $block['frame']=='frame') ? ' class="tborder"' : ''), ' style="margin-bottom: 2px;">';

I would like to put a simple IF THEN right before this, simply saying (logically) that

IF centerblock ($side = center or something) THEN echo with a margin-bottom of 0px

ELSE THEN echo with a margin-bottom of 2px (i.e. continue with the code).

This would perfectly align the top of the blocks whether hidden center blocks were turned on or not.

A further refinement would be to exclude the above IF THEN if the browser is IE.

This is cake for you guys  ;), I don't know the syntax of php.  Many thanks.

haxen

whatever, i just put the bottom margin to zero now and it doesnt matter which browser or whether center hidden blocks are on or off, it all lines up now.

http://www.ps3hax.com

This website is proudly hosted on Crocweb Cloud Website Hosting.