Show Output
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>CSS Preventing Change in Element Box Dimensions</title> <style> div { width: 100%; padding: 25px; box-sizing: border-box; background: violet; } </style> </head> <body> <div> <h1>This is a DIV Box</h1> </div> <p><strong>Notice</strong>, this time there is no scrollbar at the bottom of the viewport.</p> </body> </html>