Menu icon Foundation
how to center an image with link

I'm trying to center a small logo image at the top of my email. 

However, if I do the following, the whole line will be clickable.

I only want the image part to be clickable. Is there anyway to solve it?

<center>
<a href="http://www.mileiq.com" target="_blank" title="MileIQ">
	
	<img src="http://emailpush.mileiq.netdna-cdn.com/relaunch2017/MileIQ-Logo.png" class="headerLogo" alt="MileIQ">
	
</a>
</center>

 

email;center;image;link;

I'm trying to center a small logo image at the top of my email. 

However, if I do the following, the whole line will be clickable.

I only want the image part to be clickable. Is there anyway to solve it?

<center>
<a href="http://www.mileiq.com" target="_blank" title="MileIQ">
	
	<img src="http://emailpush.mileiq.netdna-cdn.com/relaunch2017/MileIQ-Logo.png" class="headerLogo" alt="MileIQ">
	
</a>
</center>

 

Ryan Patterson about 2 years ago

Wow, a center tag, haven't seen that in a long time. I thought that became deprecated in html4. 

If you are using foundation, just put .text-center on the parent container. That will horizontally center the image inside that parent container

So something like this:

<div class="text-center">
<a href="http://www.mileiq.com" target="_blank" title="MileIQ">
	
	<img src="http://emailpush.mileiq.netdna-cdn.com/relaunch2017/MileIQ-Logo.png" class="headerLogo" alt="MileIQ">
	
</a>
</div>

Again, this only works if using foundation. Other wise you can just apply text-align: center; to parent container.

Mustafa Emre Tekcam almost 2 years ago

Ryan your answer helped me in my problem, but i wanted to know if there is a better way in doing this(Best Practice), as you mentioned that it is deprecated in HTML.

Julia Roberts almost 2 years ago

If you want to centre your image with a link then try these lines.I have tried these lines on my cheapest essays website and it worked

<div style="text-align: center">
<a href="link">

<img src="URL" align="center"></a>
</div>

rilynne vania over 1 year ago

Use this code

<div style="width:100%;text-align:center;">
<a href="my/link"> <img src="my/image"> </a> <img src="my/image"/>
</div>

regards

bestvpnforkodi.co

Tek Xpert over 1 year ago

<p>This is some text. <img src="smiley.gif" alt="Smiley face" align="middle"> This is some text.</p>

 

https://crumbles.co/best-kodi-add-ons/

David Allen over 1 year ago

 I have to modify my template blog to a new one. I have uploaded the image too. The difficulty with my new template is my image that Help In Essays I have uploaded before it's not in the position I required. I have to re-upload the image so its fix to my new template. Is there any can help me with this? 

Aron Ramzey over 1 year ago

I was also looking for a solution for this. Every time when I do this an error occurs it affects my time on work. I think using parent container syntax language may able to find a solution for this. But I don’t know exactly about this http://www.howtofixprinterissues.com

narutoget shippuden about 1 year ago

The next time I read a blog, I hope that it does not fail me just as much as this particular one. I mean, I know it was my choice to read, nonetheless I actually believed you would probably have something useful to talk about. All I hear is a bunch of whining about something you could fix if you were not too busy looking for attention.

 

poslajutracking me about 1 year ago

Poslaju  is a malaysian courier service to Track all malaysian packages through poslajutracking.me

 

Tom Clark 11 months ago

Thanks for this useful information! Check out my work on https://speedypaper.app/

zubar mahi 11 months ago

You have to use the tag center above the image to make the image in center position. If you want you can try the camtasia for editing or screen recording get discount on camtasia using techsmith promo code

zubar mahi 11 months ago

IF you are looking for multimedia tools then you need Magix editing softwares they have photo, video and music editing softwares. Get Magix Movie Edit Pro coupon to save up to 50% on your favorite product.