Jump to content

How to propertinally reduce percent of image displayed on IMG SRC


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?

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

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.

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

 

 

 

 

or try

<form method="post" enctype="multipart/form-data" action="register.php">
<input name="register" type="image" src="" alt="Click here to register" title="Register" width="50%" height="50%" border="0"/>
</form>

just by reading your topic name )and not having time to read responses(  suprisingly within the DTDof XHTML 1.1 Strict you can change an image by %  "width='10%' height='10%'" and its perfectly valid.

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.