Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am doing the mini-project by using only HTML and CSS, the problem is when I will be in max-size of the window the webpage design will be proper, but when I will minimize the window screen the huge white space will appear on the right side. Even I am using width=100vh and height=100vw.

question from:https://stackoverflow.com/questions/65651670/design-of-the-web-page-on-min-window

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
100 views
Welcome To Ask or Share your Answers For Others

1 Answer

Are you using 100vw really everywhere? One larger element can cause it:

<body>
  <div style="width: 150vw; background-color: yellow; height: 50px;"></div>
  <p style="background-color: blue;">This element has the normal window width. Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
</body>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...