Jump to content

How to propertinally reduce percent of image displayed on IMG SRC


jwhite68

Recommended Posts

I have the following code:

 

  echo '<A HREF="'.$domain.'register.php" ><IMG SRC="image/promo.gif" style="width:50%; height:50%;" border="1" ALT="Click here to register"></A>';

 

I was expecting it to reduce the image promo.gif proportionately by 50%. Instead it appears as a single horizontal strip.  Can anyone tell me where I am going wrong?

Link to comment
Share on other sites

try

 

<input name="register" type="image" src="image/promo.gif" alt="Click here to register" title="Register" width="50%" height="50%" border="0" onClick="this.form.action='$domain.'register.php';"/>

 

NOT TESTED

 

but should work

Link to comment
Share on other sites

I have it set to this in my code:

 

   <input name="register" type="image" src="elements/promo.gif" alt="Click here to register and upload properties for FREE!" title="Register" width="50%" height="50%" border="1" onClick="this.form.action='$domain.'register.php';"/>

 

But it doesnt display the image or alt text etc at all now. I have tried to play with it to get it to work, but must be missing something.

Link to comment
Share on other sites

have you placed the whole thing inside

 

<form method="post" enctype="multipart/form-data">
<input name="register" type="image" src="elements/promo.gif" alt="Click here to register and upload properties for FREE!" title="Register" width="50%" height="50%" border="1" onClick="this.form.action='$domain.'register.php';"/>
</form>

 

ive just tested the code and i get the image fine hmmm

 

 

 

 

Link to comment
Share on other sites

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.