Results 1 to 2 of 2
  1. #1
    New Member
    Join Date
    Jul 2012
    Location
    Brisbane
    Posts
    1

    Help with Random Images

    Hi

    I have used the information below but I wish to make the images the same consistent height and width for my website.
    Any helpers please.

    Best Regards
    Brian.

    http://www.mediacollege.com/internet...ge/random.html

  2. #2
    Administrator Dave's Avatar
    Join Date
    Sep 2004
    Location
    Te Awamutu, New Zealand
    Posts
    3,959
    Blog Entries
    79
    Find the following line:
    Code:
    document.write("<img src='" + imlocation + randomimage()+ "'>");
    And change it to:
    Code:
    document.write("<img src='" + imlocation + randomimage()+ "' width='100' height='100'>");
    I've used 100 as the pixel width and height, but change these to whatever you want.

    Remember that the best way to resize images is to change the images themselves, not just the HTML attributes.
    Dave Owen
    MediaCollege.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Subscribe to us on YouTube