Dynadot โ€” .com Transfer

Image resize problem

SpaceshipSpaceship
Watch

Zeeble

New.Net Destroyer....Established Member
Impact
17
Hey guys,

Just wondering if you know the solution to a problem which I've been looking into for a while:

When an image gets resized for my thumbnail gallery, the image also gets squashed out of proportion. How can this be solved?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
You mean you want to keep proportions ?
It would help if you could post some code.
 
0
•••
Hi Kath,

Thanks for your reply.

That's right, I want to keep the image in proportion.

Let me give you an example of an image gallery, here:
http://ocyr.org/
 
0
•••
It looks like you're using HTML to set the width and height in the <img> tag. This is a no-no, unless you already know the size of the image!

To keep it in proportion, either just specify one attribute (EITHER width OR height, not both).

Keep in mind that by doing this, the full-size of those images is downloaded and it may take a while. Use a PHP script, or write your own, to resize images in proportion so that you can keep a thumbnail version of them handy.

Btw, I suggest converting your layout (which is very nice) into CSS. Tables are way passe.
 
0
•••
Thanks very much for your response.

I agree, tables are outdated and we've updated on new sites, this one's just a bit behind.

I'm glad you like the design, it's one of my person favourites!
 
0
•••
I been scared and battered

I been scared and battered.
My hopes the wind done scattered.
Snow has cheap wow gold friz me,
Sun has baked me,
Looks like between 'em they done
Tried to make me
Stop laughin', stop lovin' swg credits, stop livin'--
But I don't care!
I'm still here!
 
0
•••
CatchedCatched
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back