CSS image width 100% but still has some background
I have the following website:
It works great on a table, but for some reason in the mobile browser it has a gray canvas on the side.
I have the following code:
CSS
body {
background-color: #4B5961;
width: 100%;
margin: 0;
}
.top-container {
float: left;
width: 100%;
background: linear-gradient( rgba(0,0,0,0.1), rgba(0, 0, 0, 0.1) ),url('../images/background1.jpg') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
Html
<body>
<div id="image-head" class="top-container">
The gray down line matches the background color of the body ( #4B5961
).
As you can see, I have my body width and background image width set to 100%
. So I didn't expect to see a gray line. I think this is the result of the scrollbar.
If anyone can advise on how I can remove this, I would appreciate some help.
+3
source to share