+ 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
3 odpowiedzi
+ 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
+ 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 :)
+ 1
I'll try it bro