Join the Webstudio community

Updated 2 months ago

Account for scrollbar in block elements?

At a glance

The community member posted a question about adjusting divs to account for the width of a scrollbar. A screenshot was provided showing a header image that is a block element with auto width and height, and no padding or margins. A community member provided the answer, stating that using 100svw instead of 100% can cause the scrollbar to cover the div, and this was the solution to the issue.

I think this is probably more of a beginner question, but I'm wondering how I can adjust divs so that they account for the width of a scrollbar. In this screenshot, the header image is a block element, auto width, auto height, no padding or margins. Any tips? Thanks!
Attachment
image.png
Marked as solution
I found the answer - one of my elements was using 100svw instead of 100%. This causes that behaviour where the scrollbar covers the div. Hope this helps someone!
View full solution
S
1 comment
I found the answer - one of my elements was using 100svw instead of 100%. This causes that behaviour where the scrollbar covers the div. Hope this helps someone!
Add a reply
Sign up and join the conversation on Discord