rodinman Posted April 5, 2010 Share Posted April 5, 2010 I am trying to edit my header and make the images links. Any help? <td colspan=\"2\" valign=\"top\"><IMG height=31 alt=\"\" src=\"images/m0.jpg\" width=284 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"index.html\" src=\"images/home-button.jpg</a>\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/info_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/clients_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/rates_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m4.jpg\" width=64 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/contact-us_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/locations_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/links_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/members_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0></td> </tr> Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/ Share on other sites More sharing options...
mikesta707 Posted April 5, 2010 Share Posted April 5, 2010 that is the worst formatted code i've ever seen. but if you want to make an image a link you put <a> tags around it. for exmple <a href="mylink.php"><img src="myimg.jpg" /></a> this is an HTML problem by the way, not a PHP problem Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037363 Share on other sites More sharing options...
rodinman Posted April 5, 2010 Author Share Posted April 5, 2010 Thank you. It was given to me to use. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037365 Share on other sites More sharing options...
haku Posted April 6, 2010 Share Posted April 6, 2010 Put it in code tags (not quote tags), format it like proper code, and explain your problem a little better, and someone may give you a hand. That really is some horrible code though. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037529 Share on other sites More sharing options...
rodinman Posted April 6, 2010 Author Share Posted April 6, 2010 <td colspan=\"2\" valign=\"top\"><IMG height=31 alt=\"\" src=\"images/m0.jpg\" width=284 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"index.html\" src=\"images/home-button.jpg</a>\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/info_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/clients_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/rates_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m4.jpg\" width=64 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/contact-us_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/locations_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/links_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0><IMG style=\"Z-INDEX: 100; POSITION: absolute\" height=31 alt=\"\" src=\"images/members_button.jpg\" width=62 border=0><IMG height=31 alt=\"\" src=\"images/m1.jpg\" width=62 border=0></td> </tr> Ok. I was given this header for my site and it has images that are supposed to be links. The images are not links. When i try to do basic html linking I get DB errors. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037626 Share on other sites More sharing options...
rodinman Posted April 6, 2010 Author Share Posted April 6, 2010 Here is the original php file. Any help would be greatly appeciated. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037641 Share on other sites More sharing options...
TheCloak Posted April 6, 2010 Share Posted April 6, 2010 try this input type="image" src="imageurl" alt="" id="dl" onclick="onclickevent"/> Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037669 Share on other sites More sharing options...
rodinman Posted April 6, 2010 Author Share Posted April 6, 2010 I can't get that to work either. suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037840 Share on other sites More sharing options...
rodinman Posted April 6, 2010 Author Share Posted April 6, 2010 The main issue is i do not where to put the code to make the actual images buttons link. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037850 Share on other sites More sharing options...
rodinman Posted April 6, 2010 Author Share Posted April 6, 2010 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037908 Share on other sites More sharing options...
ChaosKnight Posted April 6, 2010 Share Posted April 6, 2010 I have never seen such UgLy code in my entire life... Try to clean it up a bit then the answer will seem simple... But I don't know if it's only my eyes that make an illusion or something, I'd like someone to please confirm. In that file you gave, I see something like this <img<a>Text</a>> in some cases... It has to be <a><img /></a>, the image has to replace the text that would normally be inside the anchor. Also, try to make the tags lower case, and some of the image tags end with a open tag... I hope this helps Oh, and before I forget, please remember to only use images if it is really necessary, a lot of images can really slow pages down Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1037929 Share on other sites More sharing options...
rodinman Posted April 7, 2010 Author Share Posted April 7, 2010 Thank you. The images are part of the navigation. The code came from a rent-a-coder guy.. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038177 Share on other sites More sharing options...
haku Posted April 7, 2010 Share Posted April 7, 2010 You get what you pay for. I'm guessing he was really cheap. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038178 Share on other sites More sharing options...
rodinman Posted April 7, 2010 Author Share Posted April 7, 2010 Dirt cheap.. If someone could show me an example of what it should look like i would be greatful. Using the home button as an example.. Please..lol Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038179 Share on other sites More sharing options...
rodinman Posted April 7, 2010 Author Share Posted April 7, 2010 http://www.sfwinestorage.com/login.php That is the site. The nav buttons is what I am trying to get to match the rest of the site. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038194 Share on other sites More sharing options...
roy0810 Posted April 7, 2010 Share Posted April 7, 2010 If I understand it right: The buttons are images (jpeg or png) If thats the case... put it like this: <a href="location of your/home.php"><img src="location of your/buttonimage.jpeg" alt="homebutton" /></a> If you gor this right.. your next question will be: How do I get rid of the blue box aroubd the button? answer: 1. insert the following in your .css : img { border: none; } OR: 2. insert the following in your img tag: border="0" Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038336 Share on other sites More sharing options...
rodinman Posted April 7, 2010 Author Share Posted April 7, 2010 Thank you. I will try that and see if I can get it to work.. Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038463 Share on other sites More sharing options...
rodinman Posted April 7, 2010 Author Share Posted April 7, 2010 Ok. that did not work. I still get error on line 27. I think my question is, given the code I posted what part of that code needs changed to make the buttons that are contained inthe code function as links? Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038465 Share on other sites More sharing options...
rodinman Posted April 8, 2010 Author Share Posted April 8, 2010 ^^^ Quote Link to comment https://forums.phpfreaks.com/topic/197667-make-the-images-links/#findComment-1038832 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.