It doesn't fit at all, how do I fix it
CSS:
.welcome {
background-color: #9dbbf8;
color: #1b1b1b;
height: 760px;
background-size: cover;
background-position: center;
}
It doesn't fit at all, how do I fix it
CSS:
.welcome {
background-color: #9dbbf8;
color: #1b1b1b;
height: 760px;
background-size: cover;
background-position: center;
}
If you want that the div thing touches the edges the basic is that websites already have margin and padding. The easiest method is by removing it like this:
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.welcome {
background-color: #9dbbf8;
color: #1b1b1b;
height: 760px;
background-size: cover;
background-position: center;
}
<div class="welcome"></div>
Hope you like my answer.
In most browsers, the body
tag has a default margin set on it. So the solution would be to remove that margin:
body {
margin: 0;
}
Also, it is a good practice to apply some basic styles to HTML elements to make them render in different browsers more consistently. A great tool for that would be to use Normalize.css or other CSS resets.