Z
Z
zwezew2018-02-21 11:41:27
css
zwezew, 2018-02-21 11:41:27

Is it correct to use javascript to calculate the padding of a content block when using a fixed header?

Is it correct to use javascript to calculate the top padding of a content block when using a fixed header?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kreotech, 2018-02-21
@kreotech

More likely no than yes.
Javascript should only be enabled on scroll. The indent must be calculated either earlier, or in general, the header must be in static position before the script runs. Otherwise, if the visitor's scripts are turned off, there will be fatal portacies in the display of the site. And on all pages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question