Category: CSS
Articles on CSS tips and tricks
CSS technique for elastic moving active background for navigations
Here is a simple CSS solution (javascript not needed here) to achieve the active state elastic animations that go from left to right during the active state of a particular nav tab. Let “.bg-elastic” is the free-moving active state element inside the nav...![Zoom everything on bigger screens – CSS Media queries](https://i0.wp.com/webdevpuneet.com/wp-content/uploads/2023/02/css-media-queries.png?resize=778%2C645&ssl=1)
Zoom everything on bigger screens – CSS Media queries
Hi, if you want to zoom your website on a bigger screen like QHD and UHD i.e > 1920px you can just use the following media queries. You can edit them according to your needs. /* Zoom everything on bigger screens */ @media (min-width:2000px) and (max-width:2399px) {...![Error: Incompatible units: ‘vw’ and ‘rem’ in SCSS to CSS compiler](https://i0.wp.com/webdevpuneet.com/wp-content/uploads/2022/11/Screenshot_1.png?resize=805%2C255&ssl=1)
Error: Incompatible units: ‘vw’ and ‘rem’ in SCSS to CSS compiler
Are you getting error like the screenshot below? SCSS has a built-in function to ignore things in quotes. width: unquote(” add_your_css_here “); font-size: unquote(“clamp(1.25rem, 0.5rem + 1.45vw, 26px)”); This will be compiled without the...![CSS zebra-striping in sets of three and four](https://i0.wp.com/webdevpuneet.com/wp-content/uploads/2022/11/css-zebra-striping.png?resize=850%2C647&ssl=1)
CSS zebra-striping in sets of three and four
Here is a simplest way to create zebra styled elements in sets of three using CSS only. DEMO See the Pen CSS zebra-striping in sets of three by Puneet Sharma (@webdevpuneet) on CodePen. Effective CSS .zebraStrip > div:nth-child(6n+1), .zebraStrip >...![Responsive text with respect to container width](https://i0.wp.com/webdevpuneet.com/wp-content/uploads/2022/11/Screenshot_20.png?resize=1032%2C603&ssl=1)