It sounds like your div appears to have unintended space at the bottom, even when no explicit padding or margin is added. This is usually caused by default line height or margin from text elements inside the div—particularly <p>
(paragraphs), <h1>–<h6>
, or inline elements like <img>
.
1. Check for Default Paragraph Margin or Line Height
- Even when you've removed padding, default margins or line height on text elements (like
<p>
) can create extra space. - Select the paragraph inside the div and set its margin (especially bottom) to
0px
. - Also check the line height settings; a larger line height will create extra visual spacing below the text.
2. Inspect Inline Elements Like Images
- If your div contains an inline image, it can cause extra bottom spacing due to baseline alignment.
- Select the image and set display to Block (instead of Inline) in the Style panel. This removes the baseline spacing.
3. Watch for Flexbox Alignment Issues
- If you’re using Flexbox on the parent and aligning items using Align: Center or Justify: Center, make sure the child has no inherent extra spacing from its content.
- Try setting the parent div’s alignment to Stretch, then tweak child spacing manually.
4. Confirm That No Default Styles Are Inherited
- Webflow styles usually come from either base classes, tags, or inherited styles.
- Use the Style panel to check the computed values for margin/padding on each nested element.
5. Use overflow:hidden for Tricky Cases
- If invisible descender space from fonts persists, try adding overflow: hidden to the parent div to clip it.
- This is a workaround and not ideal for all content types (avoid it if text/image needs to overflow).
Summary
The bottom space in your Webflow div is most likely caused by default margin or line height from a text element, or inline element baseline spacing. Set margins to 0px
, line height to appropriate values, and ensure images are set to display: block to remove unwanted spacing.