dansignshed Posted August 8, 2019 Share Posted August 8, 2019 Hi guys i am trying to get text under my image, i currently have text as part of the image. Using Html how do i do this? any help? link is here https://www.thesignshed.co.uk/collections/custom-signs-36-c for an example Link to comment Share on other sites More sharing options...
dsonesuk Posted August 9, 2019 Share Posted August 9, 2019 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. Link to comment Share on other sites More sharing options...
dansignshed Posted August 9, 2019 Author Share Posted August 9, 2019 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? Link to comment Share on other sites More sharing options...
dsonesuk Posted August 9, 2019 Share Posted August 9, 2019 (edited) <div> <img src="whatever.jpg" alt="whatever"> <div> <p>whatever whatever whatever </p> </div> </div> New html5 method https://www.w3schools.com/tags/tag_figcaption.asp Edited August 9, 2019 by dsonesuk Link to comment Share on other sites More sharing options...
shaili_shah Posted September 24, 2019 Share Posted September 24, 2019 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; } Link to comment Share on other sites More sharing options...
ishan_shah Posted November 1, 2019 Share Posted November 1, 2019 (edited) Hi, You can use the <figcaption> tag to fulfill your requirements. For further reference, you can use the following link:https://www.w3schools.com/tags/tag_figcaption.asp Edited November 1, 2019 by ishan_shah Link to comment Share on other sites More sharing options...
dsonesuk Posted November 1, 2019 Share Posted November 1, 2019 I'm sure I've seen that link before, but I can't in the life of me remember where? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now