HTML - Image Zoom On Resize
Hello!
I am pretty new to HTML, but I was asked to make a webpage for my girlfriend's small business. What I want to do is copy the style used on the main image of this website: http://www.stellamccartney.com/. What I am looking to do is take an image and have it resize whenever I resize the browser window. If you can tell, the image is actually zooming in and out in order to maintain its correct ratio. I am not interested in copying anything else from this website, only the way the main image works. Looking at the source code has me baffled; I believe they wrote this using javascript, but I can't tell. If anyone knows how to create a similar effect as this site I would greatly appreciate the help. Thank you! Similar TutorialsI'm having the toughest time trying to find how to do this and I know it can't be that hard! I want a stationary image cell that displays part of a larger image where the user can zoom in and out by scrolling and slide around the picture by dragging (kinda like how one interacts with Google Maps). Any Ideas? hey can you guys help me. i found this on the net and i want to use it but it doesnt work in IE. Can you guys look at the code and help me fix it? here is the page. http://216.55.165.15/Ecommerce/Zoom.html Thank you guys very much. Can someone tell me why the image isn't zoomed all the way to its max when clicked on? You have to click on the zoomed image to get it to its max dimensions. Why does it do this and how do I fix it so it will max out in a separate window when you click on the thumb? I don't know how to write this Javascript stuff myself. Click on any image to zoom I am having a problem with images that vary in size. I let the user upload images and then display it on a web page. The problem is that the images that the users submit are different sizes. Some look good while others look distorted. Any Ideas? Evening all, I'm looking for some simply coding to tell an image to resize to fit into a frame that is defined in the CSS layout. The image size needs to be reduced to 630x402, the original size is much greater. <SCRIPT LANGUAGE="JavaScript"> var theImages = new Array() theImages[0] = 'images/main_img.jpg' theImages[1] = 'images/main_img2.jpg' theImages[2] = 'images/main_img3.jpg' theImages[2] = 'images/main_img4.jpg' var j = 0 var p = theImages.length; var preBuffer = new Array() for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = theImages[i] } var whichImage = Math.round(Math.random()*(p-1)); function showImage(){ document.write('<img src="'+theImages[whichImage]+'">'); } </script> <div id="main_img"><SCRIPT LANGUAGE="JavaScript">showImage();</script></div> I need someway of implementing the size change into the coding somewhere. Thank you for any help in advance! I am looking for an easy code that when applied will resize an image link. I am trying to get around code that swaps one image for another on mouseover. I just want one image that will be resized on mouseover. I know this won't work, but something like: onMouseOver= width="180" height="180" with the original swap image being: width="190" height="190" Thanks for the help and for not slamming me for my ignorance! Peace. Hi All, We have images which are displayed in panel series. We have images if all sizes and width, we have tried using width=100% which makes all the images to fit the width allotted, which makes the image BLUR if the image is very small. Is there a way by which we can have width=100% for only the oversize images and leave the others as it is. Regards, Nagesh Hi, I'm building a web site for someone. At the top of the page is the logo and some flowing lines going from left to right on screen. If you look he http://www.chrisvanochten.com/clients/voicecontrol/ and start resizing your browser window then you would see the content at the bottom moves along so that it is always in the center. The problem I have is that the image on the top will not do this. This is because it's a background image. I want the image to be positioned so that the logo is above the latest news section. I have tried using a normal image and aligning it to the center (scroll down on the page above for this) but the image is always anchored to the left of the screen if the image is larger than the browser window. Is there anyway to set the background image so that it is anchored in position and that it will run off both the left and right hand side of the screen (as opposed to just the right hand side)? Hi, I have a background image in my website and I want it to look the same in all window resolutions. However, when I resize the browser's window and I make it smaller althuogh I can see all the contents in the page I only can see a part of my background image. My CSS is like this: Code: body.secondary { background-image:url('images/flowers.JPG'); background-repeat:no-repeat; background-position:right top; background-attachment: fixed; } And if you need it this is the page. Many thanks! Cheers! How to set width & height of background image ? Since generally we set background image for anything like table, div tag etc. but i need that the image size is very shot while assigning as background image so how can i manage this width & height ? Please tell me that how can i do it bcoz I am not able to resize it by css also. OR Whenever I put any image in background then it must show me full image not a croped image whether cell size is low or very high...Generally it crops image or sometimes it repeats image 2 or more times. Since i know i can stop the repeating image but I want to know to put the fully image in cell / table / div etc.. Regards.... Hi - I am fairly new to coding but really enjoying it I am trying to create a background image effect as seen he http://www.prada.com/ and http://news.jam-factory.com/ - The background image fits to the window, without distorting the image, and bits are hidden when needed Here is my attempt: http://www.piersart.co.uk/random - but when the window is tall and thin, a black strip appears at the bottom. What am I doing wrong? I don't quite understand how to use overflow, if that is something I should be using. Do I have to use Javascript (to get window dimensions, or resize the image)? If so, how? Many thanks in advance Hello, I have a web page that has an image set as the background. http://www.theillusionist.ca/about.html - I used nested tables. Yes, I know, bad thing, but anyways, when I zoom in / zoom out the site the site does not look good. So I thought I would <div> tags, re-work the above page http://www.theillusionist.ca/atest.html and the same issue occurs. I just don't know what to do. Can someone give some solid advice or point me to a tutorial that would be great. Thanks. on this site, when you put your mouse on an image, it enlarges, that seems better than have people click and it goes to another window. How is that done, I look a little for a java script to help, but I didn't find the mouse over one link below shows what I mean TIA http://www.redcrossstore.org/Shopper...8&LocationId=0 Hi, Maybe this has been asked a thounsand times in this forum, but I haven't been here for a while. I would like to know how this is done: You have a button with a thumbnail of a picture that you click and this zoom in in the same page, then you click it back to zoom out. Any help will be appreciated. Thanks HI, I want to design the website throw the html without use the javascript and use the zoom function in my site can i do this function without use the javascript. Either this is possible and you know html code about the zoom function then you reply this problem. Thank you for advance. Hi all ! I have a quick question regarding a scoreboard app I am writing that displays 3 numbers on a large VGA screen. The question deals with best practice to build this page. I am using Visual Studio and but not any specific ASP.NET controls. The display consist of one table with 3 cells. one cell onto, 2 cells below the top one. Since I do not know the exact resolution of the VGA screen where my web page will display I have ventured to play with the zoom. However, using the zoom seems to offset the page downwards, meaning it does not zoom centered (or from the middle if you like). The more zoom I apply from the html the larger the page becomes, but it also moves down on the VGA screen. I am running the page in browser kiosk mode. It also seems to be very tricky to make the page position itself on the very top of the browser window. Using tables a problem, and if so, should I go with CSS ?? Thanks for input and thoughts on this.. Anders So i have implements cloud zoom from professor cloud and it seems to be working half the way. Here is what is supposed to be executing: http://www.professorcloud.com/mainsi...-zoom-test.htm But if you look at mine: http://enveme.com/index.php?/product/graphic-tee-dorm-1 The mouse over is not giving me the magnified view. I have contacted the coder himself but no avail. Can anyone help? well my issue comes when you try to use ctrl-mouswheel to zoom in or out on my page. works fine in ie8 and ff3, but not in chrome and safari. there isnt really a need for this to work, except the fact that no professional website should have such a major error. http:www. fab-tennis .com click the book a lesson tab, its the easiest way to tell since its the longest page i have. sorry for the bright colors. when you zoom in or out, the iframe which is usually fits exactly between my header and footer, shrinks to a small box maybe 500px in height instead of having height:100% of the table cell that it is in. i would reccomend trying the zoom on ff then try it on chrome or safari to see what im talking about. HTML Code: <html> <body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFF00" style="overflow-x: hidden; overflow-y: hidden;"> <link rel="stylesheet" type="text/css" href="css/basic.css" /> <!--[START HEADER]--> <div style="position:absolute; top:0px; left:0px; width:100%;"> <table align="center" class="Header" cellspacing="0" cellpadding="5" style="height:40px"> <tr align="center"> <td width="20%" class="headerLeft" id="1" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> home </td> <td width="20%" id="2" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> book a lesson </td> <td width="20%" id="3" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> biography </td> <td width="20%" id="4" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> qualifications </td> <td width="20%" class="headerRight" id="5" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> photos </td> </tr> </table> </div> <!--[END HEADER]--> <!--[START BODY]--> <table align="center" cellspacing="0" cellpadding="0" class="Body"><tr height="40px"><td></td></tr> <tr><td valign="middle" align="center"> <iframe name="iBody" id="iBody" marginheight="0px" marginwidth="0px" frameborder="0" scrolling="auto" allowtransparency="true" src="home.html" style="width:100%; height:100%; border:0px;"> BODY </iframe> </td></tr> <tr height="40px"><td></td></tr></table> <!--[END BODY]--> <!--[START FOOTER]--> <div style="position:absolute; bottom:0px; left:0px; width:100%"> <table align="center" class="Footer" cellspacing="0" cellpadding="5" style="height:40px"> <tr align="center"> <td width="20%" class="footerLeft" id="6" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> cancel lesson </td> <td width="20%" id="7" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> seven </td> <td width="20%" id="8" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> eight </td> <td width="20%" id="9" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> nine </td> <td width="20%" class="footerRight" id="10" onMouseOver="mouseOver(id)" onMouseOut="mouseOut(id)" onClick="onClick(id)"> ten </td> </tr> </table> </div> <!--[END FOOTER]--> <script type="text/javascript" src="javascript/basic.js"></script> </body> </html> Hi, I'm hoping someone can help me. I bought a website template and I thought I would be able to figure it out. I'm having a lot of difficulty in a lot of areas. But this particular issue is driving me crazy. I only have some basic HTML knowledge. I'm basically trying to make images on my site so when you click on them they enlarge. When you click on them again and they shrink back down. First of all, this is the template I used: http://www.templatemonster.com/flash...tes/24691.html And this is what I'm specifically trying to add to it: http://www.cabel.name/2008/02/fancyzoom-10.html Scroll down and click on the sample images. I followed the simple instructions on that page above but where it says Body ID=, I'm not sure what I'm supposed to put there. Also the image source code in the instructions is different then the code in my .xml file. My code looks like <image imageUrl="_home_images-1.jpg"/> I've literally spent the whole day on this trying to figure it out and searching online. If anyone can show me how this can be done I would REALLY appreciate it. I'm not sure what other info you need, but I could zip up the template and provide it if needed. (its only 5mb) Thanks in advance Sarah Hello, I wrote the following HTML code: HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Admin Page</title> <link rel="stylesheet" type="text/css" href="css/style.css" /> </head> <body> <div id="main"> <h2>Admin Page</h2> <hr width="420" color="black" align="left"> <form method="post" action="$_SERVER[PHP_SELF]" name="form" > <div class="textbox" style="height:35px;"> Username: <input type="text" id="username" name="username" maxlength="30" /> </div> <div class="textbox"> Password: <span style="position: relative; left: 4px;"><input name="password" type="password" id="password" maxlength="30" /></span> </div> <br /> <div class="button"> <input type="submit" value="Sign In" name="submit"> </div> </form> <hr width="420" color="black" align="left" style="position: relative; top: -5px;"> <div id="info"> info here </div> </div> <!-- End main div --> </body> </html> and the following CSS code: HTML Code: body { background-color:gray; font-family:Comic Sans MS; font-size:12pt; color:black; } #info { font-family:sans-serif; font-weight:bold; position:relative; left:0px; width:420px; top:20px; } #main { position:relative; width:500px; left:420px; top:50px; } The problem I have is when you resize the browser nothing resizes. Can someone please help me get this page to resize? Help will be greatly appreciated. Thanks. |