Mobile app version of vmapp.org
Login or Join
Si6392903

: Body margin 8px, unable to change The body margin remains 8px by default and I'am unable to change it using CSS. Even If body margin is set to 0px in CSS it leaves some space on the

@Si6392903

Posted in: #Css #WebsiteDesign

The body margin remains 8px by default and I'am unable to change it using CSS.
Even If body margin is set to 0px in CSS it leaves some space on the top.
What may be the possible solution?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Si6392903

1 Comments

Sorted by latest first Latest Oldest Best

 

@Turnbaugh909

.thumb, which is the first descendant of body that isn't absolutely positioned has a top margin of 100px, so that is pushing body down. Remove that (or set it to 0 or whatever) and that will stop pushing everything down.





If you do want to move .thumb down without affecting body, you can either use padding on #myDiv (or .thumb itself) instead, or you can set .thumb to display: inline-block; which aren't affected by collapsing margins.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme