Rather than guessing at screen widths to remove hover states in your #CSS, you can use the hover media query. This tests whether the device's primary input mechanism can hover over elements.
Frontend Mentor
7,746 posts
š§āš» Build projects: frontendmentor.io
š Train your team: teams.frontendmentor.io
š Hire A+ juniors: hiring.frontendmentor.io
- Using the :focus-within #CSS pseudo-class can be really handy for styling parent elements whose children have received focus. For example, adding styles to a form while the user fills it in:
- We're delighted to announce our upcoming Frontend Mentor Hiring platform! š If you want to discover junior front-end devs with hands-on experience building projects, this could be perfect for you! Our mission will be to connect great companies with our incredible community š
- Are you just starting to build front-end projects but don't know where to begin? We've got you sorted š¤ Here are four small free HTML & CSS-only projects to get you started...š
- Adding smooth scrolling to a page used to only be possible with JS. Now you can do it in a single CSS declaration! š„³ First, get your HTML set up with your navigation hrefs pointing to IDs throughout the page. Then drop-in scroll-behavior smooth in the CSS and you're done! š
- šØ PRO subscription giveaway šØ Erm...we've just crossed over 300,000 registered members on the platform!! 𤯠To celebrate, we're giving away 3x free one-year PRO subscriptions! š¤š To enter: 1ļøā£ Follow us 2ļøā£ Like & retweet this Good luck! We'll draw 3 winners in 48 hrs š
- š We've just had our 250,000th sign up on Frontend Mentor!! š To celebrate hitting a quarter of a million (š¤Æ) registered members, we're doing a PRO subscription giveaway! We're offering a one year PRO subscription to the lucky winner! š To enter, simply retweet this tweet!
- šØ PRO subscription giveaway šØ It's our 3rd birthday today!! š„³ššš We're offering a one-year free Frontend Mentor PRO subscription to a lucky winner to celebrate š To enter, simply retweet this message. A winner will be chosen at random in 48 hours. Good luck! š
- We've just launched a new FREE challenge! š This calculator app will be a perfect opportunity to practice CSS Grid and work on your JS skills. The 3-palette theme switcher will be a nice additional test š
- We've just launched a new FREE challenge! š This interactive card details form will be an excellent way to practice DOM manipulation and form validation while also putting your HTML and CSS skills to the test.
- If you need to set a height & width on an img element but don't want it to become distorted, use object-fit. This handy CSS property will allow you to resize the image while maintaining its aspect ratio. It behaves like background-size allowing values like cover and contain! š
- One of the most powerful patterns #CodeNewbies can learn is the container element. It makes controlling the width of content much easier than using padding or margin on inner elements. You can also set wide & narrow modifiers to vary the width of content throughout the page š
- šØ PRO subscription giveaway šØ We've reached 10 000 members on our Discord Server š„³š To celebrate, we're giving away 1 free one-month PRO subscription šš¤ To enter: 1⣠Follow Frontend Mentor on Twitter 2ļøā£Retweet this Good luck! We will draw a winner in 24 hours š¤©
- šØ PRO subscription giveaway šØ We've just hit 400,000 registered members on Frontend Mentor!! š„³šš To celebrate, we're giving away 4x free one-year PRO subscriptions! š¤š To enter: 1ļøā£ Follow us 2ļøā£ Retweet this Good luck! We'll draw the 4 winners in 24 hrs š






















