Fork me on GitHub

[autotheme] unnecessary space in blocks  Bottom

  • So, here is my problem:

    http://www.medycynaweterynaryjna.waw.pl/samorzadpn/banner.jpg

    Image is exactly 150x100. It was placed as a banner. Block identifies it as ...

    Code

    <!-- Begin Block -->
    <table width="160" height="130" border="0" cellpadding="0" cellspacing="0">
            <tr>
            <td width="5" height="15" border="0" cellpadding="0" cellspacing="0">
                <img src="<!-- [image-path] -->tlcorner.gif" width="5" height="15" alt=""></td>
            <td width="150" height="15" border="0" cellpadding="0" cellspacing="0">
                <img src="<!-- [image-path] -->top.gif" width="150" height="15" alt=""></td>
            </td>
           
            <td width="5" height="15" border="0" cellpadding="0" cellspacing="0">
                <img src="<!-- [image-path] -->trcorner.gif" width="5" height="15" alt=""></td>
        </tr>
        <tr>
            <td width="5" height="100" border="0" cellpadding="0" cellspacing="0">
    <img src="<!-- [image-path] -->lside.gif" width="5" height="100" alt=""></td>
           
       
    <td width="150" height="100">

    <div class="block-content" align="center" valign="middle"><!-- [block-content] --></div>


    </td>
            <td width="5" height="100" border="0" cellpadding="0" cellspacing="0">
    <img src="<!-- [image-path] -->rside.gif" width="5" height="100" alt=""></td>
        </tr>
        <tr>
            <td width="5" height="15" border="0" cellpadding="0" cellspacing="0">
                <img src="<!-- [image-path] -->blcorner.gif" width="5" height="15" alt=""></td>
            <td width="150" height="15" border="0" cellpadding="0" cellspacing="0">
                <img src="<!-- [image-path] -->bottom.gif" width="150" height="15" alt=""></td>
            <td width="5" height="15" border="0" cellpadding="0" cellspacing="0">
                <img src="<!-- [image-path] -->brcorner.gif" width="5" height="15" alt=""></td>
        </tr>

    </table>
    <!-- end Block -->



    If I instead of , paste image in normal HTML code, the block doesn't has this terrible space. How can i delete this space :?:
  • Try taking out the return carriages in your markup, between the td tags and the images, like this:

    Quote



    I know it looks ugly, but I have found it to work on occasion...

    -Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • no difference :? even if i delete all "enter's"


    Code

    <!-- Begin Block --><table width="160" height="130" border="0" cellpadding="0" cellspacing="0"><tr><td width="5" height="15" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->tlcorner.gif" width="5" height="15" alt=""></td><td width="150" height="15" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->top.gif" width="150" height="15" alt=""></td><td width="5" height="15" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->trcorner.gif" width="5" height="15" alt=""></td></tr><tr><td width="5" height="100" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->lside.gif" width="5" height="100" alt=""></td><td width="150" height="100"><div class="block-content" align="center" valign="middle"><!-- [block-content] --></div></td><td width="5" height="100" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->rside.gif" width="5" height="100" alt=""></td></tr><tr><td width="5" height="15" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->blcorner.gif" width="5" height="15" alt=""></td><td width="150" height="15" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->bottom.gif" width="150" height="15" alt=""></td><td width="5" height="15" border="0" cellpadding="0" cellspacing="0"><img src="<!-- [image-path] -->brcorner.gif" width="5" height="15" alt=""></td></tr></table><!-- end Block -->
  • A link would be helpfull if you have it up live. Also, try removing the div's valign="center", or replace it with style="vertical-align:top; and see if that makes a difference.

    --
    Under Construction!
  • link is http://www.medycynaw…amorzadpn/index.php

    Topiatic,

    yyyyhhhhhaaaaaaaaaaaaaaaaaaaaaaaaaaaaa


    Code

    <div class="block-content" style="vertical-align:top><!-- [block-content] --></div></td>


    IS CORRECT :mrgreen: :mrgreen: :mrgreen:

    :D :D :D :D :D :D THANK YOU THANK YOU THANK YOU :D :D :D :D :D
  • My pleasure 8).

    --
    Under Construction!
  • ups... problem is even worse now... I'm not able to click on banner. It's just not clickable :!:
  • and i know why... ehhh... we forgot about " between top; and >. The result was that banner was recognised as an image. Without ability to being clicked...

    So i ask everyone again. Can anyone help me :?:
  • Remember, 'line breaks' are inherent to divisions. I think that is why your first code is a little goofy. Get rid of the division to solve it. Or make the whole block a division, if you want nice HTML output for the entire PN page.

    --
    David Pahl
    Zikula Support Team
  • Mihauek

    and i know why... ehhh... we forgot about " between top; and >. The result was that banner was recognised as an image. Without ability to being clicked...


    icon_redface No Comment!

    But AmmoDump is right, getting rid of the div altogether might do it... it's bad enough that it's wraped inside of 8 datacells why wrap it further...

    --
    Under Construction!
  • Well there is nothing wrong with useing DIV... Just nest the whole block inside the DIV, instead of the DIV inside the block.

    --
    David Pahl
    Zikula Support Team
  • ehhh... unfortunately it doesn't work:

    Code

    <div style="vertical-align:top">
    <table>
    ...
    </table>
    </div>

    and

    Code

    <table>
    <div style="vertical-align:top">
    ...
    </div>
    </table>


    even deleting this makes no difference

This list is based on users active over the last 60 minutes.