Reputation: 147
I am working on a website, at the moment on a sign-up page. Its all perfect, right until i realize some very annoying. I have kinda 2 elements on this page. A sign up div, and an img, for the logo in the top. And it is not even close to fill the whole html page. But it still adds the SCROLL BARS, and i can scroll like 20 px up and down, and from side to side. Very annoying plz help
Upvotes: 0
Views: 133
Reputation: 6555
This can be fixed in two ways
Either change the width and height of the body to auto
as:
html, body {
width: auto;
height: auto;
background: #11BD83;
}
Or as suggested by @Per Salbark add margin : 0
to the body
html, body {
width: 100%;
height: 100%;
margin : 0;
background: #11BD83;
}
Upvotes: 0
Reputation: 3645
You want to add margin: 0;
to your body
.
It's already 100% wide, and the margin pushes the width beyond the space available on screen. This causes a vertical scrollbar, and that, in turn, causes a horizontal scrollbar.
Upvotes: 1