newcoder1010 Posted September 13, 2016 Share Posted September 13, 2016 Hi, I have this html. I like to put the text "one" on top of the image as shown in the picture. Can you please help me? <div class="content"> <div class="field field-name-field-productimage field-type-linkimagefield field-label-above"> <a href="https://www.drupal.org/project/field_collection" title="" target="_self" rel="" class=""> <img typeof="foaf:Image" class="img-responsive" src="usiness-website_0.png" width="209" height="144" alt=""></a></div> <div class="field field-name-field-companyname field-type-text field-label-above"> <div class="field-item even">one</div> </div> </div> Link to comment Share on other sites More sharing options...
dsonesuk Posted September 13, 2016 Share Posted September 13, 2016 Could involve option 1 position: relative, position: absolute; top: left properties. option 2 margin-top with negative value, text-align: center; Either options could work, but depends what other styling is already applied to other elements, so cannot supply definite solution. Link to comment Share on other sites More sharing options...
Yvzslm Posted September 14, 2016 Share Posted September 14, 2016 I'm not sure It will work correctly. I hope this is what you want: https://jsfiddle.net/rnky9yL3/1/ 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