How do I remove blank space above h1?

How do I remove blank space above h1?



I am busy working on a portfolio website and I am experiencing a strange issue. There is some blank space above al my headings and there is also floating part of the text outside of the heading on the bottom.



I already tried removing margin/padding, changing fonts, changing line-height and changing font-size.



Although I have the feeling that the answer must be quite simple I couldn't find the answer myself.



Screencapture:
https://i.stack.imgur.com/dHpCI.png





Did you tried to set margin: 0?
– m1ch4ls
Sep 1 at 14:58


margin: 0





it's margin-bottom for all the heading
– Temani Afif
Sep 1 at 15:15






Already tried both answers. If you look over at this page: dev-environment.nl you'll see that it's probably no margin or padding issue.
– John Mestebeld
Sep 1 at 15:19





You can't, that's just how the font is generated, this falls out of the CSS.
– VXp
Sep 1 at 16:04




3 Answers
3



After inspecting your site (http://dev-environment.nl/), i noticed that margin is set to h1. Remove this margin.



Set below values to your css.


h1
margin: 0px;
-webkit-margin-before: 0px;
-webkit-margin-after: 0px;



After checking your site, I think it's your container class which has following css (you have every h1 in container class div):


main container
padding-left: 20px;
padding-right: 20px;
padding-top: 60px;
padding-bottom: 60px;



try changing these values.



please addh1 line-height: 1.2rem;

and add-jest it according to your need


h1 line-height: 1.2rem;



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Some of your past answers have not been well-received, and you're in danger of being blocked from answering.



Please pay close attention to the following guidance:



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

How do I collapse sections of code in Visual Studio Code for Windows?

ャフサォクコ ケウ,コ,ワ メ,ロスョノ゙,クネ,フムカヤヲニ,エコ゚ツ ウイオン゙ケワサネォキモュキォウイノンコチ゚メヌナイゥフュ,カヒウネェ ネ,ホノケ,ムュキ ッボーミュハ,チ ツス ィ メウイマヤ,゙ウチ ヅ ロ,ォジヌェ ャヌット ェ,マャ,チナエヒネソキツテ トホヲヲミーァ