Author Topic: layout help needed - border showing up around image  (Read 1389 times)

tandemrx

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
layout help needed - border showing up around image
« on: February 18, 2010, 02:54:24 PM »
Its been a while since I have posted on the forum.  I am using the most recent version of TD (not the 2.6 beta)

Doing a new layout and having an issue with it - although minimally different from my standard layout that I made up.

In my standard layout I just have 2 columns of cells in one row.  The new layout I simply added a row with a single cell (an image) above the other 2 columns.

So the image is 1024 x 122.

There is black space (background color) on top of and on bottom of this image filling the entire row.  It is symetrical, about 10 pixels in height.

I have no padding in either this row or the row below (nor for any column or any cells).  I also have no borders for any cells.

for the top cell (row), I am not specifying any height or width of the image (left at zero's).  Since my monitors are set at resolution of 1024 x 768 I figured I would just let the software auto-fill the image into that cell space.

Any thoughts as to where this black border on top and bottom of image is (none on sides).

thanks

tandemrx

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: layout help needed - border showing up around image
« Reply #1 on: February 19, 2010, 09:57:29 AM »
Here is the screen I am talking about (attached).

I am pretty sure it has to do with the pixel size of the image in the top cell and something I need to alter there.

I made the image 1024 x 122 and my screen size is 1024 x 768.  Hoping that the top image would fit the width of the screen and that it would sit at the top of the screen and the rest of the layout would come up to it, but the background (black) is creating a border on the top and bottom of the image.

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5429
    • View Profile
Re: layout help needed - border showing up around image
« Reply #2 on: February 19, 2010, 10:32:31 AM »
Export your layout and post it (or just the layout template and the image) and I'll give it a whirl.  This can be tweaked to do what you want, it's just a matter of figuring out what needs to be tweaked.

tandemrx

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: layout help needed - border showing up around image
« Reply #3 on: February 19, 2010, 11:11:26 AM »
here is the exported layout.  I think the image is included in the zip file, if not, let me know

thanks

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 5429
    • View Profile
Re: layout help needed - border showing up around image
« Reply #4 on: February 19, 2010, 01:14:52 PM »
OK, so here is 1 solution.  On the CCR-logo cell, keep the height, width and padding all set to 0, and add an HTML style "height" and set it to "122px".  Then change the cell's HTML to:

<img src="file:///<home>\images\testCCRheader.jpg" border="0" height="100%" width="100%">

(I added height and width attributes.)

This make the cell have a minimum of 122px height (which is the height of your image).  If stretched beyond that height, the image will also stretch.

I'm honestly not certain why this behaves the way it does.  I'm sure if I dug in deep I could figure it out.  There are some fundamental things about the way the layout works that I would change if I could.  I was a lot less experienced with that sort of thing when I first implemented it.  Unfortunately any changes of that nature now would likely break so many existing layouts.

tandemrx

  • Sr. Member
  • ****
  • Posts: 344
    • View Profile
Re: layout help needed - border showing up around image
« Reply #5 on: February 19, 2010, 01:42:57 PM »
thanks Corey,  Never would have figured that out, and I thought I was pretty handy with TD layout  ???

Works perfectly