www.webdeveloper.com
Results 1 to 3 of 3

Thread: How do I add text under a picture?

  1. #1
    Join Date
    Jun 2013
    Posts
    1

    How do I add text under a picture?

    Hi, I have a site and I want my images to appear in a row with text underneath - like this
    -txt---txt--txt-
    |pic| |pic| |pic|

    However, I'm unable to get them to properly line up. They either display one on top of the other, or with the pictures in a line but the text to the side.

    This is the code I am using and the page on my site.
    http://captivecomics.com/titles/

    <html>
    <head>
    <title>Titles</title>

    <style>
    .imgText {
    float: below;
    margin:5px;
    }
    </style>


    </head>

    <body>

    <a href="http://www.captivecomics.com/mkopms">
    <img src="http://www.kmlcustoms.com/CC/m1.png" width="125" height="125"><div class="imgText">The Adventures of Mighty K.O. Punchman and SIRR </a></div>
    <a href="http://www.captivecomics.com/vike"><img src="http://www.kmlcustoms.com/CC/v2.png" width="125" height="125"><div class="imgText">VIKE </a></div>

    </body>
    </html>
    Any help would be greatly appreciated. Thank you.

  2. #2
    Join Date
    Aug 2012
    Location
    TX
    Posts
    293
    this needs to be set up in your css. create a div for each picture and then set the div to block. add the img at the to fille the width of the div and then add the text under it.

    Code:
      .box1{
    	display:block;
    	float:left;
    	width:400px;
            border: 1px solid #000;
    	line-height:1.6em;
    	}

  3. #3
    Join Date
    May 2005
    Location
    Gold Coast (MS)
    Posts
    2,217
    Might play around with this one and modify as needed.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles