Problem with width od body

Please post the URLs to pages, where you've made a CMSimple template available for download

Moderator: mikey

Post Reply
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Problem with width od body

Post by Tata » Sun Feb 18, 2018 8:57 am

I have made three templates to a webpage (dubina, dubina_op and dubina_op2). The firs of them works fine. The others work also fine except of the width of the body. There is a white space on the right, so the scrollbar-x is there and the whole page is movable to the left showing the white space.
I can't find the selector making this space. How to find it? I can add overflow-x: hidden; in body selector. But this seems not to be the clear solution.
URL is http://rancdubina.cmsimple.sk
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Problem with width od body

Post by cmb » Sun Feb 18, 2018 11:42 am

Tata wrote:
Sun Feb 18, 2018 8:57 am
I have made three templates to a webpage (dubina, dubina_op and dubina_op2). The firs of them works fine. The others work also fine except of the width of the body. There is a white space on the right, so the scrollbar-x is there and the whole page is movable to the left showing the white space.
Wrt. dubina_op I see two issues. Firstly, the <body> defines a width of 100vw which makes it some pixels wider than the html (don't know why). Secondly, .wrapper1.slider defines a width of 100%. Removing both widths makes the horizontal scrollbar disappear for me.
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Problem with width od body

Post by Tata » Sun Feb 18, 2018 11:57 am

Danke, es geht. Es ging auch mit html{overflow-x: hidden;}. So ist es jedenfalls besser.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

lck
Posts: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Problem with width od body

Post by lck » Sun Feb 18, 2018 11:59 am

cmb wrote:
Sun Feb 18, 2018 11:42 am
Wrt. dubina_op I see two issues. Firstly, the <body> defines a width of 100vw which makes it some pixels wider than the html (don't know why).
Yes, body should have width: 100%;
100vw = Viewport-width with scrollbar
100% = Viewport-width without scrollbar
cmb wrote:
Sun Feb 18, 2018 11:42 am
Secondly, .wrapper1.slider defines a width of 100%. Removing both widths makes the horizontal scrollbar disappear for me.
The second problem is the class .footer. There is a padding of 1em without box-sizing: border-box;
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Problem with width od body

Post by cmb » Sun Feb 18, 2018 1:02 pm

lck wrote:
Sun Feb 18, 2018 11:59 am
100vw = Viewport-width with scrollbar
100% = Viewport-width without scrollbar
Ah! Thanks!
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply