Make Button Full Width

Make Button Full Width

Easy CSS Responsive Design 18 views
Explanation Complexity

Problem Statement

On small screens, make a button take full width.

Input Format

No input.

Output Format

Print the HTML+CSS code in one block.

Constraints

Use width: 100% in a media query.

Input / Output Format

Input Format
No input.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use width: 100% in a media query.

Examples

Input:
Output:
(HTML+CSS code)

Example Solution (Public)

CSS
<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
  <style>
    .btn { padding: 10px 14px; border-radius: 12px; border: 0; background: #0b5; color: #fff; }
    @media (max-width: 520px) { .btn { width: 100%; } }
  </style>
</head>
<body>
  <button class='btn' type='button'>Start practice</button>
</body>
</html>

Official Solution Code

<!doctype html>
<html lang='en'>
<head>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <title>meetcode</title>
  <style>
    .btn { padding: 10px 14px; border-radius: 12px; border: 0; background: #0b5; color: #fff; }
    @media (max-width: 520px) { .btn { width: 100%; } }
  </style>
</head>
<body>
  <button class='btn' type='button'>Start practice</button>
</body>
</html>
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.