Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    329
    Plugin Contributions
    0

    Table Extra Space

    I reposted this because I coulndn't reply to the archive:

    *****Original Question:

    I added an html table in my tpl_header to line up some images. When it displays in the browser, It adds a 2px line under the table. I need to line zencart up with another sites header. But it jumps 2px.

    This only happens in a pc browser and not in the mac browser.

    Is there a reason why it adds these lines to the bottom only?

    Can it be fixed?

    Thanks

    *****First Response:

    http://developer.mozilla.org/en/docs...ysterious_Gaps

    you want this fix...

    Quote:
    Setting images to be blocks

    The first choice, and one that will work for most graphically-intense designs, is to convert the image from being an inline element to a block-level element. Do that, and it no longer generates a line box, and so the problem goes away-- assuming that the image is the only thing that occupies that table cell. In the simplest case, we might add a style like this:

    Code:
    td img {display: block;}

    *****New Question:

    I have read through the link you sent: however, I am still unsure where to put this:

    td img {display: block;}.

    If this is my table:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="163" align="left" valign="top"><a href="http://www.site.com"><img src="../images/header_01.jpg" width="163" height="135" border="0"></a></td>
    <td width="505" align="left" valign="top"><a href="http://www.site.com"><img src="../images/header_02.jpg" width="505" height="135" border="0"></a></td>
    <td align="left" valign="top" background="../images/header_03.jpg">&nbsp;</td>
    </tr>
    </table>


    Where would I put this : td img {display: block;}

    Thanks for all your help

  2. #2
    Join Date
    Mar 2006
    Posts
    208
    Plugin Contributions
    0

    Default Re: Table Extra Space

    1.What version do you use?

    2.td img {display: block;} goes into your stylesheet


    Dimi

  3. #3
    Join Date
    Jul 2005
    Location
    Orlando, Fl
    Posts
    329
    Plugin Contributions
    0

    Re: Table Extra Space

    I'm using 1.3.1, How is this applied in the style sheet. Basicly I need to align 2 images and 1 background image. Right now I have them sitting in a table:

    td image 1 / td image 2 / td background image 3

    How do I implement this into the tpl_header & stylesheet?

    Thanks for your quick responses.

  4. #4
    Join Date
    Aug 2005
    Posts
    53
    Plugin Contributions
    0

    Default Re: Table Extra Space

    There are two ways to do this.

    1. Put it in the stylesheet, just add it to the bottom

    td img {
    display: block;
    }

    However, know that it will affect every image.

    2. Apply the style directly to the image. I've edited your table below.

    If this is my table:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="163" align="left" valign="top"><a href="http://www.site.com">
    <img src="../images/header_01.jpg" width="163" height="135" border="0" style="display: block"></a></td>
    <td width="505" align="left" valign="top"><a href="http://www.site.com">
    <img src="../images/header_02.jpg" width="505" height="135" border="0" style="display: block"></a></td>
    <td align="left" valign="top" background="../images/header_03.jpg">&nbsp;</td>
    </tr>
    </table>

    Try both and see what happens.

    tina
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Sincerely,
    Tina
    dharma internet

 

 

Similar Threads

  1. Columns - extra space
    By Momof9Blessings in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 15 Jul 2013, 09:45 PM
  2. how can I insert extra product info into extra db table?
    By lndlyb4 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 1 Feb 2010, 07:18 PM
  3. Extra Space
    By SweetEmotions in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 24 Aug 2009, 10:50 AM
  4. Extra Advertising space
    By MHJGKane in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 11 May 2006, 02:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR