Author Topic: thumbnail problem  (Read 6977 times)

0 Members and 1 Guest are viewing this topic.

Offline davy_74

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
thumbnail problem
« on: December 24, 2007, 06:58:41 PM »
Hi folks

All my thumbnails are 200 pixels, but I need  {random_image} visualize the thumbnails 100 pixels wide. How can I do that?

Cheers

David

Offline nobby

  • 4images Guru
  • *******
  • Posts: 2.873
    • View Profile
Re: thumbnail problem
« Reply #1 on: December 24, 2007, 10:34:08 PM »

Offline davy_74

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: thumbnail problem
« Reply #2 on: December 24, 2007, 10:56:29 PM »
Hi nobby

I red your answer, but it's not exacly what I mean. All my thumbnails are 200 pixels, but in my template I need all the pictures that appear in the left side (just like 4images default template) should be 100 pixels.  The template I use, is the same that 4images default, but instead of 640 pixels wide, it is 750. So, I want the pictures 200 pixels wide but the random on the left should be 100. How can I visualize my 200 pixel thumbnail as a 100 pixels? How can I constrain the way I show the picture without changing its real size?

Cheers

David

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: thumbnail problem
« Reply #3 on: December 25, 2007, 09:32:51 PM »
try to use css

something like this:
Code: [Select]
#random {
width: 100px;
}

#random a img {
width: 100%;
height: 100%;
}

Code: [Select]
<div id="random">{random_image}</div>

Offline davy_74

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: thumbnail problem
« Reply #4 on: December 26, 2007, 02:38:42 PM »
Hi Acidgod

It only works for the text below the images (Image Name), The picture stills 200 pix wide.
Some other ideas?

Cheers

Davy

Offline Acidgod

  • Moderator
  • 4images Guru
  • *****
  • Posts: 2.421
  • It's me?
    • View Profile
    • Flash-Webdesign
Re: thumbnail problem
« Reply #5 on: December 26, 2007, 04:59:10 PM »
i have test it with IE 7 and Firefox 2 an on me Site it works...

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
Re: thumbnail problem
« Reply #6 on: December 26, 2007, 05:11:18 PM »
Hi Acidgod

It only works for the text below the images (Image Name), The picture stills 200 pix wide.
Some other ideas?

Cheers

Davy

If work for Acidgod and no for you, clear cookies and cache files of browser. Try more for see is work. ;)
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?

Offline davy_74

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Re: thumbnail problem
« Reply #7 on: December 26, 2007, 08:52:43 PM »
ok, with the Acidgod code

Code:
#random {
width: 100px;
}

#random a img {
width: 100%;
height: 100%;
}

Code:
<div id="random">{random_image}</div>

I get a little line 100pix wide and about 2 pix height. I did a little correction

#random {
width: 100px;
}

#random a img {
width: 100%;

}

but it doesn't keep correct aspect ratio. What should I do to keep the 100 pix wide and the image maintain its aspect ratio?

Cheers

David