CodePen

HTML

            
              <div class="wrap">
  <div class="inside"></div>
</div>
            
          
!

↑ Insert the most common viewport meta tag

CSS

            
              .wrap {
  width: 500px;
  height: 500px;
  background: #ccc;
  position: relative;
}

.inside {
  width: calc(100% - 30px);
  height: 30px;
  background: blue;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

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