Jump to content

Recommended Posts

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>

Link to comment
https://forums.phpfreaks.com/topic/197667-make-the-images-links/
Share on other sites

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

<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. 

 

 

 

 

 

 

 

 

 

 

 

 

 

:wtf: 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

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"

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.