HTML - Random Image Html
Okay...
Here is what I'm trying to do...and not really sure as an HTML novice where to even start. I have something called a 'blogwall' on my site, it's url is he http://www.weusecoupons.com/index.php?pageid=blogroll What I would like to do, is on the main page: www.weusecoupons.com Have a ONE of the 125x125 buttons appear randomly. Is this a simple thing? All images are hosted locally!! Thanks for your help. Similar TutorialsHi there, I have created a site that can be viewed at www.prestigeinteractive.com/legacy2 On this site I have utilized a basic two column design with both a header and a footer. You may need to look at the first page to know what i am talking about. Upon creating the site I wanted to make the athletes on the page extend beyond the borders of the site's wrapper. In order to do that and maintain reasonable filesizes, I opted to splice the images. I used a jpeg for the large part within the wrapper, and used a png in a absolute positioned div for the parts that are to extend beyond the site's wrapper/container (needed a transparent image to display the border and site's background properly). The friend I am making the site for asked if I could set it up so that there can be a number of images that randomly load when a user enters the home page. I am not sure it that is possible using the format I've implemented (2 images properly aligned). Can this be done? I've done it before with single images within a div tag, but not two that need specific coordinates to appear aligned correctly. If "yes this can be done", could someone kindly point me in the right direction to find a tutorial on this. If not, I'd appreciate knowing this as well, as I'll need to come up with an alternative plan. Thank you for your time, G How would i show a random image? When people come onto my site, i want the header to be random out of about, 6 different ones. When you refresh the page, it changes the image. (for more explaingin, ha) How would i go about doing this? Hello, I'm sure the subject about random generators must have been asked a billion times before, but I can't seem to find an answer for my set up. Basically I have a style.css sheet which defines some images like this: #gallery .pic01 { background: url('images/gallery_images/pic_01.jpg') no-repeat; width: 205px Then in my html I have a list of these images like this <div id="gallery"> <ul> <li class="pic01"></li> <li class="pic02"></li> <li class="pic03"></li> </ul> What I'd like to do is have the pictures choosen randomly so that each time the page loads you get a different set of pictures. Is this possible. Please forgive me if this is easy peasy to do - I'm a real html thicky! Hello everyone, I'm new here and currently reaquainted with HTML as I'm trying to help out a friend with his website. I am trying to randomize a background image in a table and I can't seem to get anything to work. I have searched up and down this forum and others, have tried several scripts that seem to work for others, and I'm still at square one. I most recently tried a script I found here on this forum with no success. Here is my code... 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"> <head> ... ... <script type="text/javascript"> <!-- var pic=new Array(); pic[0]="img/home_back1.jpg"; pic[1]="img/home_back2.jpg"; pic[2]="img/home_back3.jpg"; var num=Math.floor(Math.random()*pic.length); window.onload=function() { document.getElementById('wrapper').style.backgroundImage='url('+pic[num]+')'; } //--> </script> </head> <table id="wrapper" width="955" height="600" align="center" border="0" cellpadding="0" cellspacing="0" > ... ... ... </table> </body> </html> If anyone has any insight as to what I may be doing wrong or how I can fix this it would be much appreciated as I'm pulling my hair out trying to get this to work. Thanks! Unclejunebug Hey guys. I need a little help with my HTML image rotator. Everything works fine, except the images don't show up on the right slide. All 4 images show up on the first slide. I can't figure out what's wrong. Any help will be greatly appreciated. Code: <!DOCTYPE html> <html> <head> <title>...</title> <style> #sliderwrap { height: 403px; } #sliderleft { width: 10px; height: 100%; float: left; background: #efefef; border: 1px solid #ccc; } #sliderleft div { height: 100px; border-bottom: 1px solid black; } #slidercontent { position: relative; width: 650px; height: 100%; float: left; border: 1px solid black; overflow: hidden; } #sliderimages { position: absolute; -webkit-transition: all .5s ease-in-out; -moz-transition: all .5s ease-in-out; -ms-transition: all .5s ease-in-out; -o-transition: all .5s ease-in-out; transition: all .5s ease-in-out; } #sliderimages img { display: block; } .s0 #slide0, .s1 #slide1, .s2 #slide2, .s3 #slide3 { background: #ccc; } .s0 #sliderimages {top: 0 } .s1 #sliderimages {top: -500px} .s2 #sliderimages {top: -1000px} .s3 #sliderimages {top: -1500px} </style> <script> var slide = 0; var interval_id = 0; function stop_timer() { clearInterval(interval_id); if (this.getAttribute("data-slide")) { slide = parseInt(this.getAttribute("data-slide")); document.getElementById("sliderwrap").className = "s" + slide; } } function start_timer() { clearInterval(interval_id); interval_id = setInterval( function() { slide = (slide + 1) % 4; document.getElementById("sliderwrap").className = "s" + slide; }, 3000 ); } window.onload = function() { start_timer(); var el = document.getElementById("slidercontent"); var divs = document.getElementById("sliderleft").getElementsByTagName("div"); for (var i = 0; i < divs.length; i++) { divs[i].onmouseover = stop_timer; divs[i].onmouseout = start_timer; } el.onmouseover = stop_timer; el.onmouseout = start_timer; } </script> </head> <body> <div id="sliderwrap" class="s0"> <div id="sliderleft"> <div id="slide0" data-slide="0"></div> <div id="slide1" data-slide="1"></div> <div id="slide2" data-slide="2"></div> <div id="slide3" data-slide="3"></div> </div> <div id="slidercontent"> <div id="sliderimages"> <img src="http://i.imgur.com/8iWz6.jpg"> <img src="http://i.imgur.com/1d2U6.jpg"> <img src="http://i.imgur.com/8iWz6.jpg"> <img src="http://i.imgur.com/1d2U6.jpg"> </div> </div> <div style="clear: both;"></div> </div> </body> </html> Ok so this image works on a table i did, and it covers the whole table nicely, but now i need to know how i can put another image that goes behind everything except the table and the table image and wont overlap everything in the table <TABLE BORDER="0" cellpadding="0" CELLSPACING="0"> <TR> <TD MAX-WIDTH="100%" MAX-HEIGHT="100%" BACKGROUND="grey.jpg" VALIGN="bottom"> </td> </tr> </table> Hi... I need to put an alternate image(not text) like 'Image Not Available', if the image is not able to fetch from the database. Is there any method to do this? Thanks in advance. -Swathi Hi, I have a question regarding the code to use to create a horizontal line of small images across the page , from left to right. I want to use them as a horizontal divider between blog posts on our website. The image is a small flower which we use as a logo on our website. This is the image location - http://www.lannacharm.com/files/1/00...ower_small.gif So far I have ended up with a verticle line of images, which is useless, or a block of images which wraps itself around the image above it. That is another problem I am having, how do I place this new line of images below the existing image, or text ? There must be some code I can place between them to separate them. For some reason the line of images insists on going to the right of the existing image. Hope someone can help me with this one. Thank You, Mickmac Hello everyone! My friends and I are launching a new gaming site. We're using Wordpress to do most of the editing, since none of us are very familiar with web design or coding. I can edit the HTML / CSS of the template we're using; I'm happy with the template overall, but I would like to upload our custom Logo graphic. I've got the graphic saved in the FTP, but when I open up the HTML for the page, I quickly become lost. I'm not sure where I'd put the graphic code or even what the code is. I know this isn't much information, but if anyone could post on here or PM me with what else I should provide to help me do this, I will gladly do so. Again, I'm looking to -Upload a custom header graphic -Figure out the proper code to upload my graphic -figure out where in the HTML to put the code to do so I'll gladly supply any other information necessary to help figure this out. Thanks! Hi there, I am not able to figure out why there are blue lines around my images on this page http://www.surveys.hottestdeals.info. If i want to get rid of them, where should i make the changes in CSS sheets? Thanks for any help. Kris Hi everyone, How would I go about fading one image into another when the page loads? I know it's something to do with onload, however would know a code or anything for it. Basically I want it to be exactly like this page with the pencils... http://www.bh-digital.com/about_us.html Thank you to anyone who helps Regards Ryan I'm editing a map and want to change the size of the box that appears when I mouse over an object. The code for the entire map is <table width="550" border="0" cellspacing="0" cellpadding="0"> <tr> <td><img src="img/map_top.gif" width="464" height="222" usemap="#projects" border="0" name="Image1"> <map name="projects"> <area shape="circle" coords="254,167,16" href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('no_box','','img/hiv_label.gif',1)"> <area shape="circle" coords="158,183,16" href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('no_box','','img/hiv_label.gif',1)"> <area shape="circle" coords="141,151,16" href="#" onMouseOut="" onMouseOver="MM_swapImage('no_box','','img/css_label.gif',1)"> <area shape="circle" coords="81,120,7" href="/science/phs/cprp/projects/whiscc.html" target="/science/phs/cprp/projects/whiscc.html" onMouseOver="MM_swapImage('no_box','','img/whi_label.gif',1)" onMouseOut="MM_swapImgRestore()"> </map> <br> <img src="img/map_bottom_left.gif" width="221" height="38"><img src="img/no_box.gif" width="243" height="38" name="no_box"> <br> </td> </tr> </table> To pick one specific example that I want to edit, I want the circle produced by <area shape="circle" coords="141,151,16" href="#" onMouseOut="" onMouseOver="MM_swapImage('no_box','','img/css_label.gif',1)"> to produce a larger box (the css_label image gets compressed and make the words hard to read.) How do I increase the size of the css_label.gif so it is readable? Thanks, Kevin. im making a navigation image for my forum as an image map, but how do i find out what the co-ordinates are for the links i need? sorry if this doesnt make sence,anything else you need to know please ask Jake Hello we i insert pic only show in fix area but i wanna show it in my my complete page (not backgroud) pic. This is my code <img src="abc.gif" alt="abc" /> <img src="abc.jpg" alt="abc rock" width="304" height="228" /> i wanna show my pic only as header and in whole page you can see this in forum header. and see link for example http://uploadpic.org/v.php?img=JvzHJN0gmm please help me Newbie here. Hello to everyone. I have a huge problem. I am VERY new to HTML and my website was going great until the background image just went away. I have gone through every part of the layout and can not seem to find out why. Please help. I can send the entire HTML( its is not that big) to anyone who is willing to help me. Or, someone can call me or give me their number and I will call them. I need to get this website up tonight so that my business will start tomorrow. Thanks in ADVANCE> Thanks, Matt 479-643-4221 HTML Code: <a href=http://www.ninjahelper.kk5.org onMouseOver= "if (document.images) document.off7.src= 'http://securegames1.weebly.com/uploads/5/5/1/0/5510021/on7.png';" onMouseOut= "if (document.images) document.off7.src= 'http://securegames1.weebly.com/uploads/5/5/1/0/5510021/off7.png';"><img src="http://securegames1.weebly.com/uploads/5/5/1/0/5510021/off7.png" name=off7 border=0></a><..copyright muizyusuff.securegamesstudio.t83.net all rights reserved..!> TRY THIS CODE OUT AND TELL ME WHAT YOU THINK. IT WAS MADE BY ME AND ALSO SITE. DON'T MIND THE LINK. CHANGE IT IF YOU WANT. IT WOULDN'T WORK WITHOUT A LINK. SYYR. NEED HELP WITH THIS, TELL ME. P.S IF YOU DON'T HAVE A HTML EDITOR, YOU CAN USE ONE ONLINE AT http://www.onlinehtmleditor.net/. BYE. _________________________________________________________________ How can I convert the attached image to HTML so the background runs the width of the page? I have an image file I want to put this on my webpage but the image should look like Is this some kind of a border applied to the image? How can I achieve this in HTML? Hi This is what i have: PHP Code: div id="wrapper"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="17%" ><img src="element.png" width="230" height="381" /></td> <td width="29%" align="left">middle</td> <td width="25%" align="left" background="backimg.png"><p>dfg</p></td> <td width="29%"></td> </tr> </table> </div> and this is what i get: Basically i have a table with 3 cells, the left (with the pink effect), the middle, and the right side. What i want is that image effect which is in left side of the page to be always aligned at top. should i create another <div> inside the <td> and put the image in the <div> ? is there a good way to do this ? Thanks |