Jump to content
dansignshed

Text under Image

Recommended Posts

Create element to hold text (depending on amount of text a div with child paragraphs,  or just a single paragraph), then create a wrapping element around image and text container  element.

Share this post


Link to post
Share on other sites
11 hours ago, dsonesuk said:

Create element to hold text (depending on amount of text a div with child paragraphs,  or just a single paragraph), then create a wrapping element around image and text container  element.

do you have an example?

Share this post


Link to post
Share on other sites

HTML:

 <div class="item">
    <img src="http://movingimages.files.wordpress.com/2009/10/earth-simulator-offers-peaks-into-our-planetary-future.jpg?w=780" alt=""/>
    <p>My Caption here</p>
  </div>

CSS:

.item{
  width:200px;
  text-align:center;
  display:block;
  background-color: transparent;
  border: 1px solid transparent;
  margin-right: 10px;
  margin-bottom: 1px;
  float:left;
}

 

 

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