Flex End Align
CSS
Easy
2 views
Problem Description
Align buttons to the right in a footer using justify-content flex-end.
Output Format
Print the HTML+CSS code in one block.
Constraints
Use justify-content: flex-end.
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>
.footer { display: flex; justify-content: flex-end; gap: 10px; padding: 12px; border: 1px solid #eee; border-radius: 14px; width: 380px; }
button { padding: 10px 12px; border-radius: 12px; border: 1px solid #ddd; background: #fff; }
</style>
</head>
<body>
<div class='footer'>
<button type='button'>Cancel</button>
<button type='button'>Save</button>
</div>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!