Hey I've stumbled onto something that seems quite simple and almost banal, but I can't just wrap my head around it.
So I've got a website and applied a bit of cascading stylesheet to it.
This is the element I'm talking about on top of the website.
Quite simple really, but for some reason I can't seem to use margin, nor padding to influence the first line of text (#FFF white one). Or to be more specific, margin works, just not margin-top (nor negative bottom).
HTML looks something like this
<html>
...
<body>
<div id = "header">
<a href="#">I can't margin-top this</a>
<h1>However it works on this</h1>
</div>
....
</body>
And the stylesheet like this.
Now, as you may see, the first <a>
should be on margin of 20px, however for some weird reason it seems immune to margin (and padding as well). The <h1>
below is operational.
Any idea what could be causing this?
Last but not least, here's inspection of the <a>
element
Probably has a simple solution, but I went out of practice and I can't really figure out what's the issue here.