This project demonstrates how to create a perfectly centered red circle using HTML and CSS with Flexbox.
- A red circle with a border
- Centered both vertically and horizontally using Flexbox
- Responsive to viewport height
- Open
index.htmlin any modern web browser. - You will see a red circle centered on the page.
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.circle {
width: 200px;
height: 200px;
background-color: red;
border-radius: 50%;
border: 2px solid red;
}