CodePen

HTML

            
              <div class="box">The width of this box remains at 400px, in spite of the 140px of total left and right padding.</div>
            
          
!

CSS

            
              .box {
  margin: 0 auto;
  background-color: aquamarine;
  width: 400px; 
  height: 400px;
  padding: 70px;
  box-sizing: border-box;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................