newcoder1010 Posted May 10, 2017 Share Posted May 10, 2017 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 More sharing options...
redhat Posted May 10, 2017 Share Posted May 10, 2017 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 More sharing options...
dsonesuk Posted May 10, 2017 Share Posted May 10, 2017 Are you using Drupal now? print t() is Drupal function I believe. Link to comment Share on other sites More sharing options...
newcoder1010 Posted May 10, 2017 Author Share Posted May 10, 2017 Yes using drupal. I added this code. Two places. One is main logo link on the top bar. Still have issue. The other one is on the sidebar. That works fine. I am not sure why. <a class="logo" href="/" title="psarl"> <img src="/assets/images/logo2g-245x128-6.png" alt="psarl" /> </a> My page Link to comment Share on other sites More sharing options...
justsomeguy Posted May 15, 2017 Share Posted May 15, 2017 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now