Slideshow Not Keeping Aspect Ratio Of Image
Mar 13, 2007
This slideshow works fine except that it keeps the aspect ratio of the original pic image. If original image is a portrate all photos are portrate size, even landscapes. If original is landscape, the same is true. The script works correctly when viewing in MS FrontPage. After FTP uploading problem appears. Code:
View 2 Replies
ADVERTISEMENT
May 21, 2004
Has anyone got any suggestions for keeping aspect ratio when scaling an image. I want to use it on my 'advert full details' on my website. This page displays an image the user has uploaded to my database, but sometimes I get really hugh images uploaded! When I scale them using % in Dreamweaver I lose the aspect ratio!
View 8 Replies
View Related
Jan 29, 2006
I am building a site in Dreamweaver for a client which uses templates
for a photogallery that uses simple Javascript to load images "OnClick"
into a named <img> tag. The <img> tag has no dimensions preset because
the loaded images vary in size and aspect ratio (the images
are all prepared so that they will fit easily within the rest of the page
layout, using their actual dimensions).
This all works just fine on Firefox (Apple), but on Safari and Mac IE
there is a problem. When image-2 replaces image-1 (using MM_swapimage),
if image-2 has the same height but a narrower width than image-1, then
image-2 appears with image-1's width. Both image-2 and image-1 have
the same height, so the display of image-2 now has the wrong aspect
ratio (everthing looks "fatter").
I haven't checked Windows browsers yet. I searched around and
haven't seen a similar issue. Anyone know about this, and a good workaround?
View 3 Replies
View Related
Jan 18, 2010
I've been working at this one for a few days now, and I keep getting the same puzzling results on what should probably have been a simple issue.
My page has images I've loaded at the top and set to {display: none}. The eventual goal is to create thumbnails that will maintain the original images' proportions, but fit within 150x150 px (this is for an artist's gallery page, so it's pretty important to keep the thumbnails looking like the originals). Obviously, the first thing I need to do is get the images' heights and widths. I've tried to do this by iterating through the document.images array and just getting the widths and heights, but for some reason I always get 0 x 0 for the first image. I've tried fixing this by inserting another image before it and then starting the loop at 1 instead of 0 (so it excludes that first image), but I still get the same value. I even tried setting the script to "defer" so it wouldn't run until the page had loaded. Same results. It also doesn't seem to matter whether I ask for document.images[x].width or document.images[x].naturalWidth. The same thing happens either way. Does anyone know what's going on? There's got to be something I'm missing.
View 6 Replies
View Related
Mar 31, 2010
so im almost finished my first site! very excited. its for my dads business, hes a screening contractor.actually i doubt he will get any business out of it, even once we get our real domain name and everything because i don't even know how to get Google to like it. its OK though, its mainly just a practice site for me anyways before i make a resume site for myself. anyways, this mayt sound like a flash question but i asked on flash sites and they have no idea, and i think it has more to do with how i embedded the flash. yoy see, it consists of 3 divs, an html content area, and a flash banner and a flash menu, which stretch depending on the window size to keep their aspect ratio. its that streachyness that i believe is causing the problem. everything works exactly as planned in Firefox, chrome, and pure flash player. but in IE, safari and opera, the size and position of things are way messed up! (only really care about IE). the edges of dynamic text are slightly to the left or right and hanging behind things because of it, same with some movie clips and when i didn't want things to appear on the stage i set their x position to be the length of the stage,
i think that ie is calculating the size onresize incorrectly. heres the site, take a look at the the script file:[URL]..
View 1 Replies
View Related
Dec 22, 2009
displaying images properly maintaining its aspect ratio?
My requirement:
===========
I have a table with single cell (means single row and column). I have to display image inside this cell. But when I do so using the below mentioned statement, the image expands and cover the entire cell area.
<table border=2 width= �600� height= �400�>
<tr>
<td> <img src= �MyPic.jpg�> </td>
</tr>
</table>
I will be loading different images inside the same cell, all having different height and width.
if you know how I can do it. I will be happier if you can paste the code here
View 22 Replies
View Related
Jul 8, 2010
Is there a way to create a div or some container in which there will be an image such that the image fills the container but retains its aspect ratio? So if the container is 100px x 100px and an image is 200px x 100px it will be resized to 100px x 50px. Conversely, if the image is 100px x 200px then it resizes to 50px x 100px. An image of 400px x 50px becomes 100px x 12.5px and so forth.
The issue is I have to dynamically build the container pulling images from an image folder. The images can come in all sizes. But I want to make sure they all fit in the same square 'box' without distorting the image.
There is text and a button below the image and I want them to stay in the same 'spot' on the screen without being moved around because the height or width of the image above it grows/shrinks to accommodate a change in either the height or width. These can change but not outside a controlled 'box'.
Maybe there's a way to get the actual size (through Javascript or something) then calculate a percentage to resize the image to?
View 4 Replies
View Related
Apr 14, 2011
where da boss wants our a large piece of our site to be fully dynamic and integrated on any screen size. This means changing font on size. Well I cam up with a solution, figured if no one has one better, then i'll share
[Code]..
View 7 Replies
View Related
Aug 9, 2011
I have a site that I'm building at [URL] which use the jquery cycle plugin for a slideshow. I won't post the code here because it's all there with view source at the above address. It's a work in progress. The slideshow is full width (the images in it are actually 2000px wide but looks full width), and works fine apart from when the browser window is resized. This is most noticable when you start with a smaller browser window and then resize it to be bigger.
The slides stay the same width as when the page loaded - I need them to adapt to the new width. I need the slideshow to be centered at all widths, so I've put the images in as backgrounds to divs with center positioning on them. I've tried getting the window width on resize and then applying it to the slides using jQuery, but the original calculated size overrides it when the slide changes.
View 1 Replies
View Related
Oct 19, 2011
I'm trying to size an image to fit the browser window. It will be the only thing in the frame, so it doesn't matter if it's the background or not. I've found quite a few ways to have the image automatically resize itself where it either gets cropped off or changes ratio to stretch, but I've not found anything where it'll keep the full image and ratio and just have bars top and bottom or sides.
View 14 Replies
View Related
May 25, 2011
I've set up jcarousel and configured it to work how I need it to, apart from one thing; I need the images to keep their width - height ratio when the browser is resized.
I'm using the Flexible carousel configuration and the width of the images changes appropriately when the window is resized, but the height stays the same, I need it to change.
View 3 Replies
View Related
Jun 1, 2011
i have a small image slideshow i want add a text slideshow to image slideshow. how is it?
my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
[Code]....
View 7 Replies
View Related
Jun 12, 2011
I have a basic 3 image slideshow banner for a website, but it loops and I'd like it to stop on the last banner image instead of start over. Here is the code I have, but I don't know what to do to stop the slideshow once the last image is displayed:
<div id="mySlider">
<div id="slider">
<!-- start slideshow -->
[code]....
View 5 Replies
View Related
Jan 9, 2006
I am trying to write a script to display pictures. I have the following code which works OK for displaying the next or prior picture. I know there are plenty of scripts out there for this, but I want to do it myself. So, I'll worry about the pause/play later. I dont know how to write the image using javascript. My problem that I currently want to fix is the first picture displayed is not initialized; that is, the variable I guess. I am passing the directory name, which is this first function. So, I have to click NEXT or BACK (my buttons) to display the first picture (actually the 2nd)... Code:
View 3 Replies
View Related
Jun 17, 2006
I'm hoping that someone can answer what is probably a really simple question. I've got the Random Image Slideshow script from javascript.com and have it placed in my site where I want it. Now how do I get it to read where I've got the images I want displaying? The folder I have is called homeimages with 10 photos currently inside it.
The script is:
View 5 Replies
View Related
Mar 28, 2011
I've got a script at present which allows me to cycle through images stored in an array as a slide show on a timed basis per each one.What I would like to do is have a 2nd array which has .wav files and when the first image is shown the first sound clip in the 2nd array plays and when finished the 2nd image shows followed by the playing of the 2nd sound clip in the array.If It is not possible to move images when the sound finishes I will set the length but would like to play the sound clips with the image.My code is shown below :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
[code]....
View 2 Replies
View Related
Jun 10, 2009
I'm going to set up a fade-in/fade-out slideshow, probably with jquery, that will loop through a list of images. But I only want the very first image to be shown once and then not again, even if the screen is refreshed. I don't know much about how to do that but I'm guessing it has something to do with a session, or cookies?
View 10 Replies
View Related
Dec 19, 2005
How could I make a random image slideshow with the images being in a folder and not listed in the head tag? (I have over 1,000 images and do not want to list them all in my index page)?
View 1 Replies
View Related
Apr 25, 2009
I have been trying all morning to put a basic slideshow into my site from the below link[URL]... am pretty new to this and having to host my images on Photobucket as I use Big Cartel. I cannot figure out where to put the image links and do they need -
<a href=" " ></a> or just direct links?
View 8 Replies
View Related
Dec 23, 2009
I'm trying to setup and image slideshow with captions. I can't it to work so far.
Here is a code snippet:
Javascript
var crossFadeDuration = 3
var Pic = new Array()
Pic[0] = '1.gif'
Pic[1] = '2.gif'
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++){
preLoad[i] = new Image()
preLoad[i].src = Pic[i]
}
function runSlideShow(){
if (document.all){
document.images.SlideShow.style.filter="blendTrans(duration=2)"
document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
document.images.SlideShow.filters.blendTrans.Apply()
}
document.images.SlideShow.src = preLoad[j].src
if (document.all){
document.images.SlideShow.filters.blendTrans.Play()
}
j = j + 1
if (j > (p-1)) j=0
t = setTimeout('runSlideShow()', slideShowSpeed)
}
Html
<body topmargin="5" leftmargin="0" marginheight="0" marginwidth="0" onload="runSlideShow()">
<img id="picture" name="SlideShow" src="1.gif" alt="" width="350" height="195" border="0" align="middle" />
View 7 Replies
View Related
Jan 21, 2010
Alrighty so here's what I have. Live example: [URL] It's a image slideshow that dynamically gets all the images (via php) in the current directory and puts them into the slideshow array. The array then randomly displays the images in the slideshow (via javascript). There are 5 images in the folder rotateimage which also has the php script getimages.php in it. Currently only the first image fades in however I want all the images to fade in as the first one does.
[Code]...
View 3 Replies
View Related
Jun 11, 2011
I am using a slideshow and want to basically have an 'image loading' whilst all the images load before the slideshow. Is there a way to do this? So far I have figured the best way around this is to have a GIF as a background image that says the loading message, and then once the slideshow loads over the top its fine, however im guessing this is'nt the right way to do this. I am using this slideshow set to just loop:
[URL]
I am open to using other similar slideshows if there is one more suited.
View 1 Replies
View Related
Aug 14, 2009
I downloaded a JavaScript for an image slideshow. Here's the script :
Code:
//Specify the slider's width (in pixels)
var sliderwidth="840px"
//Specify the slider's height
[Code]....
how to pause the slide on a mouseover? Is it possible with javascript to zoom the onmouseover image a bit?
View 2 Replies
View Related
Dec 3, 2009
I have some javascript for a jQuery slideshow, I need to make it autorun to the next image, but I don't know what I need to change in the code to make this happen. I got the script from this jQuery slideshow: [URL]
Code JavaScript:
$(document).ready(function(){
current = 1;
button = 1;
images = 10;
width = 480;
$('#p1').animate({"left": "0px"}, 400, "swing");
$('#b1').css("backgroundPosition", "left bottom")
$('#b1 b').css("color","#fff"); .....
View 2 Replies
View Related
Oct 22, 2007
I trying to get the image in the masthead to cycle through a small number of images. The image is the background-image of the div 'masthead'.
It works in Firefox but I'm getting an error in IE. The error is 'invalid argument' and refers to the j increment. I can't see the prob.
Also the slideshow is a bit abrupt and I need to make the images fade into each other. My old method and examples I've seen on the web don't seem to work. Does anyone know how to do it? Code:
View 1 Replies
View Related
May 3, 2011
I'm doing a javascript slideshow with image transitions. The way it's setup at the moment that slideshow and image transitions are two separate "modules" with different arrays.
First array for images looks like this:
NewImg = new Array (
"photos/1.JPG",
"photos/2.JPG"
);
Second it's a source for my thumbnails:
function photo() {
document.getElementById('div1').innerHTML = "<img src='photos/1.JPG' id='photo' class='photo'>";
}
function photo2() {
document.getElementById('div1').innerHTML = "<img src='photos/2.JPG' id='photo' class='photo'>";
}
etc..
Is it possible to include the second one, thumbnails into the first array?
View 1 Replies
View Related