Re: Placing text inside the image

Placing text inside the image

gulegeece
Visitor
2 0 0

gulegeece_0-1724453687323.png   v  

gulegeece_1-1724453739675.png

 

Hello. In this way, I want to write text inside an image that I uploaded hollow in this way, how can I do it?

Replies 4 (4)

WalkYourStyle
Trailblazer
450 54 69

You can use absolute positioning. Is the image section custom code that you created? If so, you can create a div container and place the image and text inside it, which should look like this:

 

 

<div>
  <img>
  <div>
     <p></p>
  </div>
</div>

 


Then, use some CSS to position the text inside the image using absolute positioning. If it's not custom code and is a Shopify section, like an image banner or something similar, it would be really helpful if you shared your website so we can assist you further.

rezwan_cs
Shopify Partner
4 0 0

We need to put the image and the text contents in a common `div`. Then, the image text contents should be `position: absolute` and position it as required. Here is an example code with your provided image - 

 

<div class="card" style="position: relative; width: 100%; max-width: 600px;">
    <img src="https://community.shopify.com/c/image/serverpage/image-id/497430i57AA65FD5C9593CE/image-dimensions/2500?v=v2&px=-1" 
         alt="placeholder image" 
         style="width: 100%; height: auto;">
         
    <div class="image-contents" 
         style="position: absolute; top: 30%; left: 0; width: 100%; text-align: center; margin: 0 50px; color: black; padding: 20px;">
         
        <h3 style="margin: 0; padding-bottom: 10px; font-size: 3em;">Antibacterial Surface</h3>
        <p style="font-size: 1.5em;">
            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam vehicula, risus at viverra sodales, 
            ligula augue tincidunt felis, sit amet dictum purus justo vel nisl. Integer ac varius purus. 
            Donec at eros id dolor volutpat vehicula.
        </p>
    </div>
</div>

rezwan_cs_0-1724475123805.png

 

Note that, it's just an example, we need to style it. Also, the theme section should be dynamic so that anyone can customize it without coding knowledge. Please provide your store link here or contact me for further help because I need access to your store.

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store
- Contact Me - [email protected]
- Hire me - https://cutt.ly/rezwan-shopify
rezwan_cs
Shopify Partner
4 0 0

Hi,

I noticed the section you want to customize. It seems like a slider.

rezwan_cs_0-1724496613923.png

 

But, I need access to the theme code and customizable. If you are not a developer, even though i provide you the code snippet, you won't be able to integrate it correctly that may break the website. If you are interested, please contact me via email ([email protected]) so that we can discuss it. Thank you.

- If helpful then please Like and Accept Solution.
- Want to modify or custom changes or bug fix on store
- Contact Me - [email protected]
- Hire me - https://cutt.ly/rezwan-shopify