.dropdown-menu display: none; position: absolute; top: 100%; left: 0; background-color: #2c3e50; min-width: 150px; flex-direction: column;
.overlay position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.7); color: white; text-align: center; padding: 1rem; transform: translateY(100%); transition: transform 0.3s;
Use CSS Grid to create a 3-column layout that collapses into a single column on smaller screens. Level 4: Forms and User Input Forms are the bridge between your website and your users. Exercise: Design a "Contact Us" form. html and css practice exercises with solutions
.nav-links a text-decoration: none; color: white; font-weight: 500; transition: color 0.3s;
.holy-grail display: flex; flex-direction: column; min-height: 100vh; margin: 0; .container display: flex
Use Flexbox to space a logo on the left and menu links on the right.
<div class="pricing-container"> <div class="pricing-card">Basic<br>$9/mo<br>Feature 1<br>Feature 2<br><button>Sign Up</button></div> <div class="pricing-card pro">Pro<br>$29/mo<br>All Basic + Feature 3<br>Feature 4<br><button>Sign Up</button></div> <div class="pricing-card">Premium<br>$59/mo<br>All Pro + Priority Support<br><button>Sign Up</button></div> </div> .nav-links a text-decoration: none
Whether you're a beginner or an experienced developer, we hope these exercises have helped you reinforce your understanding of HTML and CSS and build confidence in your coding abilities. Happy coding!
.container display: flex; flex: 1; gap: 1rem; padding: 1rem;