Search code examples
htmlcsscss-grid

Header Element Giving unwanted space


This is driving me crazy!

It's not the padding or margin.

I tried to use overflow: hidden and setting a height, but overflow: hidden dose nothing and setting a height breaks my layout.

any help would be great thank you.

here is the site https://www.myccandbuilds.com/

And the space between the header and the Black background div is what I'm talking about.


Solution

  • It seems to be being caused by line height. The issue also goes away with "line-height: 0;", meaning that there's possibly some empty text (newline, whitespace) in your element that's taking up space after the image.