Let’s say I have a unknown page with some content positioned relative, some absolute.
It has some scripts and there can be also lot of styles.
Is there any universal solution how to make on “every” page content moved down by 50px (for example), to make an empty space on top of page?
Using JS/CSS only. Validity has lower priority than functionality, you know..
Add a wrapper
divand put amargin/paddingon that.You’ll have to add positioning to the wrapper (
absolute,relative, orfixed), anything butstatic, so that its children will position to it.JSFiddle Example
Browsers behave differently when adding CSS to the
bodytag, which is why I don’t recommend modifying that.