Shopify themes, liquid, logos, and UX
v
Hello. In this way, I want to write text inside an image that I uploaded hollow in this way, how can I do it?
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.
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>
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.
Hi,
I noticed the section you want to customize. It seems like a slider.
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 (rezwan.cs.dev@gmail.com) so that we can discuss it. Thank you.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024