Jump to content

How to place a text over image


newcoder1010

Recommended Posts

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>

post-168746-0-32240500-1473803190_thumb.png

Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...