Jump to content
kmarsh12

Aligning Images and Text Horizontally

Recommended Posts

Hello,

 

I'm attempting to re-create this Wix page - http://gtnphotography.wix.com/collectivecp#!new-equipment/c10au -in WP using the genesis theme. However, I'm having issues with spacing and alignment. Here's the code I have:

 

<style>

div.container{
position: relative;
}
p {
text-align: center;
margin-bottom: 60px;
}
div.container img{
position: absolute;
top: -30px;
left: -10px;
right: -10px;
}
</style>
<div class="container">
</div>
Any help would be great.
Thanks,
Kelsey

Share this post


Link to post
Share on other sites

Float is causing them to all merge, you need to break out of float using clear: both.

 

Try maybe

.entry-content > h2 {    clear: both;}

and see if that is what you are looking for.

Share this post


Link to post
Share on other sites

Right. Those pictures are wrapped in the h2 tag. If I wrap them in a p tag using the same as before, it shifts all of them. I adjusted the space separating the paragraphs to be a h2 tag. It works! Thanks for the help!

Share this post


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...