Jump to content

Centering A Pair Of Images


wolfkin

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.

Link to comment
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 comment
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 comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...