HTML - Buttons/image Links
Sorry may sound like a noobish question but this is the first time I have made a site,
but i have added images to my site as links but they move when the browser window is adjusted, so just wanted to know how to keep them fixed in one position. this is my site: www.d1ndesigns.com thanks Similar TutorialsI am very very new to all things related to programming/coding, etc. I am working on a project, and cannot get my buttons to link to additional pages on a website. I wanted the buttons to not be so standard looking, and am using css styles for them. Here is my code and also the css code for the buttons. Am I needing JavaScript to get this to work? If so, what do I need? Thank you so much. HTML code: <?php echo '<xml version = "1.0" encoding = "IUTF-8"?>';?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtmlll/DTD/xhtmll-strict.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml"> <head> <title> 5 STAR MMA: For the Pursuit of Excellence </title> <link rel = "stylesheet" type = "text/css" href = "5star.css" /> </head> <center> <body background = "bluesmoke.jpg" > <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <center> <form method = "post" form action = "http://localhost/5star/5starnew.php"/> <input class = "button" input type = "submit" value = "Home"/> <form method = "post" form action = "http://localhost/5star/newgym.php"/> <input class = "button" input type = "submit" value = "New Gym"/> <form method = "post" form action = "http://localhost/5star/classes.php"/> <input class = "button" input type = "submit" value = "Classes"/> <form method = "post" form action = "http://localhost/5star/fighters.php"/> <input class = "button" input type = "submit" value = "Fighters"/> <form method = "post" form action = "http://localhost/5star/coachhill.php"/> <input class = "button" input type = "submit" value = "Coach Hill"/> </form> </br> </body> </center> </html> CSS: input{color:#A9A9A9;font-family: Arial, sans-serif;font-size:21px;padding:10px 30px;border:0px black none;cursor:pointer;font-weight:bold;-moz-border-radius: 5px; -webkit-border-radius: 5px;} .button{ background-image:-webkit-gradient(linear,left bottom,left top,color-stop(0, rgb(0,0,0)),color-stop(1, rgb(66,125,150))); background-image:-moz-linear-gradient(center bottom,rgb(0,0,0) 0%,rgb(66,128,150) 100%); background-color:#000; } input:hover{color:#FF0000;} I have a JSP with HTML and Javascript in it. There're 2 image buttons and 1 Submit button, for some reason ALL buttons submit (when I click any of the image buttons, it works fine but submits too). I'm kinda new to HTML and JS so i need to know where did I go wrong Code: <form action="Req_Result" method="post" name="entry" onSubmit="return validate(this)"> <table border="0" cellpadding="10" cellspacing="10"> <tr> <td> <table> <tr> <td><INPUT TYPE="RADIO" NAME="searchBy" checked="checked" value="byname" onclick="sortby()"> By Name</td> </tr> <tr> <td><INPUT TYPE="RADIO" NAME="searchBy" value="byDate" onclick="sortby()"> By Date</td> </tr> <tr> <td><INPUT TYPE="RADIO" NAME="searchType" checked="checked" value="whole" onClick="chMd()"> By Department</td> </tr> <tr> <td><INPUT TYPE="RADIO" NAME="searchType" value="byid" onClick="chMd()"> By ID</td> <td><input name="ps" type="text" size="18" disabled="disabled"></td> </tr> <tr> <td>Start Date:</td> <td><input name="startdate" id="startdate" type="text" size="18" readonly> <input type="image" src="theme/panelCalendarIcon.gif" value="date1" onClick="SelectDate()" ></td> </tr> <tr> <td>End Date:</td> <td><input name="enddate" id="enddate" type="text" size="18" readonly> <input type="image" src="theme/panelCalendarIcon.gif" value="date2" onClick="SelectDate()" ></td> </tr> <tr> <td colspan="2" align="center"><input type="submit" value="Submit"></td> </tr> </table> </td> </tr> </table> </form> Hjallo wizkids I need some help on a forum I'm currently building a test of a new forum. I'm trying to get some paypal buttons onto the forum portal as seen on www.nicoan.dk I want to get rid of the grey background, the images are .png! So I think it might be the <form> tag that creates the background This is one of the images Also I want to them to be horizontal and not vertical This is the unprotected code for one of the buttons Code: <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_donations"> <input type="hidden" name="business" value="Q8A9Q349JJUKE"> <input type="hidden" name="lc" value="DK"> <input type="hidden" name="item_name" value="Helix"> <input type="hidden" name="amount" value="5.00"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="currency_code" value="GBP"> <input type="hidden" name="bn" value="PP-DonationsBF:5gbp.png:NonHosted"> <input type="image" src="http://www.nicoan.dk/images/icons/5gbp.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/da_DK/i/scr/pixel.gif" width="1" height="1"> </form> This is the protected code Code: <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHPwYJKoZIhvcNAQcEoIIHMDCCBywCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYCMGxa1W0Rko5YzjacKS/RzNpoJpOAmoMWb7D9LvIxaDxi3ZIS3BZUo0RHziAmLOVTXITA/FB3NVp8g2ZUGWUqaweQohjGrk06s2GCWUOTuHRCjVineBYG7tTvkYzebW6T2rMjzRHG951FAtMrK4Hj5d+lb35wZ+xCPjtSLPNes4zELMAkGBSsOAwIaBQAwgbwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIykLo0x3jOl6AgZhtlVnRe1Mk5IlcjWtBCREM9x/CNgqdBq2AI733TNy9qq++lRQ+H7cuVSvUNBAMu0bvRG6GpOyZOmNhIam4QJnRZwt7hWzhuv0DeGn4KrwfppxKLbAU9bG3Fo/ZfRO3+ADfl9q/ORTfkgU7Ggzdfh91gl7vwDEDtt+apVYCckKzi/XMnR41ewhw22+v3kpbc81DoQJ39e5D4qCCA4cwggODMIIC7KADAgECAgEAMA0GCSqGSIb3DQEBBQUAMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQ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lDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwCQYFKw4DAhoFAKBdMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTEwMDkwNzE0MzA1OVowIwYJKoZIhvcNAQkEMRYEFNYXRZM0DIdxxYoZlZy/WgBCFwEiMA0GCSqGSIb3DQEBAQUABIGAPAffm8vYDhAvJj3gwATbC9SiwzEMR2rB+GMxQI11FKgmwTyretI9yThZXQqLqnWEKwneWwPEQ3z9zhIXhABjtdrWus8dYaapRF+tzmOmfOuEmBuzIATi5g1ptGzTyNadE1tbFXK3kMY9TOZYb/XyMBNGqpm4V3491gkVUxtYyOo=-----END PKCS7----- "> <input type="image" src="http://www.nicoan.dk/images/icons/5gbp.png" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/da_DK/i/scr/pixel.gif" width="1" height="1"> </form> Any help will be much appreciated! ~ Aki Here's a link to the page I'm currently working on. http://www.vancouver4condos.com/test/ The big map picture is set up as an image map, with all the areas already specified. Each area gets highlighted when viewer hovers the cursor over it. Also, right above the map is a navigation menu, with all the buttons corresponding to each of the areas on the image map below. I was wondering if there is a way to connect each of the navigation buttons with their corresponding map image areas in such a way that when the user hovers the cursor over a button, its map area will automatically get highlighted. Ideally, the opposite would also be true - when hovering the cursor over one of the map areas, its corresponding navigation button would also highlight. Hello, I have an image which has a white area somewhere on the right side, but not exactly on right. I want to put addthis.com share buttons on this white area (please see attachment to see the image I'm talking about). When I use div align="right" I get them to be on far right which is not what I want. How can I achieve this using HTML? If not addthis.com code, is there any way of putting simple text or links on this white portion? I donot want to use css to do this as I'm on joomla and using css for this little work conflicts with the main css of the joomla template. Please help me. This thing has been driving me crazy for days!!! Thanks, Hello, I have a graphic background with image buttons ("img" inside an "a href" link). By default, when you right click a button (or left click and move pointer out), the browser paints a selection rectangle, painted with dotted lines, that remains there. The same selection is visible when you click the image button, until the new page loads. You can see it even on the top round buttons of this forum. It looks really bad on my page because the image buttons are ment to be part of the background, and such a selection is out of style. Is there a way I can instruct the browser not to paint this selection? Some CSS style or some other property? Thanks! Alex Hello, im new to html. I am making a basic website and have used some images to link to my other pages. However the links do work but everytime i use them the new page opens in a new window. I have clicked the normal non-image links and they open in the same window. I would link the image links to open in the same window but i am unsure how i would do this. The code which i have used for my images is the following: <a href="http://E:\Website\ContactUs.html" target="_blank"> <img src="E:\Website\Contactusbutton.PNG"height="66" border="2"/></a> Hope someone can help, Thanks. So I made an images and I want to be able to link the image to a target Is there a way we can link the images to different targets without cutting the picture u? heres an example I have an large image with 10 different girls.. Is it possible to click each individual with a different target? Matt Hello, I'm just starting out with html and I am taking a course. I got this assignement to create a website that will include 9 questions, for each right answer one part of a picture(that I have sliced into 9 parts already)will appear. I was thinking something like this, it's a bit rough but you get the idea: If you get the first answer right, the first part of the 9 parts should appear, if wrong nothing would happen. The true or false text should be some kind of hyperlink. I'm really clueless of how to solve this task and I would appreciate some help, I am working in Dreamweaver CS5 for the record. Thanks. I have this image of 5 boxes that all should lead to a differnt link. How to I put in five different links in the specific spots? http://www.grannysoycandles.com The menu links on the left side are working in IE but not in FF. Its only when they are in the "buttons" div. I put one in the "body" div and it worked fine. Any ideas why? Internet Explorer works fine Firefox does not weird...usually its the other way around... Quote: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Granny Soy Candles</title> <link rel="stylesheet" href="style.css" type="text/css" charset="utf-8" /> <style type="text/css"> :active, :focus{ outline:none; } </style> </head> <body bgcolor=#E0E0E0> <div id="div1"> <div id="banner"> <img src="http://www.grannysoycandles.com/images/banner.jpg"> </div> </div> <div id="div2"> <div id="body"> <center><b><h3>Welcome To Granny Soy Candles</h3></b></center> Welcome to the new home of Granny Soy Candles. Please be patient while the site is updated and created. We will be up and running within the next few weeks. Very soon we will be providing you with quality soy candles that are better for your home and your family. Please come back and visit us soon! <br> </div> <div id="buttons"> <a href="http://www.grannysoycandles.com/"><img src="http://www.grannysoycandles.com/images/home1.jpg" border="0"></a> <br> <a href="http://www.grannysoycandles.com/candles.html"><img src="http://www.grannysoycandles.com/images/candles0.jpg" border="0"></a> <br> <img src="http://www.grannysoycandles.com/images/button0.jpg" border="0"> <br> <img src="http://www.grannysoycandles.com/images/button0.jpg" border="0"> <br> <img src="http://www.grannysoycandles.com/images/button0.jpg" border="0"> <br> </div> <div id="div3"> </div> </body> </html> Quote: #div1 { background: url(images/bgheader.jpg) repeat-x; float: left; width: 915px; height: 165px; } #div2 { background: url(images/bgmiddle.jpg); background-repeat: repeat; float: left; width: 915px; } #div3 { background: url(images/bgfooter.jpg) repeat-x; float: left; width: 915px; height: 51px; } #banner { padding-top: 30px; padding-left: 1px; } #buttons { padding-top: 30px; } #body { position: absolute; width: 675px; padding-left: 220px; padding-top: 15px; } Hi, I have very little coding experience, but am trying to set up a page for a friend. I'm having a bit of trouble with some of my text (some links in particular) hiding behind an image. It displays perfectly in Firefox, but is messed up in IE7. Was wondering if someone could take a look at my code and see if they can see what the problem is? http://vitalia.100webspace.net/ The only coding I've ever done was html don't know any css haven't ever used ftp or anything like that. I've just learned a bit here and there on the net while building a couple of personal pages. I tried putting in some td and tr tags but that makes my entire table disappear. *sigh* 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 Ok, I have made a main page which is basically an image rollover. The rollover reveals text which is just part of the image. I want to make this text into links. I can't seem to be able to edit the rollover image in Dreamweaver. I tried placing an area map on the original image but that doesn't work. Any suggestions? Thanks muchly! Hi, I'm hoping you guys can help me. I'm very new to all this so i apologize if my questions seem dumb. I'm starting a new business and selling on Ebay. Instead of doing all my listing in HTML code I'm doing it on Photoshop, then hosting it on Photobucket and then putting the HTML code for it in the Ebay HTML code box etc. This is all fine and works. I'm doing it this way as I know what I'm doing with Photoshop but don't have a clue with HTML tbh. I also need to get it all up and running asap. The problem is I want live links on my listing so that when the text is clicked on, it will take customers to my website, other products etc. Obviously i cant embed the HTML code for the links as its just a jpeg hosted image. Does anyone know a way I can somehow overlay the links over the image using HTML in the Ebay HTML code box? Is there some kind of code to overlay the text over the image, position it accurately and as a live link? Any help or guidance would be really appreciated. Thanks, Chris. I want to embed a social media block on my page that has all the little buttons and all the little links happy together. I almost had it too using this: <p> <a href="http://www.sample site.com" target="_blank"> <img src="http://my image" width="32" height="32" alt="RSS" title="RSS Coming Soon"> </a> This repeated so I had 6 little images for social media connections. In Internet Explorer all links worked, but there was a little line sticking out the right side of each image. In Safari only my last three image links worked but they have no annoying little line. Why? Anyone? Anyone? This is so frustrating! I have a set of image links on the home page of my website, just like this: <a href="t-store.aspx"><img border="0" alt="Online Store" src="site/include/cssstore.gif"></a> For some reason, they don't work at all on Safari (on a Mac, no idea about Windows Safari). I don't really see what could possibly be causing that. There doesn't seem to be anything in the CSS that could cause this either, the div is just: text-align: center; float: right; width:200px; Worst comes to worst, I could make them into text (which might have been the right thing to do from the beginning), but now I just want to figure this out! Any ideas? EDIT: Text links didn't work either, but other links on the page do. Is there something that would make links not work in one div on a page? Hello, I have an image that I want to cut into about 10 separate links. Is this hard? How do I do this? Thanks, Well title says it all, when I try to do an image and have it linked some where a blue box will appear around it only on firefox and IE, not on Opera. How do I get rid of it??? I am using Dreamweaver Help PLEASE! Hi there, I have a problem with two pages on my website; the right-nav images are not working (in IE7). I have checked the links in the code and they are set up correctly, however the links seem inactive once tested. They do work fine in Firefox. The links are nested in a table, that is inside another (main) table, and they are not set as background images for the cell. Please see http://www.centralbancmtg.com/test/contact.html to see what I am talking about. The links that do not work are the "Mortgage Brokers - Click Here", "Today's HOT Programs" and "Employee Login" located on the right column. The follwoing link has the same problem: "Todays' HOT Programs" (first 2/3rds of the image are not "clickable") on: http://www.centralbancmtg.com/test/brokers.html I am not an expert and need help immediately. I'm sure it's an easy fix but if you have a solution please let me know ASAP! Thank you! |