Вопрос

Just a question.

Is there a way to have a background div stretch the full 100% of the screen without using positioning? The only way I can ever get rid of that bit of padding on either side is to give the div absolute positioning.

Это было полезно?

Решение

Try adding the below to your CSS:

html, body{
  margin:0;
  padding:0;
}

Example with vs Without

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top