CSS questine
CSS questine
- Started
- Last post
- 6 Responses
- benfal99
.header {
width:100%; height:100vh;
display:block;
padding-left:153px; padding-top:157px;
}^^
that makes my browser horizontally scroll 153px ... like the padding left was extra to the 100% browser width. WHY??
- uan0
- benfal990
fixed it by setting the
width: 90%
padding-left: 10%well
- fadein110
If using widths in % always use padding in the/margin in % unless v.good at maths
- crillix0
Either put the padding on a div inside your header or add box-sizing:border-box; to your header class.
- benfal990
thanks!