Grow your CSS skills. Land your dream job.

Why won’t my code

  • # May 11, 2013 at 5:07 pm

    Hello!

    I’m trying to make a page which has two images, which link to certain areas of a website. On hover, they change to a coloured version of the same image, which is done via the :hover function in CSS.

    This all works fine, but I need the images to be centered, but nothing I’ve tried is working. Can someone help me?

    http://codepen.io/anon/pen/mJvqx

    Thank you!

    # May 11, 2013 at 5:44 pm

    This should get you in the right direction: http://codepen.io/senff/pen/iGylw

    # May 11, 2013 at 6:33 pm

    I would recommend margin: 0 auto; for center aligning elements. http://codepen.io/JTParrett/pen/DtveJ

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".