0

Can't leave no margin beetwen header and the top of the browser

I have a header element with a h1 element inside, since I set the h1 title margin from top it changes the header margin instead, spent some time on this and couldn't correct it, any help and suggestions please?

30th Jan 2017, 1:47 AM
Marcos Garcia
Marcos Garcia - avatar
6 ответов
+ 5
Then don't leave any margin on the h1...
30th Jan 2017, 1:48 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 5
If you post the code here, it will be easier for me to get what you're trying to do.
30th Jan 2017, 1:58 AM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 2
u can try using float on the h1 and the margin wont affect the header
30th Jan 2017, 2:53 AM
Kawaii
Kawaii - avatar
+ 2
Try to set 'margin:0;' to the <body> element: he have a default margin ^^... anyway, in addition to not leave any ( top ) margin on <h1> element ;)
30th Jan 2017, 5:16 AM
visph
visph - avatar
0
The h1 doesnt work as a block then? in that case can I set its margin from top as a space? Im new to this just trying to practice
30th Jan 2017, 1:57 AM
Marcos Garcia
Marcos Garcia - avatar
0
I set the header padding top to 0 and It worked. thanks
31st Jan 2017, 11:45 PM
Marcos Garcia
Marcos Garcia - avatar