Jump to content

Image link is not working for me


newcoder1010
 Share

Recommended Posts

Hello, 

I have this php code. I can only click part of the image not the entire image. Am I writing it in correct format?

 

<a class="logo" href="/"  title="<?php print t('Home'); ?>">        <img  src="<?php $logo1 = "images/logo2g-245x128-6.png";
		print $logo1; ?>" alt="<?php print t('Home'); ?>" />
      </a>

Please advise. 

Link to comment
Share on other sites

Hello newcoder100

if you want display an image from one of your directory

just do

<a class="logo" href="/"  title="yourTitle">   <img  src="../images/logo2g-245x128-6.png" alt="yourTitle" />
      </a>

where php file is in one directory and an image is  in an other.

Like that you can click on the entire image

Hope it's helps you

Link to comment
Share on other sites

If you can only click on part of the image it's not a PHP issue, it's a CSS issue.  There's probably another element covering part of the image.  You can use your browser's developer tools to look at the elements and see what's going on.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...