Avoid scrolling horizontally html

0

Galera tou configuring my css but ta showing a horizontal scroll already tried in various ways and nothing! Follow the code:

@charset "UTF-8";

body{
  width: 100%;
  height: 100%;
  background-color: white;
}
li{
  color: white;
}
header#fundo-cima{
  width: 100%;
  position: absolute;   
}
header#fundo-cima img{
  width: 100%;
  height: 100px;
  position: absolute;
  top: 0px;
}
nav#Rodape-cima li{
  display: inline-block;
  position: relative;
  top: -100px;
  margin: 19px;
}
    
asked by anonymous 22.09.2018 / 01:36

2 answers

0

The body has a default margin. By setting your width to 100% , it will have the total width of the screen + the default margin , making the area that it occupies is greater than the visible width of the screen, causing the horizontal scroll.

To avoid this, delete this margin from body with the margin: 0; property:

body{
  margin: 0;
  width: 100%;
  height: 100%;
  background-color: white;
}
    
22.09.2018 / 01:55
-1

Try to put in css

body {
  width: 100%;
  height: 100%;
  background-color: white;
  overflow-x: hidden; 
}
    
23.09.2018 / 01:56