Jump to content

Centering A Pair Of Images


Recommended Posts

Resolved Two issues I'm having that I could use some help with http://31theseries.com/shriekfest/ I have two images and I'd like to center the two of them as a group. In this case they're the same size but I have other applications where they're going to be different sizes Also I'm a bit mixed up on how I can get my buttons in a horizontal row instead of a vertical one. I tried using display inline but when I do suddenly my width and height definitions mean nothing and the images get cut off.

Edited by wolfkin
Link to post
Share on other sites

To center the images, just set text-align: center to the parent element. I suggest making that parent a <div> and not <span> as you currently have it. One way to make elements be horizontal eachother is to set the float property to left. The other way is to set their display property to "inline-block".

Link to post
Share on other sites

never tried divs but I did try text-align center.. didn't try inline-block though. thanks Ingolme I'll see what happens when i get home and I'll be back if i need more help.

Link to post
Share on other sites

again thanks much Ingolme. Not even sure why i went for a span when I normally use divs but divs centered the pictures. as I wanted. oh and floating worked so that's cool.

Edited by wolfkin
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...