To add a label to a link or block in Webflow, or place text in front of an image, you can use a combination of div blocks, text elements, and custom positioning.
1. Wrap Elements in a Parent Div Block
- Drag a Div Block into your layout where you want the content.
- Inside that div, place an Image element and then a Text Block or Heading.
- This sets up the structure needed for layering and positioning.
2. Set the Parent Div Block to Relative Positioning
- Select the parent Div Block.
- In the Style panel, under Position, choose Relative.
- This allows you to absolutely position elements inside it.
3. Position the Text in Front of the Image
- Select the Text Block or Heading inside the parent div.
- Set its Position to Absolute and choose a corner or center (top-left, center, etc.) using the position arrows.
- Use Padding or Margin to fine-tune its placement if needed.
- To ensure it's visible on top, set a higher z-index (e.g., 10+).
4. Style the Label
- Adjust font size, color, background color, and padding to make the text stand out over the image.
- You can also use semi-transparent backgrounds (e.g., rgba) for better contrast.
5. Use Link Blocks for Clickable Areas
- If you want the label and image to be clickable:
- Use a Link Block as the parent wrapper instead of a Div Block.
- Add the Image and Text Block inside the Link Block.
- Style using the same positioning techniques.
Summary
To add a label or text in front of an image in Webflow, wrap both in a relative-positioned div, then absolutely position the text over the image. Use z-index and styling to ensure readability and visual appeal.