I used to know how to put an image on top and then justify the text below the image so that it stays within the borders of the width of the image. However, now I have no idea how to do this. How is this accomplished?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
- Adding a timeout to a render function in ReactJS
This centers the "A" below the image:
That is ASP.Net and it would render the HTML as:
In order to be able to justify the text, you need to know the width of the image. You can just use the normal width of the image, or use a different width, but IE 6 might get cranky at you and not scale.
Here's what you need:
Your HTML:
If you know the width of your image, your CSS:
Otherwise your text below the image will free-flow. To prevent this, just set a width to your container.
You can use HTML5
<figcaption>
:Working example.