tintincutes
tintincutes

Reputation: 5778

how to put the text below the image

I'm wondering how can I make the text in the center just like the image.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>Title</title>
</head>

<body>
  <center>
    <img src="http://www.wikima4.com/assets/templates/wikima4/css/images/red.jpg" width=
    "1200" height="150" />
  </center>

  <div align="justified">
    <font size="3" face="calibri">text text text text The quick brown fox jumps over the
    lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps over
    the lazy dog The quick brown fox jumps over the lazy dog The quick brown fox jumps
    over the lazy dog The quick brown fox jumps over the lazy dog<br />
    <br />
    You can download the documentation from this link: Download</font>
  </div>
</body>
</html>

Upvotes: 0

Views: 11497

Answers (2)

Sprocket
Sprocket

Reputation: 1

In order to do this for multiple images, you can also use a table with one row as the text and another for the image. With this method, you can place the text above or below the images. i.e.

<table>
    <tr>
        <td class="CSS Settings"> image 1 </td>
        <td class="CSS Settings"> image 2 </td>
        <td class="CSS Settings"> image 3 </td>
    </tr>
    <tr>
        <td class="CSS Settings"> Text for image 1 </td>
        <td class="CSS Settings"> Text for image 2 </td>
        <td class="CSS Settings"> Text for image 3 </td>
    </tr>
</table>

Upvotes: 0

andrewk
andrewk

Reputation: 3871

text-align:center;? <center>? margin:0 auto?

Check out this. http://jsfiddle.net/VnRRA/ Is it what you want?

update: http://jsfiddle.net/VnRRA/1/

Basically what I did was, gave the parent div an idcenterize and told it to text-align:center;

Upvotes: 2

Related Questions