Image Display Quirk...

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
straccop
Registered User
Posts: 56
Joined: Mon Mar 04, 2002 12:33 pm

Image Display Quirk...

Post by straccop »

I was designing my new board and was trying out various image sizes to see their effect on the board when I discovered a bizarre tendency.

First, I determined the width of the cell I wanted to image to display in because I wanted to link to an image of the same size to fill the cell (my board uses fixed width tables)

Then I created an image that was the same width as the cell (actually, 5px smaller in width) and linked to it.

Funny thing is, when the image displayed it added right space to it and distorted the width of the table even though it was slightly smaller than the cell.

In order to study the problem more closely I saved the page with the image to my local disk and tinkered with the image size parameters. When I used no size or fixed image sizes in the IMG tag the same distortion occurred. Equally odd, the image refused to fill the cell regardless of what fixed size attributes I assigned and always adding that right margin space. BUT, and this is the wierd part, when I set the image width to 100% it filled the entire cell and did not distort the table. :?

Any ideas on why that extra space is added when an image is linked and what (if anything) can be done to stop it?

- dave
User avatar
la'dsasha
Registered User
Posts: 38
Joined: Tue Mar 12, 2002 2:30 pm
Contact:

have you tried...

Post by la'dsasha »

all linked images have a border around them. its an html thing. try adding border=0 to your linked images.

when you set dimensions to 100%, it goes and takes up 100% of the available space, which is why it didnt distort your table.

also, most of the table cells i saw while going through the template files are set to relative values. this will cause the cells to be bigger on higher resolutions, and smaller on lower resolutions. a number of the cells also have nbsp's added to them, and may be causing extra margins in particular areas (but i did not notice this in any cell containing images).
Zyxian
Registered User
Posts: 33
Joined: Tue Mar 05, 2002 10:51 pm

Post by Zyxian »

It sounds more like a table issue than a image issue. I grep'ed through all the files that make up phpBB and some of the templates have cellpadding and cellspacing set to something other than zero. Look in the template that you are placing the image in and make sure both are set to zero.
Zyxian
User avatar
la'dsasha
Registered User
Posts: 38
Joined: Tue Mar 12, 2002 2:30 pm
Contact:

Post by la'dsasha »

Zyxian wrote: Look in the template that you are placing the image in and make sure both are set to zero.


yes, setting cellpadding & cellspacing to 0 will get rid of all the margin. however, it will force all the content text to hug the cells and look very tacky (unless you want to add a lot of formatting to fix it in a wide assortment of browsers, ns 4 and opera being the hardest to please).
Zyxian
Registered User
Posts: 33
Joined: Tue Mar 05, 2002 10:51 pm

Post by Zyxian »

Sorry. I should have been more explicit.

Change the cell padding/spacing ONLY for the cell that is going to hold your image. Leave the cells alone that will hold text.

la'dsasha: Is that better?
Zyxian
straccop
Registered User
Posts: 56
Joined: Mon Mar 04, 2002 12:33 pm

that ain't it guys..AND search engine problem..BUG

Post by straccop »

It's not cellpadding or anything within the table definition. That was the first thing I looked for. No, everytime I put a linked image in a cell it forces a 60 pixel space to the right of the image (right side of image only). If it were a cell padding issue, even at 100% the padding would still be present. More importantly, it would be on both sides of the image.

This looks like some kind of bug. Where do I report bugs?

- Dave
Last edited by straccop on Thu Mar 14, 2002 11:13 am, edited 1 time in total.
User avatar
Quintopia
Registered User
Posts: 35
Joined: Thu Jan 24, 2002 12:38 am
Location: Georgia
Contact:

you're right

Post by Quintopia »

C-47 should have found this topic. . .nada thing. You should report this in the tracker goto www.sourceforge.net/projects/phpBB/ and click on "Open Bugs" or whatever.
ph33r r UB3RN3SS!
Locked

Return to “2.0.x Support Forum”