![](/style/images/good.png)
![](/style/images/bad.png)
How do I get my text centered under the picture, not next?
source link: https://www.codesd.com/item/how-do-i-get-my-text-centered-under-the-picture-not-next.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How do I get my text centered under the picture, not next?
In the HTML markup below, what do I need to do in order to get the text, "What is this?" to be positioned BELOW the image? Initially, I placed the text in <p>
tags but, although the text was positioned correclty, I lost my desired hyperlink behavior.
Thanks!
<div class="HorizontallyCentered">
<a href="qr.aspx">
<img alt="Image of JA10" src="files/ja10.png" height="150" width="150" />
What is this?
</a>
</div>
try this css
.HorizontallyCentered
{
text-align: center
}
.HorizontallyCentered img
{
display: block
}
that should force the text on to the line below.
Related Articles
How do I get a text file from the lens c of the URL?
CSS positioning: a text string that is too long puts the text under the image, not next to
How do I get Sublime Text 2 with Ruby on Rails?
How to get old text and change the text of the text box on the TextChanged event of the text box?
How do I get a flat list of the dictionary key query where values are lists?
How do I get items from a template that are not used in the ManyToMany relationship?
How do I get an iframe to load the entire page on the next page?
How can I get a quick estimate of the distance between a point and a bicubic spline surface in Python?
Can not add text under image without the clear tag and text alignment centers around the contents, not the page
How do I get Resx texts to be used in Javascript?
How do I get a text node after element?
How do I get span text in the list item using jQuery?
How do I get a text box with ValidationGroup in jQuery?
How to make the cursor text stay under the image
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK