Sign in to follow this  
Followers 0
newcoder1010

How to place text under image

2 posts in this topic

Hello, 

I have this html to place the text under the image. Now, I see the text to the right of the image. I am not sure how I can place the text under the image in difference devices?

 

 <figure class="figure"><img src="/sites/default/files/sell-your-house.jpeg" alt="local house -buyers - sell your house" />  <figcaption class="figure-caption">Sell your house fast. <a href="contact-us" title="Contact us">Contact us</a> today!</figcaption></figure>

 

CSS I had:

 

 
figure {
 margin: 0;
 float: left;
 padding: 15px 15px 15px 0;
}

 

Share this post


Link to post
Share on other sites

Make sure the figcaption element is a block and that there is no code floating the img element. 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0