Make Button Full Width
CSS
Easy
3 views
Problem Description
On small screens, make a button take full width.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use width: 100% in a media query.
Official Solution
<!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>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!