R
R
Roman2018-02-08 15:31:41
css
Roman, 2018-02-08 15:31:41

Why does the layout of the site shift when the image is enlarged?

Hello. This page has a gallery. When you click on the image, the layout of the site shifts. The fancybox script is used.

Thank you very much)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly Zharov, 2018-02-08
@Viruz

page body is styled margin: 0 auto; When opening an image, the compensate-for-scrollbar class with margin-right: 17px is hung on the body
to set the alignment of the content, it is better to enter an auxiliary block, using body for this is bad practice

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question