Could you look at my code? (centering...

User 2750057 Photo


Registered User
7 posts

Hi,

I cobbled together an image map from various tutorials and made it responsive, but I can't figure out how to center it on the page.

My experimental page is at:
http://gistgirl.com/map1/contact.html

My brain sort of hurts right now and I'll greatly thank you for any help.

best,

Boyd
User 122279 Photo


Senior Advisor
14,565 posts

<img style="margin: auto; display: block;" src="powerpuff-girls.fw.jpg" usemap="#powerpuffgirls" alt="" />

I added the bit in bold to the img tag on that page. I also took out the image dimensions, not that it matters in this case since those were the actual size of the image, but it's not good practice to have size tags in the html. They can be included in the css, as width: 1024; height: whatever; if you need them.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 2750057 Photo


Registered User
7 posts

Hi!

It works perfectly. Thank you!

best,

Boyd


Inger wrote:
<img style="margin: auto; display: block;" src="powerpuff-girls.fw.jpg" usemap="#powerpuffgirls" alt="" />

I added the bit in bold to the img tag on that page. I also took out the image dimensions, not that it matters in this case since those were the actual size of the image, but it's not good practice to have size tags in the html. They can be included in the css, as width: 1024; height: whatever; if you need them.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.