NLT Posted July 17, 2011 Share Posted July 17, 2011 I need my image a link. This is the normal line: <img src="images/twitterButton.png" class="buttonleft" /> But if I do <a href="http://twitter.com"><img src="images/twitterButton.png" class="buttonleft" /></a> My CSS doesn't work then. Quote Link to comment https://forums.phpfreaks.com/topic/242196-css-help/ Share on other sites More sharing options...
cssfreakie Posted July 17, 2011 Share Posted July 17, 2011 i am pretty sure if you would be less brief in describing your problem you probably would have solved this yourself... So if i understand you correctly you want your image to be a link. Although your image is missing an alt= attribute the stuff below should just work. unless.....we are missing some code. So your might not showing us all the code that is influencing the stuff above. Do you maybe have a link to an online example of what your doing/trying? if not i recommend to install firebug, and inspect the elements and see where they get there styles from. Quote Link to comment https://forums.phpfreaks.com/topic/242196-css-help/#findComment-1243780 Share on other sites More sharing options...
NLT Posted July 17, 2011 Author Share Posted July 17, 2011 Yes. I got a twitter image which I want it to be linked to my twitter. I've done 2 pages for you to look at, one with just no a href just plain page, and one with me trying to do the CSS and you can see how it messes up the CSS. This is the link with no a href on the images: http://fustigate.net/test/nolink.php This is the link WITH a href on the images: http://fustigate.net/test/link.php Look at the style messing up. The Twitter images should be beside the ad. Quote Link to comment https://forums.phpfreaks.com/topic/242196-css-help/#findComment-1243785 Share on other sites More sharing options...
JasonLewis Posted July 18, 2011 Share Posted July 18, 2011 Getting 404 errors when trying to view those examples NLT. Quote Link to comment https://forums.phpfreaks.com/topic/242196-css-help/#findComment-1243985 Share on other sites More sharing options...
cssfreakie Posted July 18, 2011 Share Posted July 18, 2011 When i Looked (in firefox) they were both the same. It might be wise to combine the logo's in a special container div and position that inside the page. Quote Link to comment https://forums.phpfreaks.com/topic/242196-css-help/#findComment-1244007 Share on other sites More sharing options...
shamsher Posted July 29, 2011 Share Posted July 29, 2011 you can use Div and CSS. Here is what you do: <div class="php"> <a href="your link"><img src="your image"></a> </div> or you can check out this link : <a href="http://www.phptraininginchandigarh.com">PHP Training in Chandigarh</a> Quote Link to comment https://forums.phpfreaks.com/topic/242196-css-help/#findComment-1248847 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.