+ 2

Unwanted spaces in right side of the html page

Hello guys, can anyone help me to fix the issue with my code that there is an unwanted space in my html page that I've mentioned below https://code.sololearn.com/W1gwJJG9SpLN/?ref=app

5th Feb 2023, 10:06 AM
Kabilan K
Kabilan K - avatar
3 ответов
+ 4
Kabilan K here I've fixed your issue: changes i did: html, body { max-width: 100%; overflow-x: hidden; } .block{ .... padding: 0 20px; } https://code.sololearn.com/WJ681nl3gobI/?ref=app
5th Feb 2023, 10:43 AM
Aakaanksha 💕 [TheBraveCoders]
Aakaanksha 💕 [TheBraveCoders] - avatar
+ 2
To fix the unwanted space to the right of the page, you can try setting a fixed width for the page or use a percentage width and set the margin on both sides to "auto". Additionally, you can also check if there are any elements on your page that are causing unwanted whitespace, such as blank spaces or line breaks in your HTML coding. Here's an example of how you can set a fixed width for the page: body { width:960px; margin: 0 auto; } Here's another example below of how you can set the percentage width for the page: body { width:80%; margin: 0 auto; } hope i helped in some way :)
5th Feb 2023, 10:19 AM
ArsenicolupinIII
+ 1
I'll try it bro
5th Feb 2023, 10:20 AM
Kabilan K
Kabilan K - avatar