HTML - Click To Move Image On Page?
I can't figure out how to script an image so that it slides to another area on the page when clicked on. For example, a logo that appears in the center of a blank page (vertical-align: middle), but when clicked slides smoothly to the top (vertical-align: top). Alternatively, it could be that clicking the image changes the vertical-align property of the entire table or cell. Either way, I can't figure out how to do this with a smooth animation.
A fantastic example of this--where I got the idea, in fact--is the front page of tumblr.com, where clicking "Log in" smoothly slides the tumblr logo from the top of the page to the center. How is this done? I'm sorry if the solution is mind-bogglingly simple, I'm kind of a noob. But I've racked the web and I can't seem to find a script that does this. Can somebody please help? Thanks so much. Similar TutorialsI have the following Web Page: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="en-gb" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> </head> <body > <div style="margin:auto;text-align:center"> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> </div></body> </html> If I add another DIV with an image inside it, the images all move to the left by 8 to 10 pixels. This is the second version of the page: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="en-gb" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> </head> <body > <div style="margin:auto;text-align:center"> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> <div><img height="227" src="Images/2010BikeRide_BestTeamRU_360x227.jpg" width="360" /></div> </div></body> </html> I have no idea why the page center moves to the left, but it means that I can't get my page banner to appear the same on every page. (I've stripped out all the extra content and codes to just leave the offending images.) I primarily use Firefox, but the same is happening in IE and Opera. Can anybody tell me what's happening? (I apologise if this is a well known, frequently asked question, but I couldn't find an answer and this is driving me up the wall, so any help is appreciated.) Hi all New to this forum and pretty basic in html But how to i create links at the top of the page to move down the page to certain sections. Regards, Alan Able to handle html sample code How can I place the php form into the html page? Please see the attachment describe what I asking for. thank you. Hi. For some strange reason, in my <div class="footer"> and <div class="content"> When I add: HTML SHEET .footer { padding: 10px; background-image: url(images/images1.png); background-repeat: repeat-x; background-position: top; } CSS SHEET .content { padding: 10px; background-image: url(images/images1.png); background-repeat: repeat-x; background-position: bottom; } The padding moves the background images 10px, up or down! Appreciate any help. God bless. In Christ Jesus, Karl. Can someone please help me? How do I move the entire image up on following index page: www.AndyG.com Note that there is a one inch gap between top of computer screen and top of image...I just want to move image way up to top... Thanks a lot! Andy Why is my home page crashed every time i click the next page button at the very bottom if you look at the (FEATURED and NEWS categories) it will changes after you clicked the next page bottom Also when i click the next page bottom its not showing the right articles/posts according to the date wrote. any help of how i can fix this problem step by step will be much appreciated. Hello guys. I really need your help. I whant to put a clickable image i my wordpress blog and have a click counter under it. I also want that the images only is clickable x amount of times ex. 2000 times and after that a new image will take it place saying, Thank you we have reached the total limit bla bla, this image should not be clickable anymore. the same ip only once. How can i do this thank you Hi... I got a question tht puzzeled me whole day and i dont know how to solve,Can you please help me? My main page is at /usr/local/share/HT/html/server/index.html. Now that inside my main page i want to do a link by a button click to the another page, say page 8. page 8 is at /data/website. But whenever i tyr to click on tht button, it says "PAge not found" Followimng is my coding <br><input type="submit" value=" Viewing " onClick="location.href='/data/websites/page8.html'"; onMouseOver="info('Viewing'); return true" onMouseOut="info(' '); return true" ></br> Can anyone guides me step-bystep, please :-) What ActiveX element is on this webpage? Everytime I load it in Internet Explorer a pop up comes up saying "click here to run an ActiveX on this web page"... Any ideas? http://www.curiousclothing.com/test/ Hey all, i'm new to the forum so let me know if i've posted in the wrong place! I'm looking for a script to listen out for clicks on the page, even if the page contains an iframe. So no matter where the user clicks on the page (even if its a link within an iframe) I can direct them to a specific page. If its easier to make it specific to iframes only, that would also do. I hope i've been clear enough! - TM Hey guys, I want to click a button that is behind an image (set in absolute position). The button that I am trying to click is within an iframe so I cant use any sort of javascript to click it. The click must be real and not faken. Iframe containing button ----> Image over it Is there anyway I can setup the image so I would be able to click thru it (add transparency setting or something like that)? The image must remain visible but I want to be able to click the button that is under it. The goal is to make the visitor click the image but it would actually click the button in the iframe behind it. Thanks alot guys, Hi! I've been working on a little website, but i want visitors to hear a welcome sound when they click on the website's logo. How can i do this with html? javascript? I came to this forums because i've seen very clever people here. Thanks for your replies! Sorry, my title is unclear see if I can explain it better he ok when I click from any of the other pages to the menu page, the name and address (which is on every page in the same place) moves to the left slightly. the name and address stay in the same place when clicking to and from any of the other pages, its just the menu page with this hiccup. This happens both in IE and Firefox. Any ideas on how to correct this?? HTML of home page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <meta name="author" content="xxxxxxx"> <meta name="description" content="Kabasa Guest House and Restaurant - Online"> <meta name="copyright" content="2011"> <meta name="keywords" content="Kabasa Guest House and Restaurant, Places to stay in Kenya, Accomdation in Kenya"> <title>Kabasa Guest House and Restaurant</title> <link rel="stylesheet" type="text/css" href="styles6.css"> </head> <body> <ul id="navbar"> <li><a href="home.html">HOME</a></li> <li><a href="menu.html">MENU</a></li> <li><a href="room.html">ROOMS</a></li> <li><a href="rates.html">RATES</a></li> <li><a href="book.html">BOOK</a></li> </ul> <div id="header"> <h1>Kabasa Guest House and Restaurant</h1> <div id="address"> <pre> xxxxxxxx xxxxxxx xxxxxxxxx Tel: +00000000000 </pre> </div> </div> <br> <p class="center"> The Kabasa guest house and restaurant is situated just a<br> few metres from the worlds second largest fresh water<br> Lake Victoria. We welcome you to come and experience our<br> accommodation with excellent service at affordable rates.<br> </p> <br> <img src="Images/d4.jpg" class="center"/> <br> <div id="footer"> <p>Copyright 2011 © Kabasa Guest House and Restaurant. All rights reserved</p> </div> </body> </html> HTNL of the menu page: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="EN-GB"> <meta name="author" content="xxxxxx"> <meta name="description" content="Kabasa Guest House and Restaurant - Online"> <meta name="copyright" content="2011"> <meta name="keywords" content="Kabasa Guest House and Restaurant, Places to stay in Kenya, Accomdation in Kenya"> <title>Kabasa Guest House and Restaurant</title> <link rel="stylesheet" type="text/css" href="styles6.css"> </head> <body> <ul id="navbar"> <li><a href="home.html">HOME</a></li> <li><a href="menu.html">MENU</a></li> <li><a href="room.html">ROOMS</a></li> <li><a href="rates.html">RATES</a></li> <li><a href="book.html">BOOK</a></li> </ul> <div id="header"> <h1>Kabasa Guest House and Restaurant</h1> <div id="address"> <pre> xxxxxxxxxx xxxxxxxx xxxxxxxxx Tel: +0000000000 </pre> </div> </div> <h2>Menu</h2> <div id="menucenter"><b>We offer a full continental buffet breakfast table service by order.</b> <b>We also offer room service.</b></div> <div id="menu"> <pre> <u>Full Breakfast</u> Our full breakfast gives you a choice of the following: Fruits : Pineapple, Watermelon, Sweet Banana, Pawpaw, Oranges Fresh Juice : Passion, Mango, ****tail Cereal : Weetabix or Corn flakes served with cold or warm milk Toast, sausages, eggs and bacon <u>Beverages</u> Drinking chocolate, Tea, Nescafe, Milo <u>Snacks</u> Sandwiches (by order), chips, sausages, beef rolls, samosas (chicken, beef and vegetables), meat pie, cakes. <u>Main meals/courses</u> Chicken Curry, Chicken Masala, chicken stew, butter chicken, boiled chicken, chicken biriani, chicken wet fry. All served with Rice, ugali, chapatti, pasta, spaghetti and vegetables with garnishing Beef Stroganoff, beef stew, beef curry, fried beef, boiled beef, beef masala Whole (stewed or fried) tilapia, Fish fillet in coconut source, Fresh (stewed Tilapia), Whole (masala) Tilapia All Served with rice, ugali, chapatti and vegetable garnishing <u>Soups</u> Vegetable cream, Tomato cream, French onion soup, Served with Crotons. Traditional Kenyan Vegetables served with Ugali, Rice, Mash Potatoe, Boiled Potatoes, Baked Potatoes and fried vegetable rice <u>Salads</u> Kachumbari, we also have a number of assorted fruits and vegetable salads. <u>Burgers</u> Cheese beef burgers, Egg beef burgers, Beef burgers <u>Choma Zone</u> T-bone steak (400gms), pork chops, barbeque chicken, prime fillet steak <u>Beers</u> Tusker, White Cap (Tusker Malt), Guinness, Smirnoff ice (black and red) <u>Juices</u> Soda, Alvaro, Novida, Mineral water, Passion, Avocado </pre> </div> <div id="footer"> <p>Copyright 2011 © Kabasa Guest House and Restaurant. All rights reserved</p> </div> </body> </html> CSS: Code: body { margin:2% 4%; font-family:'lucida grande',tahoma,helvetica,sans-serif; font-size:11pt; color:#006; background:#ffc; } #navbar { float:left; width:12%; margin:0; padding:0; font-size:20px; list-style-type:none; } #navbar li { margin-bottom:2px; } #navbar a { display:block; padding-left:8px; background-color:#cff; } #navbar a:hover { color:#000; background-color:#fff; } #header { margin-left:%; } h1 { text-align:center; margin-right: 10%; } #address { width:182px; padding:0 4px; margin: auto; font-family:arial,sans-serif; font-size:10pt; font-weight: bold; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } h2 { clear:both; margin-top:3%; margin-left:%; text-align:center; } h3 { clear:both; margin-top:3%; margin-left:%; text-align:center; } h6 { margin: auto; left:0; right:0; width: 655px; font-weight: bold; font-size: 10pt; font-family: arial, sans-serif; } #rates { padding:8px; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } #rates span { text-decoration:underline; font-weight:bolder; } #menu { margin: auto; left:0; right:0; width: 675px; background-color:#fff; filter:alpha(opacity=75); opacity: 0.75; } #menucenter { text-align: center; } p.center { text-align: center; } img.center { margin-left: auto; margin-right: auto; display: block; } #footer { clear: both; width: 100%; font-family: Arial Unicode MS; font-size: 8pt; text-align: center; } Many thanks Jackie In a webpage, I have a link to a photo: <a target="_blank" href="myURL"> where myURL just points to a jpg image. When the jpg is presented, I'd like right clicks to be disabled. Is there a way to do this? I don't want right clicks disabled on the main page, just the target jpg. Thanks in advance for any help. Hi there, you might remember me from this thread. (which was resolved by Mandarin, thanks you!) Now Im back with another, kind of the same thing: "Click -> Locate page -> & then slide down?" Allow me to explain: So ive got this header.php right. And the header file is included at every page. All the links in the header.. link to 1 file. (diensten.php) BUT, each link links to different areas within that file... So what I would like to achieve is that when a link in the header is clicked, it slides down to the correct page-area. Porblem is.... after clicked, is doesnt even go the right page. I think the smooth slider jquery-plugin is interfering someway. I already laid down the groundwork inside the header. Please have a look here. Would my wish be possible? Or should I just lay it to rest? Thanks. I'm really stuck on this one. So, I'm on a page, let's call it index1 and I need to open index2 with index3 displayed in a frame on index2 (All from just clicking one link). The problem is on index1 there are many links that will all take us to index2, but with different pages (index4, index5 etc.) needing to be displayed in the frame on index2. How can I achieve this? Hi all i need some help. I have created a simple gallery with a large image and smaller images to the left of it, when the small images are clicked they change to the large image, see an example here http://vfashion.co.uk/help/example.html but i want to be able to add a link below the main image so when its clicked the current image that is displaying large will open up in a new window. how would i do this??? the code for the page is below please can someone help me Code: <head> <meta content="en-gb" http-equiv="Content-Language"> <style type="text/css"> .auto-style1 { margin-bottom: 0px; } </style> </head> <TABLE id=table1 height=164 cellSpacing=0 cellPadding=0 width=605 border=0 class="auto-style1"> <TR> <TD vAlign=top width=603 colSpan=2 height=20><B><FONT face=Arial color=#333333></FONT></B></TD></TR> <TR> <TD vAlign=top height=106 style="width: 200px"> <DIV align=center> <TABLE id=table2 cellSpacing=0 cellPadding=0 width=147 border=0> <TBODY> <TR> <TD height=10></TD></TR> <TR> </TR> <TR> <TD height=5><div align="center"> <table border="0" width="147" cellspacing="0" cellpadding="0" id="table23"> <tr> <td align="center" colspan="2" height="10"></td> </tr> <tr> <td align="center"> <img style="border-color: cccccc" alt="" src="1.jpg" width=70 border=1 onclick=document.url.src="1.jpg" onmouseover=this.style.cursor=hand onmouseout=this.style.cursor=pointer /></td> <td align="center"> <img style="border-color: cccccc" alt="" src="2.jpg" width=70 border=1 onclick=document.url.src="2.jpg" onmouseover=this.style.cursor=hand onmouseout=this.style.cursor=pointer /></td> </tr> <tr> <td align="center"></td> <td align="center"></td> </tr> <tr> <td align="center"> <img style="border-color: cccccc" alt="" src="3.jpg" width=70 border=1 onclick=document.url.src="3.jpg" onmouseover=this.style.cursor=hand onmouseout=this.style.cursor=pointer /></td> <td align="center"> <img style="border-color: cccccc" alt="" src="4.jpg" width=70 border=1 onclick=document.url.src="4.jpg" onmouseover=this.style.cursor=hand onmouseout=this.style.cursor=pointer /></td> </tr> <tr> <td align="center"></td> <td align="center"></td> </tr> <tr> <td align="center"> <img style="border-color: cccccc" alt="" src="5.jpg" width=70 border=1 onclick=document.url.src="5.jpg" onmouseover=this.style.cursor=hand onmouseout=this.style.cursor=pointer /></td> <td align="center"> <img style="border-color: cccccc" alt="" src="6.jpg" width=70 border=1 onclick=document.url.src="6.jpg" onmouseover=this.style.cursor=hand onmouseout=this.style.cursor=pointer /></td> </tr> </table></TD></TR></TBODY></TABLE></DIV></TD> <TD vAlign=top width=405 height=40 rowSpan=3> <P align=center> <img src="1.jpg" alt="" name="url" width="380" border="0" id="url"></P> <P align=center> Click to enlarge</P></TD></TR> <TR> <TD vAlign=top height=106 style="width: 200px"> </TD> </TR> Hello guys, I was wondering if anyone is aware of a script that does this: You have an image on your website. When you click on the image a box should appear where you can insert your email and send the photo to your email. Anyone aware of something like that? Thanks a lot! I want to use HTML to make the following task... I little link, when someone clicks on it, it displays an image at the top of it (Not load a whole new page with an image) Example Say you have this link linky I want when people click on it, it displays an image above it Can this be done using HTML? Thanks i'm using 6 iframes in a page my page has scrolling whlie i click a link on top most iframe the page has been slide down the scroll bar comes to middle plz help me |