Affiliate Marketing
Forum Search

Reply
 
LinkBack Thread Tools Display Modes

  #1 (permalink)  
Old 30-11-04
Registered User
 
Join Date: Aug 2003
Location: Cornwall
Posts: 209
Thanks: 0
Thanked 0 Times in 0 Posts
Melter is an unknown quantity at this point
  Controlling image sizes

Anyone using merchant datafeeds will know that there's no consistency when it comes to the size of product images served to your pages. I need to control the size of these images and obviously have used a fixed width and height in the code but this only squashes or stretches the images that fall outside of the set pixel levels and frankly looks totally unprofessional.

Is there anyway to set a width and height that only alters the image if it goes over that but stays as it should be if under the size?
__________________
Lcd Tv Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 30-11-04
Keith's Avatar
Moderator
 
Join Date: Aug 2003
Location: Richmond North Yorkshire
Posts: 2,116
Thanks: 19
Thanked 5 Times in 4 Posts
Keith seems to know their stuff
cant remember where it came from but I use this.

script type="text/javascript" language="JavaScript">
function checkImages()
{
var imagesArr = new Array();
imagesArr = document.getElementsByTagName("img");
for (var i=0; i
< imagesArr.length; i++)
{
if (imagesArr[i].width>"90")
{
imagesArr[i].width="90";
}
}
}
window.onload=checkImages;
</script

put the <> back on to get it to work.
__________________
Keith
My Blog general ramblings. Internet Marketing Blogs UK all the blogs together in one place (pm for inclusion)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 30-11-04
Registered User
 
Join Date: Aug 2003
Location: Cornwall
Posts: 209
Thanks: 0
Thanked 0 Times in 0 Posts
Melter is an unknown quantity at this point
Cheers Keith I'll give it a try.

I'm not sure what you mean by this bit though:
Quote:
put the <> back on to get it to work.
Btw just had a look at your site and I don't know if you've checked it in Firefox but the box isn't extending with your content like in IE.
__________________
Lcd Tv Forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 30-11-04
morleymouse's Avatar
Super Member
 
Join Date: Aug 2003
Location: Costa Del Sheffield
Posts: 2,752
Thanks: 3
Thanked 10 Times in 6 Posts
morleymouse is an unknown quantity at this point
as in the < script> and </ script> remove the and

^ there spaces

theres something you can do with php, to properly do it. im looking into it for something im doing at mo
__________________
Dan Morley
Alpharooms.com
daniel at alpharooms dot com - Hotels, Flights, Airport Transfers, Care Hire + More! sign up
My Blog | Cheap Holidays
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #5 (permalink)  
Old 30-11-04
999gi's Avatar
aka Antony
 
Join Date: Aug 2003
Location: Bristol
Posts: 971
Thanks: 0
Thanked 0 Times in 0 Posts
999gi is an unknown quantity at this point
Ive tried some of these but never found one that doesnt cripple the page load speed
Ive settled for just fixing the width only on the basis that while the height will then vary, 99% of the time it wont be that significant to be a problem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Affiliate Marketing RSS Feeds - Contact Us - Affiliate Marketing - Archive - Privacy Statement - Top

Content Relevant URLs by vBSEO 3.2.0 RC7