<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem:  Tahera Alam</title>
    <description>The latest articles on Forem by  Tahera Alam (@taheralam).</description>
    <link>https://forem.com/taheralam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F986753%2F5fdf18fa-f03f-4e72-abed-346cf2ab2289.png</url>
      <title>Forem:  Tahera Alam</title>
      <link>https://forem.com/taheralam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/taheralam"/>
    <language>en</language>
    <item>
      <title>How to Use Selenium for Record and Playback</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Fri, 27 Jun 2025 13:21:11 +0000</pubDate>
      <link>https://forem.com/testmuai/how-to-use-selenium-for-record-and-playback-39im</link>
      <guid>https://forem.com/testmuai/how-to-use-selenium-for-record-and-playback-39im</guid>
      <description>&lt;p&gt;Selenium is a popular test automation framework that comes with a robust suite of tools, simplifying everything from writing test scripts to executing them.&lt;/p&gt;

&lt;p&gt;You can also use Selenium for record and playback tests with one of its components, the Selenium IDE. With Selenium IDE, you can create automated tests without writing a single line of code.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Is Selenium IDE?
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.lambdatest.com/learning-hub/selenium-ide?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=june_27&amp;amp;utm_term=pd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium IDE&lt;/a&gt; is a browser extension that simplifies the process of creating automated tests for web applications. It allows you to record your actions on a website in the browser and playback those actions to verify the expected functionality.&lt;/p&gt;

&lt;p&gt;It provides a user-friendly interface that allows you to quickly create and run test cases directly within your browser without requiring any technical expertise.&lt;/p&gt;

&lt;h1&gt;
  
  
  What Is Record and Playback in Selenium?
&lt;/h1&gt;

&lt;p&gt;When it comes to codeless test automation, the record and playback feature in Selenium allows you to record your interactions with a website, and then you play them back to see if everything works as expected.&lt;/p&gt;

&lt;p&gt;The record and playback feature is available within its ecosystem through the Selenium IDE. When you enable recording, the IDE captures every action you perform in the browser and translates it into a sequence of commands.&lt;/p&gt;

&lt;p&gt;These commands are then saved as a test script, which can be executed later to replicate the same interactions. It also eliminates the need for repetitive manual testing and ensures consistency in test execution.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Record and Playback With Selenium?
&lt;/h1&gt;

&lt;p&gt;Now, let’s look at how to use Selenium for record and playback tests.&lt;/p&gt;

&lt;h1&gt;
  
  
  Install the Selenium IDE
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: &lt;em&gt;When writing this blog, the Selenium IDE extension is no longer available for the Chrome browser on the Chrome Web Store as it didn’t align with Chrome extension best practices.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;You can still access the Selenium IDE extension on other browsers, such as Brave.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To demonstrate how to use Selenium for record and playback, we’ll use the Brave browser to run our tests.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Install the Selenium IDE Chrome extension.&lt;/li&gt;
&lt;li&gt; Open the Selenium IDE and click on &lt;strong&gt;Create a new project&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsewb3jz02byxyp14rt43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsewb3jz02byxyp14rt43.png" alt=" " width="768" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Give it a name and click &lt;strong&gt;OK&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkco3xzz6jdr21wp4t7zn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkco3xzz6jdr21wp4t7zn.png" alt=" " width="768" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create a New Test
&lt;/h1&gt;

&lt;p&gt;Now that we have a project ready, let’s create our first test in this project. For this purpose, we will use the LambdaTest eCommerce Playground website.&lt;/p&gt;

&lt;p&gt;Currently, this is how our workspace looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjsuy1eqbfj77skrfhes.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzjsuy1eqbfj77skrfhes.png" alt=" " width="768" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Click on the &lt;strong&gt;Add new test&lt;/strong&gt; button in the top left side and give the test a name:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fai7r6248b6dputxz7azu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fai7r6248b6dputxz7azu.png" alt=" " width="535" height="468"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Click &lt;strong&gt;ADD&lt;/strong&gt; and now we are ready to actually record the test and play it back.&lt;/p&gt;

&lt;h1&gt;
  
  
  Record the Test
&lt;/h1&gt;

&lt;p&gt;Before you can start recording, you need to enter the URL of the website you want to test. To demonstrate this, we’ll use the LambdaTest eCommerce Playground. So, go ahead and paste this URL &lt;a href="https://ecommerce-playground.lambdatest.io/" rel="noopener noreferrer"&gt;&lt;em&gt;https://ecommerce-playground.lambdatest.io/&lt;/em&gt;&lt;/a&gt; in the playback base URL field.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fth5kmg8aikwg3rtftl37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fth5kmg8aikwg3rtftl37.png" alt=" " width="800" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you enter the URL, click the recording button (at the top right in red). Selenium will open the website in a new tab and start recording all your interactions.&lt;/p&gt;

&lt;p&gt;As you navigate through the website, Selenium records every action. This includes clicking buttons, filling out forms, selecting dropdown options, and navigating between web pages.&lt;/p&gt;

&lt;p&gt;Now that recording is active, let’s follow the below steps will help you understand how Selenium IDE captures user interactions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgm4ty1grpasmx8s790dz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgm4ty1grpasmx8s790dz.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Search for an iMac, check the results, and open a product page — Selenium IDE records each step.&lt;/li&gt;
&lt;li&gt; Click on the search bar, type “iMac,” and press Enter or click the search button.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The Search results page appears, and Selenium IDE captures the navigation.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmfha3mfwo1rse0dw446.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbmfha3mfwo1rse0dw446.png" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3. Click on any iMac product to open its details page — this click is also recorded.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9381dz9lbyq2fo5szrw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9381dz9lbyq2fo5szrw1.png" alt=" " width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4. Once you have completed the actions, return to Selenium IDE and stop the recording.&lt;/p&gt;

&lt;p&gt;Now, let’s move on to the next step — playing back the test to see if it works as expected.&lt;/p&gt;

&lt;h1&gt;
  
  
  Playback the Test
&lt;/h1&gt;

&lt;p&gt;Playing back a test in Selenium IDE allows you to automatically re-run the recorded steps and check whether the interactions you recorded work as intended.&lt;/p&gt;

&lt;p&gt;Now, let’s see how we can playback the test we just recorded in the previous step.&lt;/p&gt;

&lt;p&gt;Here, at the top of the Selenium IDE window, you can see a &lt;strong&gt;Run current test&lt;/strong&gt; button. Click it, and Selenium IDE will automatically execute each recorded action step by step.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdr36pttahxz20zi34l7m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdr36pttahxz20zi34l7m.png" alt=" " width="768" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also run multiple tests in a sequence by clicking the right arrow next to each test. This will execute every test in your project one after another.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxiws7reagr8l4ysqdgk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxiws7reagr8l4ysqdgk0.png" alt=" " width="800" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It becomes useful when verifying multiple workflows or features in a web application. Since our project has a single test, both buttons will have the same effect.&lt;/p&gt;

&lt;p&gt;As the test runs, you’ll see the browser automatically repeat the recorded steps- navigating to the website, searching &lt;em&gt;imac&lt;/em&gt;, viewing the results, and opening the product page just as you did while recording.&lt;/p&gt;

&lt;p&gt;When this playback takes place, Selenium IDE offers feedback in real-time. If the test passes, all steps will run without errors. Selenium identifies a failed step and highlights it (for instance, if an element is not found or there are changes in the structure of the page). This makes it possible to quickly debug the test.&lt;/p&gt;

&lt;p&gt;At the bottom of Selenium IDE’s window, you’ll see the test log showing the steps executed along with their timestamps and a message saying everything was executed successfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2455ljql9yn93h8t3wc4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2455ljql9yn93h8t3wc4.png" alt=" " width="768" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we know how to record and playback a test, let’s explore how to export your test so it can be used in Selenium or other test automation frameworks.&lt;/p&gt;

&lt;h1&gt;
  
  
  Export a Test
&lt;/h1&gt;

&lt;p&gt;Selenium IDE supports exporting tests in various programming languages and frameworks.&lt;/p&gt;

&lt;p&gt;Let’s see how you can export your test:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Click on the three dots menu located in the top left corner of the Selenium IDE window:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fum8ntsx063knonhztmxb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fum8ntsx063knonhztmxb.png" alt=" " width="767" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2. Choose your preferred language/framework and other optional configurations, and click &lt;strong&gt;Export&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqsj6e5ht8ny6p077q5lz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqsj6e5ht8ny6p077q5lz.png" alt=" " width="768" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After selecting the format, simply save the file on your local machine and you are done.&lt;/p&gt;

&lt;p&gt;The exported file will contain the test script in your chosen programming language. This script includes the commands and steps that Selenium IDE recorded.&lt;/p&gt;

&lt;p&gt;You can now import this file into your development environment (e.g., Eclipse, IntelliJ IDEA, VS Code) and integrate it with your Selenium WebDriver project.&lt;/p&gt;

&lt;h1&gt;
  
  
  How to Run Selenium IDE Tests on the Cloud?
&lt;/h1&gt;

&lt;p&gt;Up until now, we have learned how to record, playback, and export tests using the Selenium IDE. However, there are limitations to running tests on only your local browser. For instance, if you need to test on several browsers and operating systems to check how your website functions?&lt;/p&gt;

&lt;p&gt;This is where cloud testing platforms like LambdaTest come into play. It is an AI-native test execution platform that enables you to execute Selenium IDE tests on a cloud-based grid.&lt;/p&gt;

&lt;p&gt;LambdaTest provides you with access to various combinations of browsers and operating systems (Chrome, Firefox, Edge, Safari on Windows/macOS, etc.), which can help you run your tests in parallel, enabling faster software release cycles.     &lt;/p&gt;

&lt;p&gt;Now, let’s see how we can run the Selenium IDE tests on LambdaTest with just a few simple steps.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Install Node.js.&lt;/li&gt;
&lt;li&gt; Connect Selenium IDE with LambdaTest. For that, you’ll need your Username and Access Key. To get the access, head over to your Account Settings &amp;gt; Password &amp;amp; Security.&lt;/li&gt;
&lt;li&gt; Install the Selenium IDE Runner (or the SIDE Runner) using the below given command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install -g selenium-side-runner
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will help you run the tests outside the browser.&lt;/p&gt;

&lt;p&gt;4. Open Selenium IDE and click on the save project icon to save it to your local machine.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpn2t9rf81cg1ua84nfc7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpn2t9rf81cg1ua84nfc7.png" alt=" " width="800" height="261"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This file contains your recorded test case, which will be used to run tests on LambdaTest. You can also access the exported Selenium IDE project in this &lt;a href="https://github.com/Undisclosed64/record-playback-demo" rel="noopener noreferrer"&gt;GitHub repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;5. To direct your tests to the platform, you’ll need the LambdaTest Username and Access Key in the LambdaTest grid URL. In this URL, replace &lt;em&gt;user-name&lt;/em&gt; and &lt;em&gt;access-key&lt;/em&gt; with your actual LambdaTest credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://user-name:access-key@hub.lambdatest.com/wd/hub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;6. Desired capabilities are a set of key-value pairs that let you define the specific environment for test execution.   &lt;/p&gt;

&lt;p&gt;So, in this step, specify the browsers and operating systems you want to test against. You can also use LambdaTest Automation Capabilities Generator to simplify this process.&lt;/p&gt;

&lt;p&gt;For instance, to test on Chrome with Windows 11, we will use the following configuration for Selenium 4:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;options = ChromeOptions()
options.browser\_version = "latest"
options.platform\_name = "Windows 11"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;7. Open your terminal, navigate to the directory containing your .side file, and run the following command, replacing the &lt;em&gt;user-name&lt;/em&gt; and &lt;em&gt;access-key&lt;/em&gt; with your actual values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;selenium-side-runner "your-test-file.side" --server
https://user-name:access-key@hub.lambdatest.com/wd/hub -c " options =
ChromeOptions() options.browser\_version = "latest" options.platform\_name = "Windows 11""
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ensure to replace &lt;em&gt;your-test-file.side&lt;/em&gt; with the accurate file name of your Selenium IDE project.&lt;/p&gt;

&lt;p&gt;With these steps, your Selenium IDE test is now running on the LambdaTest online Selenium Grid.&lt;/p&gt;

&lt;p&gt;You can now check the test execution results directly from the LambdaTest Web Automation dashboard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgqlswwilwvoopbtls74n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgqlswwilwvoopbtls74n.png" alt=" " width="800" height="408"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Best Practices to Use Selenium for Record and Playback
&lt;/h1&gt;

&lt;p&gt;Record and playback is an easy way to automate tests without writing test scripts, but to make the most of this functionality, you’ll need to follow below best practices.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Avoid using XPath whenever possible. It tends to break when a webpage’s structure changes. Instead, choose more reliable options like IDs, class names, or data attributes.&lt;/li&gt;
&lt;li&gt;  Split your tests into smaller, reusable chunks. Instead of cramming multiple actions into a single test, create separate test cases for common tasks like logging in or form submissions.&lt;/li&gt;
&lt;li&gt;  Web applications aren’t always static, so use control flow commands like if, while, and times to handle changing conditions. This helps make your tests more adaptable.&lt;/li&gt;
&lt;li&gt;  Testing isn’t just about running actions — it’s about verifying results. Add assertions to check that the application behaves as expected at key points in your test.&lt;/li&gt;
&lt;li&gt;  Automated tests often fail because they move too fast. Adding wait commands ensures the script pauses until elements are ready, preventing unnecessary failures.&lt;/li&gt;
&lt;li&gt;  Recorded scripts aren’t perfect. Instead of relying on them as-is, take the time to refine them, adding logic to handle dynamic content and edge cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;If you are just getting started with test automation, then there is nothing better than using Selenium IDE to record and playback tests. It lets you record and replay tests, which makes it ideal for accelerating repetitive tasks.&lt;/p&gt;

&lt;p&gt;That said, the record and playback feature is not without its limitations. It is good for simple tests and relatively static websites but not ideal for complex workflows or dynamic elements that update often.&lt;/p&gt;

&lt;p&gt;You’ve just learned the fundamentals; now let’s get into Selenium IDE and automate some web tests!&lt;/p&gt;

&lt;p&gt;Happy testing!&lt;/p&gt;

</description>
      <category>selenium</category>
      <category>seleniumautomation</category>
      <category>softwaretesting</category>
      <category>recordandplayback</category>
    </item>
    <item>
      <title>CSS Grid Best Practices: Guide With Examples</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Fri, 04 Oct 2024 09:03:35 +0000</pubDate>
      <link>https://forem.com/taheralam/css-grid-best-practices-guide-with-examples-ocj</link>
      <guid>https://forem.com/taheralam/css-grid-best-practices-guide-with-examples-ocj</guid>
      <description>&lt;p&gt;CSS Grid is a layout system that allows you to create complex and responsive grid-based layouts with ease. It provides a two-dimensional grid-based layout system, making it particularly powerful for handling both rows and columns.&lt;/p&gt;

&lt;p&gt;To ensure your layouts are both flexible and responsive, it’s essential to adhere to certain CSS Grid best practices. It enhances maintainability, making your code easier to understand and modify.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Grid Best Practices
&lt;/h2&gt;

&lt;p&gt;When working with &lt;a href="https://www.lambdatest.com/blog/css-grid/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=oct_4&amp;amp;utm_term=rj&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Grid&lt;/a&gt;, following best practices is key to creating responsive, maintainable layouts. Check out some of the CSS Grid best practices that you can incorporate into your web designs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Flexible Units for Grid Track Sizes
&lt;/h2&gt;

&lt;p&gt;Instead of specifying fixed pixel values for your grid track sizes, use flexible units like &lt;em&gt;fr&lt;/em&gt; or &lt;em&gt;minmax&lt;/em&gt;. This is one of the core CSS Grid best practices that will make your layout more responsive to different screen sizes.&lt;/p&gt;

&lt;p&gt;When you specify grid track sizes using fixed pixel values, you’re essentially setting a rigid structure for your layout. As screen sizes vary, fixed pixel values can lead to distorted layouts, causing elements to overlap or stretch excessively.&lt;/p&gt;

&lt;p&gt;To overcome these limitations, CSS Grid provides flexible units like &lt;em&gt;fr&lt;/em&gt; and &lt;em&gt;minmax&lt;/em&gt;, which enable your layouts to adapt gracefully to different screen sizes.&lt;/p&gt;

&lt;p&gt;These units dynamically adjust their dimensions based on the available space, ensuring that your layout remains consistent and visually appealing across various devices.&lt;/p&gt;

&lt;p&gt;For instance, in a scenario like the above, you could use &lt;em&gt;minmax()&lt;/em&gt; to say that the cards should have a minimum width of &lt;em&gt;200px&lt;/em&gt; and maximum width of &lt;em&gt;1fr&lt;/em&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;CSS Grid is a layout system that allows you to create complex and responsive grid-based layouts with ease. It provides a two-dimensional grid-based layout system, making it particularly powerful for handling both rows and columns.

To ensure your layouts are both flexible and responsive, it’s essential to adhere to certain CSS Grid best practices. It enhances maintainability, making your code easier to understand and modify.

CSS Grid Best Practices
When working with CSS Grid, following best practices is key to creating responsive, maintainable layouts. Check out some of the CSS Grid best practices that you can incorporate into your web designs.

Use Flexible Units for Grid Track Sizes
Instead of specifying fixed pixel values for your grid track sizes, use flexible units like fr or minmax. This is one of the core CSS Grid best practices that will make your layout more responsive to different screen sizes.

When you specify grid track sizes using fixed pixel values, you’re essentially setting a rigid structure for your layout. As screen sizes vary, fixed pixel values can lead to distorted layouts, causing elements to overlap or stretch excessively.

To overcome these limitations, CSS Grid provides flexible units like fr and minmax, which enable your layouts to adapt gracefully to different screen sizes.

These units dynamically adjust their dimensions based on the available space, ensuring that your layout remains consistent and visually appealing across various devices.

For instance, in a scenario like the above, you could use minmax() to say that the cards should have a minimum width of 200px and maximum width of 1fr.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.cards-container {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
 grid-gap: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the &lt;em&gt;grid-template-columns&lt;/em&gt; property uses &lt;em&gt;minmax(200px, 1fr)&lt;/em&gt; to specify that the cards should have a minimum width of &lt;em&gt;200px&lt;/em&gt; and a maximum width of &lt;em&gt;1fr&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;As a result, on smaller screens, the cards will maintain a minimum width of &lt;em&gt;200px&lt;/em&gt;, while on larger screens, they can expand to fill the available space up to a maximum width of &lt;em&gt;1fr&lt;/em&gt;. This approach ensures a flexible and responsive card layout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Appropriate Grid Structure
&lt;/h2&gt;

&lt;p&gt;Another important aspect of CSS Grid best practices is to use appropriate grid structure. When working with CSS Grid, a fundamental decision revolves around choosing between an explicit and implicit grid for defining the layout of grid items within a grid container.&lt;/p&gt;

&lt;p&gt;With an explicit grid, you have precise control over how you structure your content. However, with an implicit grid, you have less control as it adapts to content without specific column or row definitions. You can still have some degree of control, though, using properties like &lt;em&gt;grid-auto-rows&lt;/em&gt; and &lt;em&gt;grid-auto-columns&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Explicit Grid
&lt;/h3&gt;

&lt;p&gt;Explicit grids offer precise control over layout structures and foster predictability in design. It is particularly beneficial for components with fixed items, such as navigation bars or pricing cards.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/alam_tahera/pen/ZEwMNbR" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvojbzmq4tmqxssdep595.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, we used an explicit grid layout to create a pricing card component that seamlessly adapts to different screen sizes and devices.&lt;/p&gt;

&lt;p&gt;The combination of using &lt;em&gt;auto-fit&lt;/em&gt; and &lt;em&gt;minmax&lt;/em&gt; ensures that the layout adapts seamlessly to different screen sizes and devices. Since we know we want three pricing cards, we used &lt;em&gt;grid-template-columns&lt;/em&gt; to define the same.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  .pricing-container {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     gap: 25px;
     justify-content: center;
     margin: 50px;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Implicit Grid
&lt;/h3&gt;

&lt;p&gt;Implicit grids automatically adjust based on your content, making them ideal for dynamic situations where the amount of content can vary.&lt;/p&gt;

&lt;p&gt;In the below example, we have a product page that allows a user to add products dynamically by clicking the Add Product button. Each product has a name, an image, and a price.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/alam_tahera/pen/GRzXbxB" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fer80lb3oc9681mq2zoji.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here, since our elements are being dynamically generated and the amount of content can vary, we used an implicit grid in combination with an explicit grid to define the layout.&lt;/p&gt;

&lt;p&gt;First, we defined the columns explicitly using the &lt;em&gt;grid-template-columns&lt;/em&gt; property:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Here, since our elements are being dynamically generated and the amount of content can vary, we used an implicit grid in combination with an explicit grid to define the layout.

First, we defined the columns explicitly using the grid-template-columns property:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.product-list {
 grid-template-columns: repeat(
   auto-fill,
   minmax(250px, 1fr)
 ); /* Explicit grid for columns */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a flexible grid with columns that are at least &lt;em&gt;250px&lt;/em&gt; wide but can grow to occupy available space. The use of &lt;em&gt;auto-fill&lt;/em&gt; and &lt;em&gt;minmax(250px, 1fr)&lt;/em&gt; lets you create as many columns as can fit in the container, each at least *250px *wide but able to grow 1fr if there is extra space.&lt;/p&gt;

&lt;p&gt;Next, we used an implicit grid to set the size of rows because our content may have varying heights:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    grid-auto-rows: minmax(
       300px,
       auto
     ); /* Implicit grid for rows with dynamic sizing */
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This ensures that the implicit rows will have a minimum height of &lt;em&gt;300px&lt;/em&gt;, but if the content requires more space, they can grow dynamically based on the content’s height &lt;em&gt;(auto)&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;So, we combined both explicit grid (for columns) and implicit grid (for rows with dynamic sizing) in the .product-list grid container. It allows us to have a structured column layout while providing flexibility in the row heights based on the content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Select Positioning Methods
&lt;/h2&gt;

&lt;p&gt;One of the CSS Grid best practices is to carefully select positioning methods that align with your layout’s requirements.&lt;/p&gt;

&lt;p&gt;One question that arises when using grid layouts is whether to use &lt;em&gt;grid-template-area*s or *grid-template-columns/rows&lt;/em&gt; for positioning the elements. The short answer to that is to use them based on the complexity and nature of your layout.&lt;/p&gt;

&lt;p&gt;By complexity and nature of a layout, we mean that if you want your layout to be straightforward and easy to understand, especially when you have different sections with specific purposes, then it might be helpful to use &lt;em&gt;grid-template-areas&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .container {
     display: grid;
     grid-template-areas:
       "header header header"
       "nav main sidebar"
       "footer footer footer";
     min-height: 100vh;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://codepen.io/alam_tahera/pen/Jjxmpow" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsuvcvsbxhme6vji9fuvu.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, we have a layout that has a header, a navbar, a main section, a sidebar, and a footer. To name the specific sections of the layout that the grid items will occupy, we used &lt;em&gt;grid-template-areas.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In this case, it specifies three rows and three columns for the grid.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first row is for the header and spans all three columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The second row has areas for a navbar, main content, and a sidebar.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The third row is for the footer and spans all three columns.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .container {
     display: grid;
     grid-template-areas:
       "header header header"
       "nav main sidebar"
       "footer footer footer";
     min-height: 100vh;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have named grid areas, it’s time to assign elements to these areas. To place content in grid areas, we use the &lt;em&gt;grid-area&lt;/em&gt; property:&lt;/p&gt;

&lt;p&gt;This instructs the content inside the ‘specific element’ to go into the area named ‘that element’ in the grid. For instance, in the case of header, it basically says that the content inside the HTML element with the &amp;lt;&lt;em&gt;header&lt;/em&gt;&amp;gt; tag should go into the area named ‘header’ as defined in the grid template areas.&lt;/p&gt;

&lt;p&gt;Now, if you’re more about having precise control and keeping things simple, especially when it comes to the size and position of each part, then the &lt;em&gt;grid-template-columns&lt;/em&gt; or &lt;em&gt;grid-template-rows&lt;/em&gt; property is the way to go.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .container {
     display: grid;
     grid-template-columns: 1fr 2fr;
     align-items: center;
     padding: 0 60px;
     gap: 20px;
     min-height: 100vh;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://codepen.io/alam_tahera/pen/RwveJxr" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd2y8dtmimmbph18q6rmv.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above example, we have an image on the right and some text on the left. To position it, we used &lt;em&gt;grid-template-columns&lt;/em&gt; and defined two columns of &lt;em&gt;1fr&lt;/em&gt; and &lt;em&gt;2fr&lt;/em&gt;, which makes the first column take up 1 fraction of the available space and the second column take up 2.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nest Grid As Needed
&lt;/h2&gt;

&lt;p&gt;There’s a misconception that nesting grids is not good practice. However, it’s absolutely acceptable to nest grids. You can make any grid item a grid container and have grid items within it.&lt;/p&gt;

&lt;p&gt;This approach enables the creation of subgrids, providing precise control over the layout within specific areas of the parent grid. It is helpful when dealing with complex structures or nested content that might be challenging to manage using a single-grid method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .outer-grid {
     display: grid;
     grid-template-columns: repeat(3, 1fr);
     gap: 20px;
     padding: 20px;
     background-color: #fff;
     border-radius: 8px;
     box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
     margin: 20px auto;
     max-width: 800px;
    }


    .inner-grid {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 10px;
    }


    .item {
     border: 1px solid #ddd;
     padding: 20px;
     background-color: #fff;
     border-radius: 8px;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
     text-align: center;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://codepen.io/alam_tahera/pen/MWLPLOG" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe5oidait8768wz5tfd8e.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, we have a container div with the class &lt;em&gt;outer-grid&lt;/em&gt; and several child divs. Inside the &lt;em&gt;outer-grid&lt;/em&gt;, there is another div with the class &lt;em&gt;inner-grid&lt;/em&gt; that contains two additional items.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;outer-grid&lt;/em&gt; represents the main grid container, and divides its content into three columns using the &lt;em&gt;grid-template-columns.&lt;/em&gt; Inside the main &lt;em&gt;outer-grid&lt;/em&gt;, we nest another grid called the &lt;em&gt;inner-grid&lt;/em&gt;. This means we create a smaller grid within one of the columns of the main grid and divide its content into two columns.&lt;/p&gt;

&lt;p&gt;This nesting allows for a more intricate layout where certain items are grouped and follow a different grid structure compared to the items in the parent grid.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Multiple Grids on One Page
&lt;/h2&gt;

&lt;p&gt;This is something even I used to think of as a bad practice. However, contrary to popular belief, there is nothing wrong with having more than one grid on a page.&lt;/p&gt;

&lt;p&gt;Traditionally, there has been a tendency to associate a single grid with an entire layout. However, using multiple grids on a page can enhance the overall structure and flexibility of the layout.&lt;/p&gt;

&lt;p&gt;For example, you can use a grid for the main layout while using additional grids for smaller components like featured sections or sidebars. This not only simplifies the design process but also makes it easier to manage and update specific sections without affecting the entire layout.&lt;/p&gt;

&lt;p&gt;Applying grids to smaller components allows for a modular approach. Each section can have its own layout structure, making it easier to manage and update independently.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/nikkipantony/pen/vWgjBw" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdn1ny7sadphzq3cfaglc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above example shows how you can have multiple grids on one page, each with its individual layout structure and purpose.&lt;/p&gt;

&lt;p&gt;Moreover, you can also create 12-column CSS Grids. Want to know how? Refer to this blog on &lt;a href="https://www.lambdatest.com/blog/12-column-css-grid/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=oct_4&amp;amp;utm_term=rj&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;12 Column CSS Grid&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use Grid With Flexbox
&lt;/h2&gt;

&lt;p&gt;Combining Grid with Flexbox is one of the recommended CSS grid best practices. CSS Grid is useful for creating flexible and responsive layouts, but it’s not always the best solution for every situation. In some cases, it may be more effective to combine grid layout with other layout mechanisms, such as flexbox or floats.&lt;/p&gt;

&lt;p&gt;One common practice is to combine Grid with CSS Flexbox, such as in a card layout. CSS Grid sets up the primary structure of the layout, defining the overall grid and positioning of major elements. Flexbox is then used within each grid cell to manage the internal arrangement of items.&lt;/p&gt;

&lt;p&gt;While CSS Grid is good for setting up rows and columns, Flexbox is useful for neatly arranging elements in a row or column, especially when they’re different sizes.&lt;/p&gt;

&lt;p&gt;By employing both methodologies, you can use CSS Grid to provide the overall framework while relying on Flexbox to handle the finer details within each section of your layout. This combination allows you to offer a balance between high-level structure and granular control, resulting in a clean and efficient way to organize content.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://codepen.io/alam_tahera/pen/xxmVrqM" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3ez2ocgbghmdhmyvxg4s.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, we created a responsive card-based layout using CSS Grid and Flexbox.&lt;/p&gt;

&lt;p&gt;The .&lt;em&gt;grid-container&lt;/em&gt; class defines the grid layout, which starts as a single-column layout and switches to a two-column layout on screens wider than &lt;em&gt;500px *and a four-column layout on screens wider than *850px&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .grid-container {
      width: 90%;
      max-width: 1240px;
      margin: 0 auto;
      display: grid;
      grid-template-columns: 1fr;
      grid-template-rows: auto;
      grid-gap: 20px;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;em&gt;.card&lt;/em&gt; class represents the individual card component. The &lt;em&gt;.card&lt;/em&gt; element is a flex container, and it has a &lt;em&gt;flex-direction: column&lt;/em&gt; property that specifies that the flex items should be arranged in a column.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .card {
      display: flex;
      flex-direction: column;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;em&gt;.card&lt;/em&gt; article class is also a flexbox container for the card’s textual content, arranging the content in a column with even spacing between its elements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .card article {
      display: flex;
      flex: 1;
      justify-content: space-between;
      flex-direction: column;
      padding: 20px;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Confused about CSS Grid vs Flexbox? Discover which layout tool is right for your project. Read this full comparison of CSS Grid vs Flexbox now!&lt;/p&gt;

&lt;h2&gt;
  
  
  Test CSS Grids for Responsiveness
&lt;/h2&gt;

&lt;p&gt;One of the crucial CSS Grid best practices is testing CSS Grids for responsiveness. This is to ensure your layout adapts seamlessly across various screen sizes and devices. Responsive grids help maintain a consistent user experience, regardless of the device being used. By testing, you can identify and fix issues like overlapping content or poor alignment early in the development process.&lt;/p&gt;

&lt;p&gt;Tools like &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=oct_4&amp;amp;utm_term=rj&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;LT Browser&lt;/a&gt; provide a simple way to perform mobile website testing of CSS Grids on different viewports, helping you optimize your layout for a wide range of device viewports and ensure a smooth browsing experience for all users.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozsgqyl90jjb82v5odox.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fozsgqyl90jjb82v5odox.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Download LT Browser now and start testing your grid responsiveness 👇&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f7tyf67lwysxnu8hopj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8f7tyf67lwysxnu8hopj.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;CSS Grid is extremely powerful when it comes to designing modern web layouts. It allows you to create two-dimensional layouts with rows and columns by providing a more flexible and efficient way to design layouts compared to traditional methods like floats or positioning.&lt;/p&gt;

&lt;p&gt;By incorporating the CSS Grid best practices, you can leverage the full potential of CSS Grid and create flexible, responsive, and visually stunning modern web layouts.&lt;/p&gt;

&lt;p&gt;You can also check out these &lt;a href="https://www.lambdatest.com/blog/best-css-grid-layout-generators/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=oct_4&amp;amp;utm_term=rj&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Grid layout generators&lt;/a&gt; and start building stunning layouts today.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Best 20 CSS Libraries for Developers and Designers [2024]</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Fri, 16 Feb 2024 19:07:14 +0000</pubDate>
      <link>https://forem.com/testmuai/best-20-css-libraries-for-developers-and-designers-2024-56jd</link>
      <guid>https://forem.com/testmuai/best-20-css-libraries-for-developers-and-designers-2024-56jd</guid>
      <description>&lt;p&gt;In software development, there’s a famous saying: Don’t reinvent the wheel. This means that it is often smarter to use existing solutions, such as frameworks and libraries, rather than starting from scratch.&lt;/p&gt;

&lt;p&gt;When it comes to web development, CSS plays a pivotal role in shaping the visual aspects of the web. It defines how the content of a website should look. According to a report by W3Techs, CSS is used by 97.3% of all existing sites. But, despite its crucial role in web development, CSS is one of those technologies that gets a lot of criticism because of its tricky nature.&lt;/p&gt;

&lt;p&gt;Writing and maintaining CSS can be complex and time-consuming, especially for dynamic and large-scale websites. Developers often get challenges such as repetitive styling, unorganized code, browser issues, responsiveness issues, long lines of code, unexpected errors, and design-breaking issues. These challenges can lead to increased development time and frustration.&lt;/p&gt;

&lt;p&gt;CSS libraries can help developers and designers overcome these challenges by providing pre-written code and reusable components for common elements of websites. This can save time and effort, produce more organized and maintainable code, and help avoid common CSS pitfalls, making the development process faster and more efficient.&lt;/p&gt;

&lt;p&gt;In this blog, we’ll explore the best 20 CSS libraries you can leverage today. These CSS libraries cover a wide range of use cases, from helping you create amazing web designs to ensuring a uniform user experience across browsers, from providing beautiful animations to ensuring your website renders seamlessly across devices — these CSS libraries cover it all. We’ll also explore libraries with specific use cases, such as helping you create sleek demo sites or beautiful retro UIs.&lt;/p&gt;

&lt;p&gt;We will explore each of these CSS libraries, covering their features and use cases along with practical examples. So, let’s dive in.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A complete tutorial on &lt;a href="https://www.lambdatest.com/learning-hub/retesting?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;retesting&lt;/a&gt; that sheds light on its features, importance, pros and cons, and how to perform it.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What are CSS Libraries?
&lt;/h2&gt;

&lt;p&gt;CSS libraries are pre-written collections of CSS code and styles you can use to quickly and easily style your web projects. They are reusable components created by other developers to help solve common issues. It typically includes styles for common elements such as buttons, forms, and navigation bars. They may also have styles for more specialized elements, such as graphs, charts, animations, etc.&lt;/p&gt;

&lt;p&gt;The term “library” is often used interchangeably with “framework”. While both aim to make development efficient by providing pre-built solutions for common tasks, they differ. Let’s take a look at them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Libraries vs Frameworks
&lt;/h2&gt;

&lt;p&gt;As freeCodeCamp defines it best,&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Libraries are like going to Ikea: Imagine you have a house but need some furniture. You don’t want to build everything from scratch, so you go to Ikea. At Ikea, you can choose different furniture pieces like tables, chairs, and shelves. You’re in control of what you want to use, and you can arrange the furniture in your home however you like.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Frameworks are like building a model home: Suppose you want to build a brand new house. You have a set of plans or blueprints and must follow some specific rules and designs. You don’t get to decide everything. There’s a contractor in charge who follows those plans closely. They’ll tell you where you can make changes, but they mostly control how the house is built.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;In a nutshell:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;CSS libraries give you individual pieces to use as you want, like furniture from Ikea.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Frameworks provide a structured plan, and you work within that plan, like building a model home with a contractor in charge.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Using a library gives you more control over your application’s flow. You can choose which functions to use from the library, when, and where to use them. But, when using a framework, you must follow its conventions and predefined structure. The framework controls the main flow of execution and dictates how the code should be structured.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A52PrO13i9TyJix_P.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A52PrO13i9TyJix_P.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For instance, take jQuery and Ruby on Rails as examples. jQuery is a JavaScript library, while Ruby on Rails is an open-source full-stack framework. jQuery doesn’t care where you use it in your JavaScript code or how the codebase is organized in terms of files. But this isn’t the case with Ruby on Rails. You will have to follow Rails’ conventions and structure, which dictates how files, dependencies, functions, etc., should be organized.&lt;/p&gt;

&lt;p&gt;The difference between a library and a framework is that a library is a collection of code you can use to add specific features to your website. In contrast, a framework is a collection of code that you can use to build your website from scratch. Frameworks provide a complete structure and control the flow of the program, unlike libraries.&lt;/p&gt;

&lt;p&gt;Here is a table that summarizes the key differences between libraries and frameworks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Af-noPgKUpbwuPcNdVs5PaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2Af-noPgKUpbwuPcNdVs5PaA.png" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover 32 &lt;a href="https://www.lambdatest.com/blog/automation-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;top test automation tools&lt;/a&gt; in 2023 for powerful and efficient testing solutions.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Advantages of Using CSS Libraries
&lt;/h2&gt;

&lt;p&gt;CSS libraries offer an array of advantages over writing custom CSS. They provide a solid foundation for building visually appealing, responsive, and user-friendly websites while saving time, reducing errors, and promoting design consistency, ultimately reducing maintenance costs.&lt;/p&gt;

&lt;p&gt;Here are some of its advantages:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Faster development:&lt;/strong&gt; One of the primary benefits of using CSS libraries is that it significantly reduces the time to get up and running with a project. Instead of coding everything from scratch, you can use prebuilt components for different page elements. This significantly speeds up the development process.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, you can use a CSS library like Picnic instead of writing complex CSS code to create a responsive navigation menu. Picnic’s navbar component provides a fully responsive navigation bar with just a few lines of HTML and CSS classes. This saves you time and effort, letting you focus on more important things.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3100%2F0%2A5izWti1dUTzokhsY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3100%2F0%2A5izWti1dUTzokhsY.png" width="800" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency:&lt;/strong&gt; CSS libraries often come with consistently designed elements and style guidelines. This ensures a cohesive look and feel across a website, which is crucial for branding and user experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For instance, you can use CSS libraries like Blaze UI to ensure that buttons look and behave the same throughout your website, enhancing the overall user experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2340%2F0%2AvpA54ffXZGJg0lUu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2340%2F0%2AvpA54ffXZGJg0lUu.png" width="800" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Responsive design:&lt;/strong&gt; CSS libraries often include &lt;a href="https://www.lambdatest.com/learning-hub/responsive-design?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;responsive design&lt;/a&gt; features, making creating websites that adapt to different screen sizes and devices easier. This is essential for modern web development, where mobile devices generate more than 60% of global website traffic — &lt;a href="https://www.similarweb.com/platforms/" rel="noopener noreferrer"&gt;*similarweb&lt;/a&gt;*.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, you can use a CSS library like Pure CSS with a responsive grid&lt;br&gt;
system. Applying grid classes to your HTML elements allows you to create layouts that adapt to different screen sizes easily.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Try &lt;a href="https://www.lambdatest.com/ios-simulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;iOS emulator&lt;/a&gt; online by LambdaTest for free. It allows you to test your websites and webapps on latest to legacy devices, OS versions and browsers.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Below is a demonstration of a responsive layout using Pure CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A5lwpyrJv6K1NZN8f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A5lwpyrJv6K1NZN8f.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To test the responsiveness of the layout, we used LT Browser, a free and easy-to-use tool that lets you preview your website on various device viewports and screen sizes. This means you can see how your website will look and function on different devices before it goes live, ensuring a great user experience for everyone.&lt;/p&gt;

&lt;p&gt;LT Browser comes with 50+ pre-installed device viewports with different screen resolutions, so you can easily test your designs in different screen sizes. You can also create custom viewports to test specific devices or screen sizes.&lt;/p&gt;

&lt;p&gt;To use the LT Browser, you can check out the tutorial below.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rqFeuaZ-wAY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Performance optimization:&lt;/strong&gt; At a time when one in four visitors would leave a website if it takes more than four seconds to load, optimizing the performance of websites has become more important than ever. –&lt;a href="https://www.websitebuilderexpert.com/building-websites/website-load-time-statistics/" rel="noopener noreferrer"&gt;Source&lt;/a&gt;
&amp;gt;  &lt;strong&gt;Selenium &lt;a href="https://www.lambdatest.com/learning-hub/webdriverio?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;WebdriverIO&lt;/a&gt; is Javascript based test automation framework built over nodeJs. Learn with this guide how to use webdriverIO to perform web automation testing.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many CSS libraries are designed with performance in mind. They use techniques like minification and efficient CSS code to ensure that web pages load quickly. This reduces the file size and enhances the website’s loading speed, leading to a better user experience and improved SEO rankings.&lt;/p&gt;

&lt;p&gt;For example, here are the file sizes of a few popular CSS libraries, minified and gzipped:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AQ0LhK14wfuf4s8XZqWHMow.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AQ0LhK14wfuf4s8XZqWHMow.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Improved accessibility:&lt;/strong&gt; Another significant advantage of utilizing CSS libraries is their focus on accessibility. Many CSS libraries prioritize accessibility, ensuring that their styles and components comply with accessibility standards such as WCAG (Web Content Accessibility Guidelines).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These CSS libraries often incorporate best practices such as using semantic HTML, maintaining proper color contrast, and using descriptive labels for form fields. These practices are essential for creating web content that is accessible to all users, including those with disabilities. So, by using these CSS libraries, you can ensure that your website is more inclusive and usable by a wider audience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Cross Browser Compatibility&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://www.lambdatest.com/learning-hub/cross-browser-compatibility?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Cross browser compatibility &lt;/a&gt;is a significant advantage of using CSS libraries. These libraries are typically tested, providing CSS code that works consistently across web browsers. This eliminates the need to debug and &lt;a href="https://www.lambdatest.com/blog/css-browser-compatibility-issues/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;fix browser-specific&lt;/a&gt; issues, which can be time-consuming and frustrating.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;For instance, consider the CSS library Normalize.css. It’s designed to reset and normalize the default styles of various HTML elements, ensuring a consistent starting point for your web design. Using Normalize.css helps ensure that default styles are consistent across different web browsers and operating systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For example, below is a demo showcasing the implementation of Normalize.css.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AV8dHLD12u4vX8CJG.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AV8dHLD12u4vX8CJG.jpg" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover 32 &lt;a href="https://www.lambdatest.com/blog/automation-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;best automation testing tools&lt;/a&gt; in 2023 for powerful and efficient testing solutions.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Top 20 CSS Libraries
&lt;/h2&gt;

&lt;p&gt;CSS libraries are the secret sauce behind some of the most captivating and user-friendly websites on the Internet. But, choosing ideal CSS libraries for your application can be challenging. There are many factors to consider, such as ease of use, responsiveness, popularity, and accessibility.&lt;/p&gt;

&lt;p&gt;Here is a list of the best CSS libraries widely known for these qualities:&lt;/p&gt;

&lt;h2&gt;
  
  
  Animate.css
&lt;/h2&gt;

&lt;p&gt;Animations make a website feel alive. In a world with short attention spans, animations can draw users’ attention, highlight important information, guide users visually through a process, or simply make their experience more engaging.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AQ7TYJzMQ8kJbS72d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AQ7TYJzMQ8kJbS72d.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, you can use a slide-in animation like below to make content pop up nicely as a user scrolls through a page. This helps keep the user engaged and enhances their experience.&lt;/p&gt;

&lt;p&gt;**Output:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/webwitch/embed/XygwmQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Selenium is an open-source suite of tools and libraries to automate web browsers. Delve into its architecture, benefits, and more through our detailed &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium guide&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, creating animations like this can be time-consuming and complex. That’s where Animate.css comes in. It makes the process of adding animations simpler than ever before.&lt;/p&gt;

&lt;p&gt;Animate.css provides a collection of pre-made CSS animations that can be easily integrated into a project. It allows you to add animations by simply adding CSS classes to HTML elements, making it easy to incorporate eye-catching animations without having to write extensive CSS code from scratch.&lt;/p&gt;

&lt;p&gt;It is among the most popular CSS libraries, with over 79k+ Stars on GitHub and a staggering 360k+ weekly downloads on npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6uictTvfog_kCDRI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6uictTvfog_kCDRI.png" width="800" height="349"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;According to W3Techs, Animate.css is used in about 39.5% of all websites with a known CSS framework. That’s a big deal because it means nearly 10% of all the existing websites use Animate.css for their animations. Let’s now look at an example of using Animate.css.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
    /&amp;gt;


    &amp;lt;div class="container"&amp;gt;
      &amp;lt;h1 class="animate__animated animate__bounce"&amp;gt;LambdaTest&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;
        Discover the next-generation mobile apps and cross-browser testing
        cloud.
      &amp;lt;/p&amp;gt;
      &amp;lt;button class="replay-button" onclick="replayAnimation()"&amp;gt;
        Replay Animation
      &amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  background-color: #eef5ff;
  font-family: Work Sans, sans-serif;
}


.container {
  text-align: center;
}


h1 {
  font-size: 72px;
  margin: 0;
  color: #191919;
}


p {
  font-size: 1.1rem;
  color: #666666;
}


.replay-button {
  background-color: #0ebac5;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 1rem;
  margin-top: 20px;
  border-radius: 5px;
  cursor: pointer;
}


.replay-button:hover {
  background-color: #0c9ea7; /* Darker blue on hover */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/abPBGxg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Test your native app and website on real iOS and Android devices hosted on the cloud. LambdaTest is a convenient, cost-effective and centralised solution for running realtime and Automated &lt;a href="https://www.lambdatest.com/real-device-cloud?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;test on real devices&lt;/a&gt; cloud.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the example above, we used the bounce animation from Animate.css to add a bouncing effect to the &lt;em&gt;&amp;lt; h1 &amp;gt;&lt;/em&gt; element.&lt;/p&gt;

&lt;p&gt;To do it, we first included Animate.css in our project by linking its CDN in the HTML document:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet"
 href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"
    /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, we applied the animation by adding the &lt;em&gt;animate__bounce&lt;/em&gt; class to the &amp;lt; &lt;em&gt;h1&lt;/em&gt; &amp;gt; element, with the &lt;em&gt;animate__animated&lt;/em&gt; prefix. That’s it. This will give our &amp;lt; &lt;em&gt;h1&lt;/em&gt; &amp;gt; element a smooth, bouncing animation.&lt;/p&gt;

&lt;p&gt;By default, animations will trigger when the page loads and the element becomes visible in the viewport. However, you can control when animations occur using JavaScript or dynamically adding additional classes.&lt;/p&gt;

&lt;p&gt;For example, we used JavaScript to trigger the animation when the *replay *button is clicked:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class="replay-button" onclick="replayAnimation()"&amp;gt;
        Replay Animation
 &amp;lt;/button&amp;gt;

function replayAnimation() {
  const header = document.querySelector("h1");
  header.classList.remove("animate__animated", "animate__bounce");
  void header.offsetWidth; // Trigger reflow to restart the animation
  header.classList.add("animate__animated", "animate__bounce");
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Animate.css is a great choice for adding animations to web projects, especially when you need quick and simple animations without having to code them from scratch. However, using &lt;a href="https://www.lambdatest.com/blog/css-animations-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS animations&lt;/a&gt; judiciously is important, as excessive use can clutter and distract users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Animate.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ease to use:&lt;/strong&gt; Animate.css is incredibly easy to use. You simply include the library, apply the appropriate class to an HTML element, and the animation is ready to go. This makes it accessible to both beginners and experienced developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-browser compatible:&lt;/strong&gt; It is cross-browser compatible, so you can be sure your animations function perfectly on all latest and legacy browsers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; Animate.css is very lightweight, so that it won’t add a lot of bloat to your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable:&lt;/strong&gt; You can customize the animations by changing the duration, delay, and easing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Animate.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Lack of specific import options:&lt;/strong&gt; There is no way to import only the necessary animation classes. To use just a few animations across your app, you would need to install the entire collection.
&amp;gt;  &lt;strong&gt;Experience real-time &lt;a href="https://www.lambdatest.com/android-device-test?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Android device test&lt;/a&gt; online with our platform. Ensure compatibility and performance on real devices instantly. Start testing now!&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  CSS Wand
&lt;/h2&gt;

&lt;p&gt;CSS Wand is another versatile CSS library that offers an array of stunning animations you can easily incorporate into your project. It is a simple and intuitive tool that anyone can use, even if they don’t have any prior experience with CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJSegUJy_Ww-kPQOj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJSegUJy_Ww-kPQOj.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The best thing about CSS Wand is that it provides the CSS code for all the effects, which you can simply copy and paste into a project. You don’t need to install or write specific classes to apply those animations. All it takes is just the code provided by CSS Wand.&lt;/p&gt;

&lt;p&gt;As you can see below, clicking on the grow animation presents ready-made code to add to your project easily.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ALJ7mjKemAcCHIIDy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ALJ7mjKemAcCHIIDy.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS Wand provides a wide variety of animation effects, including&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Hover animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Loading animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Growing and shrinking animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Opacity animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rotation animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shape animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shadow animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Swing animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ripple animations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Press-down animations&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Perform manual or automated &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;cross browser device testing&lt;/a&gt; on 3000+ browsers online. Deploy and scale faster with the most powerful cross browser testing tool online.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is an example of using the *Grow *animation from CSS Wand that we incorporated into a card:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="card"&amp;gt;
      &amp;lt;div class="card-content"&amp;gt;
        &amp;lt;h2 class="card-title"&amp;gt;Cross-Browser Testing Made Easy&amp;lt;/h2&amp;gt;
        &amp;lt;p class="card-description"&amp;gt;
          LambdaTest is a cloud-based cross-browser testing platform that helps
          you ensure your website or web application looks and functions
          correctly across multiple browsers and devices.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="card-footer"&amp;gt;
        Learn more at
        &amp;lt;a href="https://www.lambdatest.com/" target="_blank"&amp;gt;LambdaTest&amp;lt;/a&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  font-family: Arial, sans-serif;
}
/* Style for the card container */
.card {
  width: 300px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  margin: 30px auto;
  padding: 20px;
  background-color: #ffffff;
  text-align: center;
  transition: all 0.2s ease-in-out; /* copied from CSS Wand*/
}


.card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  transform: scale(1.1); /* copied from CSS Wand*/
}


/* Style for the card title */
.card-title {
  font-size: 24px;
  margin-bottom: 10px;
  color: #333;
}


/* Style for the card description */
.card-description {
  font-size: 16px;
  color: #666;
  line-height: 1.5;
}


/* Style for the card footer */
.card-footer {
  margin-top: 20px;
  text-align: center;
}


/* Style for the link in the card footer */
.card-footer a {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
  transition: color 0.2s ease-in-out;
}


.card-footer a:hover {
  color: #0056b3;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/VwqmNjO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this example, we used the “&lt;em&gt;Grow&lt;/em&gt;” animation from CSS Wand. The animation is applied to the .&lt;em&gt;card&lt;/em&gt; class, which is used to style the card container. The animation makes the card grow in size when the user hovers over it.&lt;/p&gt;

&lt;p&gt;The important part of the CSS code is the transition*: all 0.2s ease-in-out;* and &lt;em&gt;transform: scale(1.1);&lt;/em&gt; rules. The transition rule specifies that the animation will take 0.2 seconds to complete and use the &lt;em&gt;ease-in-out&lt;/em&gt; timing function. While the transform rule specifies that the card will scale by 1.1 when the user hovers over it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this guide to &lt;a href="https://www.lambdatest.com/learning-hub/compatibility-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;device compatibility testing&lt;/a&gt;, learn how to build compatible software applications for different platforms and environments.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now that we have considered an example let’s move on to the advantages and limitations of CSS Wand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of CSS Wand:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable:&lt;/strong&gt; CSS Wand is highly customizable. You can customize the animations to your liking by adjusting the properties of the CSS code. This makes it easy to create animations that are unique and eye-catching.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to use:&lt;/strong&gt; It is very easy to incorporate. Simply hover your mouse over the elements to see the effect and click on the one you like. CSS Wand will then generate the CSS code for that animation.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of CSS Wand:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited number of animations:&lt;/strong&gt; CSS Wand is very limited in its animations, as it only provides styles for hover states and spinners.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Destyle.css
&lt;/h2&gt;

&lt;p&gt;Different browsers have different default styles for HTML elements, which can lead to inconsistencies in how web pages are displayed across browsers. This can make achieving a consistent look and feel for a website challenging.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A0TCE4cIgzKZ4YM5C.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A0TCE4cIgzKZ4YM5C.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s exactly where &lt;a href="https://nicolas-cusan.github.io/destyle.css/" rel="noopener noreferrer"&gt;Destyle.css&lt;/a&gt; comes into play. It’s a lightweight CSS reset library that removes the default styles for HTML elements. This allows you to start from a clean slate and apply your custom styles to all browsers.&lt;/p&gt;

&lt;p&gt;Destyle.css removes all of the default styles added by browsers, such as margins, padding, and font sizes, so you can be sure that your styles will look the same in all browsers. Destyle.css is a popular reset library choice with over 30k+ monthly downloads on Yarn and 9k+ weekly downloads on npm trends. It is also maintained, with 540+ Forks and 752+ Stars on GitHub, and regularly updated to support new browsers and features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJp72EAhZbZ0-Ipob.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJp72EAhZbZ0-Ipob.png" width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s look at an example to understand how an HTML page would look like when using Destyle.css:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;link href="
https://cdn.jsdelivr.net/npm/destyle.css@4.0.0/destyle.min.css
" rel="stylesheet"&amp;gt;
&amp;lt;h1&amp;gt;This is a Heading&amp;lt;/h1&amp;gt;
    &amp;lt;p&amp;gt;This is a paragraph of text.&amp;lt;/p&amp;gt;
    &amp;lt;ul&amp;gt;
        &amp;lt;li&amp;gt;Item 1&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Item 2&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Item 3&amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
  &amp;lt;a href="#"&amp;gt;This is a link&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/mdaOgXe?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example above, we have some HTML elements that represent a heading, a paragraph, an unordered list, and a link.&lt;/p&gt;

&lt;p&gt;Without Destyle.css, these elements would have default styles applied to them, such as margins, padding, and font sizes. However, because we have Destyle.css imported using the CDN, these elements will have no default styles applied to them.&lt;/p&gt;

&lt;p&gt;This means that the heading will have no margin or padding, the paragraph will have the default font size and color, the unordered list will have no bullets, and the link will have no underline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Destyle.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ensures consistency:&lt;/strong&gt; Destyle.css helps ensure browser consistency. You simply add a link to the Destyle.css file in your HTML, and it will automatically remove the default styles for all HTML elements. This ensures that your web page will look consistent across all browsers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Saves time and effort:&lt;/strong&gt; Destyle.css eliminates the need to remove the default styles for each browser manually. This can save you time and effort, especially if you are working on a large-scale website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Small in size:&lt;/strong&gt; It is made for modern browsers only, which means that it is small in size (~0.95KB). This makes it a lightweight CSS file that can be easily integrated into any website using a CDN or importing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Shortcomings of Destyle.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Can be too restrictive:&lt;/strong&gt; Destyle.css removes all of the default styles for HTML elements, which can be too restrictive for some websites. If you need to retain some of the default styles, you will need to manually add them back in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not as customizable as other CSS reset files:&lt;/strong&gt; Other CSS reset files offer more customization options than Destyle.css.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Can break some websites:&lt;/strong&gt; Destyle.css can break some websites relying on the default HTML elements styles. If you are unsure whether Destyle.css is compatible with your website, it is best to test it on a staging environment first.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Test your native app and website on real iOS and Android &lt;a href="https://www.lambdatest.com/real-device-cloud?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;devices cloud&lt;/a&gt;. LambdaTest is a convenient, cost-effective and centralised solution for running realtime and Automated test on real device cloud.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Picnic CSS
&lt;/h2&gt;

&lt;p&gt;Picnic CSS is one of the most popular recent libraries out there, with popular websites like Dribble, CodePen, and Product Hunt using it. Picnic CSS is a lightweight CSS library that is perfect for creating modern and responsive websites. It provides a set of neatly styled components ranging from buttons to cards, forms to tables, modals to navigation bars that you can easily incorporate into your project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AYRsDcb2786maJqzk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AYRsDcb2786maJqzk.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is built on top of Normalize.css, providing a solid foundation for your HTML5 markup. It is a great choice when you want to create professional and performant websites without having to write a lot of CSS code. It is also an ideal choice when you want to start a project quickly and easily, letting a library handle the UI components.&lt;/p&gt;

&lt;p&gt;Despite being released just two years ago, Picnic CSS has rapidly gained popularity. It has over 3.7k Stars on GitHub and receives over 600 weekly downloads via npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ABRQ9L0op9va9_b-K.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ABRQ9L0op9va9_b-K.png" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://npmtrends.com/picnic" rel="noopener noreferrer"&gt;*Source&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;Let’s now look at an example of using Picnic CSS to create an image tab.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      href="
https://cdn.jsdelivr.net/npm/picnic@7.1.0/picnic.min.css
"
      rel="stylesheet"
    /&amp;gt;
    &amp;lt;div class="tabs four"&amp;gt;
      &amp;lt;input id="tabC-1" type="radio" name="tabGroupC" checked /&amp;gt;
      &amp;lt;input id="tabC-2" type="radio" name="tabGroupC" /&amp;gt;
      &amp;lt;input id="tabC-3" type="radio" name="tabGroupC" /&amp;gt;
      &amp;lt;input id="tabC-4" type="radio" name="tabGroupC" /&amp;gt;
      &amp;lt;div class="row"&amp;gt;
        &amp;lt;div&amp;gt;
          &amp;lt;img
            src="https://images.unsplash.com/photo-1448375240586-882707db888b?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8Zm9yZXN0fGVufDB8fDB8fHww&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
          /&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;
          &amp;lt;img
            src="https://images.unsplash.com/photo-1509773896068-7fd415d91e2e?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTZ8fGxha2V8ZW58MHx8MHx8fDA%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
          /&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;
          &amp;lt;img
            src="https://plus.unsplash.com/premium_photo-1661884752233-eac0b5efe655?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTN8fGFpciUyMGJhbG9vbnN8ZW58MHx8MHx8fDA%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
          /&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div&amp;gt;
          &amp;lt;img
            src="https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTZ8fHN1bnNldHxlbnwwfHwwfHx8MA%3D%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
          /&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;label for="tabC-1"
        &amp;gt;&amp;lt;img
          src="https://images.unsplash.com/photo-1448375240586-882707db888b?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8Zm9yZXN0fGVufDB8fDB8fHww&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
      /&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;label for="tabC-2"
        &amp;gt;&amp;lt;img
          src="https://images.unsplash.com/photo-1509773896068-7fd415d91e2e?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTZ8fGxha2V8ZW58MHx8MHx8fDA%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
      /&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;label for="tabC-3"
        &amp;gt;&amp;lt;img
          src="https://plus.unsplash.com/premium_photo-1661884752233-eac0b5efe655?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTN8fGFpciUyMGJhbG9vbnN8ZW58MHx8MHx8fDA%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
      /&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;label for="tabC-4"
        &amp;gt;&amp;lt;img
          src="https://images.unsplash.com/photo-1470252649378-9c29740c9fa8?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTZ8fHN1bnNldHxlbnwwfHwwfHx8MA%3D%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
      /&amp;gt;&amp;lt;/label&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/YzdNdzR?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example, we created a simple and mobile-friendly image tab component. When you click on one of the tab images, it will seamlessly switch the main image to the corresponding tab, regardless of the screen size.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2604%2F0%2AEYzhsWMW-2qF-dSL.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2604%2F0%2AEYzhsWMW-2qF-dSL.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This component is implemented using a &lt;em&gt;div *element with the class tabs *four&lt;/em&gt;, which tells Picnic CSS to create a tab component with four tabs.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="tabs four"&amp;gt;
      &amp;lt;input id="tabC-1" type="radio" name="tabGroupC" checked /&amp;gt;
      &amp;lt;input id="tabC-2" type="radio" name="tabGroupC" /&amp;gt;
      &amp;lt;input id="tabC-3" type="radio" name="tabGroupC" /&amp;gt;
      &amp;lt;input id="tabC-4" type="radio" name="tabGroupC" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Inside the tabs element, there are four input elements with the type &lt;em&gt;radio *and the name *tabGroupC&lt;/em&gt;. These input elements represent the different tabs in the tab component.&lt;/p&gt;

&lt;p&gt;Next, there is a *div *element with the class row. This class tells Picnic CSS to create a row of tabs. Inside the row element, there are four div elements, each containing an image. The images represent the content of each tab.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="row"&amp;gt;
        &amp;lt;div&amp;gt;
          &amp;lt;img
            src="https://images.unsplash.com/photo-1448375240586-882707db888b?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8Zm9yZXN0fGVufDB8fDB8fHww&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
          /&amp;gt;
        &amp;lt;/div&amp;gt;..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Finally, there are four *label *elements, each with the *for *attribute set to one of the input elements. These labels represent the tab labels.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;label for="tabC-1"
        &amp;gt;&amp;lt;img
          src="https://images.unsplash.com/photo-1448375240586-882707db888b?ixlib=rb-4.0.3&amp;amp;ixid=M3wxMjA3fDB8MHxzZWFyY2h8Mnx8Zm9yZXN0fGVufDB8fDB8fHww&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60"
      /&amp;gt;&amp;lt;/label&amp;gt;..
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Picnic CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight and mobile-friendly:&lt;/strong&gt; Picnic CSS is lightweight and mobile-friendly, with a compressed size of only 10kb for a better and faster mobile load. This makes it a great choice for &lt;a href="https://www.lambdatest.com/blog/the-ultimate-guide-to-building-a-mobile-friendly-website/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;building mobile-first websites&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive:&lt;/strong&gt; It is responsive, so your website will look great on all devices, from desktops to mobile phones. This is important for ensuring that your website is accessible to everyone.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documented:&lt;/strong&gt; Picnic CSS has comprehensive documentation that makes it easy to learn and use. The documentation includes tutorials, examples, and references, making it easy to find the information you need to start with Picnic CSS.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Picnic CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited features:&lt;/strong&gt; Picnic CSS is a lightweight library, so it does not have all of the features of a full-featured CSS framework. As you may have already noticed, this library is similar to Bootstrap except that it is less versatile and less flexible.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Not as widely used as other frameworks:&lt;/strong&gt; Picnic CSS is a relatively new library, so it is not as widely used as other frameworks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This tutorial focuses on &lt;a href="https://www.lambdatest.com/learning-hub/playwright-visual-regression-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Playwright visual test&lt;/a&gt;, providing a reliable way to test web applications and ensure that they look and behave correctly across different browsers and platforms.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Balloon.css
&lt;/h2&gt;

&lt;p&gt;*Balloon.css is a toolt*ip library that lets you add tooltips to elements without writing any JavaScript code.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aqrs1_3AW3qs1xB1J.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aqrs1_3AW3qs1xB1J.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tooltips are important because they provide additional information about a UI element by explaining its function or purpose. They are a lightweight way to communicate information about a button, icon, or other element without adding a lot of text to the page.&lt;/p&gt;

&lt;p&gt;Balloon.css makes the creation of tooltips simpler than ever before. With Balloon.css, you just need to add an attribute to your preferred tooltip element, and it’s done. You can easily customize the tooltip’s position with properties like &lt;em&gt;up, down, left, right, up-left, up-right, etc&lt;/em&gt;. You can also customize its color, length, font size, etc. Balloon.css is open-source and is one of the most popular tooltip libraries with over 5k+ Stars on GitHub and a staggering 30k+ weekly downloads on npm trends. It is also maintained, with 460+ Forks on GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ABfy45bCcuHI42Tly.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ABfy45bCcuHI42Tly.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://npmtrends.com/balloon-css" rel="noopener noreferrer"&gt;*Source&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;Let’s look at an example of using Balloon.css:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      rel="stylesheet"
      href="https://unpkg.com/balloon-css/balloon.min.css"
    /&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      &amp;lt;button aria-label="Whats up!" data-balloon-pos="up" class="button"&amp;gt;
        Hover me!
      &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Style the button */
button {
  padding: 10px 45px;
  background-color: #b71212;
  color: #ffffff;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
}
/* Center the button */
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Convert Octal numbers to binary format with ease using our free online &lt;a href="https://www.lambdatest.com/free-online-tools/octal-to-binary?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Octal to Binary&lt;/a&gt; Converter tool. Perfect for developers, engineers, and students. Give it a try!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/RwEJMgZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Balloon.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; Balloon.css is a lightweight library, weighing only about 1.1KB when minified, which helps keep your load times fast.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; Balloon.css is documented with a detailed explanation of how to use the library. This makes it easy to start with Balloon.css, even if you are unfamiliar with CSS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Pure CSS, so no JavaScript dependencies:&lt;/strong&gt; It is a pure CSS library, meaning it does not require any JavaScript. This makes it a good choice for websites that want to avoid using JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly customizable:&lt;/strong&gt; Balloon.css is highly customizable, with various options available to change the appearance of the tooltips. This includes the ability to change the color, font size, position of the tooltips, etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Programmatic control:&lt;/strong&gt; It allows you to programmatically show tooltips even when user interaction isn’t happening, providing flexibility in tooltip display.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Balloon.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited compatibility with self-closing elements:&lt;/strong&gt; Balloon.css relies on pseudo-elements to render tooltips. However, self-closing elements such as &lt;em&gt;&amp;lt; img &amp;gt;, &amp;lt; input &amp;gt;,&lt;/em&gt; and &lt;em&gt;&amp;lt; hr &amp;gt;&lt;/em&gt; do not support &lt;a href="https://www.lambdatest.com/blog/handling-pseudo-elements-in-css-with-selenium/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;pseudo-elements&lt;/a&gt;. This means you can not use Balloon.css if you want tooltips for these elements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Potential conflicts with existing pseudo-elements:&lt;/strong&gt; If an element already uses pseudo-elements for other purposes, integrating Balloon.css tooltips may lead to conflicts. This is because Balloon.css also uses pseudo-elements. In such cases, careful consideration and testing are required to ensure proper functionality.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited complexity:&lt;/strong&gt; Balloon.css is designed for simple tooltips and may not be suitable for more complex tooltip requirements, such as tooltips with interactive content.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Water.css
&lt;/h2&gt;

&lt;p&gt;If you’re building a simple static web page or a quick demo site and don’t want to style it manually, you might want to consider using Water.css.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AO4lxS1PZ1Wbray6E.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AO4lxS1PZ1Wbray6E.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Water.css is a &lt;a href="https://www.lambdatest.com/blog/responsive-lightweight-css-frameworks/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;lightweight and minimalistic CSS framework&lt;/a&gt; designed to enhance the styling of simple websites without requiring you to write additional CSS classes. It’s an ideal choice when you don’t want to spend time styling a page but also don’t want the ugliness of default styles.&lt;/p&gt;

&lt;p&gt;The best thing about Water.css is that it doesn’t require any classes. You just include it in your HTML &amp;lt; *head *&amp;gt;, and it silently makes everything nicer.&lt;/p&gt;

&lt;p&gt;Water.css is a very popular choice for making simple websites, and it has almost 8k stars on GitHub. Let’s take a look at an example of using Water.css to create a page:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/water.css@2/out/light.min.css"
    /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;header&amp;gt;
      &amp;lt;h1&amp;gt;Testing Made Easy with LambdaTest&amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;Your Solution for Cross-Browser Testing&amp;lt;/p&amp;gt;
    &amp;lt;/header&amp;gt;


    &amp;lt;div class="main-content"&amp;gt;
      &amp;lt;h2&amp;gt;Introduction to LambdaTest&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;
        LambdaTest is a cloud-based testing platform that makes it easy for
        developers and testers to ensure their web applications work seamlessly
        across various browsers and operating systems.
      &amp;lt;/p&amp;gt;
      &amp;lt;img
        src="https://www.lambdatest.com/resources/images/main/home_banner.webp"
        alt="lambdatest-home-banner"
      /&amp;gt;
      &amp;lt;h2&amp;gt;Key Features&amp;lt;/h2&amp;gt;
      &amp;lt;ul&amp;gt;
        &amp;lt;li&amp;gt;Real-time testing on 2000+ browsers and devices.&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Automated testing with Selenium and other frameworks.&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Integrated debugging tools for quick issue resolution.&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Collaboration features for cross-functional teams.&amp;lt;/li&amp;gt;
        &amp;lt;li&amp;gt;Test your locally hosted web pages.&amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;


      &amp;lt;h2&amp;gt;Try LambdaTest Today!&amp;lt;/h2&amp;gt;
      &amp;lt;p&amp;gt;
        Ready to streamline your testing process? Click the button below to sign
        up for a LambdaTest account and start testing your web applications
        effortlessly.
      &amp;lt;/p&amp;gt;
      &amp;lt;a href="https://www.lambdatest.com/" class="btn" target="_blank"
        &amp;gt;Get Started with LambdaTest&amp;lt;/a
      &amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Don’t waste time decoding binary data manually. Try our &lt;a href="https://www.lambdatest.com/free-online-tools/binary-to-text?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Binary to Text&lt;/a&gt; Converter tool to convert binary data to text. No more tedious manual conversion needed!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/abPwdyw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example above, we just included Water.css CDN in &amp;lt; *head *&amp;gt; and boom! All the styles become incredibly neat and nicer without writing a single line of CSS! Isn’t it incredible?&lt;/p&gt;

&lt;p&gt;To surprise you even more, Water.css is fully responsive, so you get a responsive page that works seamlessly on all devices without writing any media queries.&lt;/p&gt;

&lt;p&gt;To help you visualize better, below are two screenshots of the above demo with and without using Water.css.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A8_WImWJbjDhXrzOb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A8_WImWJbjDhXrzOb.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;With Water.css&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AXmDzKK6nm96KZg-g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AXmDzKK6nm96KZg-g.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Without Water.css&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Water.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Easy to use:&lt;/strong&gt; Water.css is easy to use, even for beginners. You don’t need to incorporate any classes or dependencies for using water.css. You just stick one of these in HTML , and you are done.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AW_GTVS22nkW60WWHTepO2A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F1%2AW_GTVS22nkW60WWHTepO2A.png" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; Water.css is only 2 KB in size, which means it will not slow down your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive:&lt;/strong&gt; Water.css comes with out-of-the-box responsiveness, so your pages look great on any device.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dark mode support:&lt;/strong&gt; Water.css supports dark mode so that you can choose the preferred mode.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Water.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not ideal for complex websites:&lt;/strong&gt; Water.css can only be used for simple/static websites. Unfortunately, building complex, interactive websites is not possible with this library.
&amp;gt;  &lt;strong&gt;Looking for a way to convert CSV to XML? Use our &lt;a href="https://www.lambdatest.com/free-online-tools/csv-to-xml?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;CSV to XML&lt;/a&gt; converter tool to convert CSV files to XML format effortlessly. Get fast and accurate results with just a few clicks.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Hover.css
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.lambdatest.com/blog/css-hover-effects/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Hover effects&lt;/a&gt; are a great way to enhance user experience and add interactivity to a website.&lt;/p&gt;

&lt;p&gt;When a user hovers their mouse over an element, having a subtle effect can provide immediate visual feedback, indicating that the element is interactive. This feedback helps users understand that they can click, tap, or interact with that element, which is crucial for user interface design.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/q-WoTPmYESc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;However, creating neat hover effects for various elements can be time-consuming. That’s where Hover.css comes into play. Hover.css is a collection of pre-designed animations and transitions that you can easily apply to elements like links, buttons, logos, SVGs, images, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJbC9TcGvZKk2zmNN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJbC9TcGvZKk2zmNN.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Hover.css, you can effortlessly make buttons grow when hovered over, images zoom in, backgrounds change color from left to right, navigation menus dynamic with a bounce, form inputs respond to user actions with a subtle pulse, and even add flair to social media icons.&lt;/p&gt;

&lt;p&gt;When it comes to incorporating Hover.css in your project, you have more than one option of adding it. You can either copy and paste a specific effect’s CSS code into your stylesheet or reference the entire Hover.css stylesheet.&lt;/p&gt;

&lt;p&gt;When to opt for which?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Copy and Paste an Effect:&lt;/strong&gt; If you only plan to use a few effects, it’s a good practice to copy and paste the effect into your own stylesheet, reducing the need for users to download the entire Hover.css file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, let’s say you want to use the “&lt;em&gt;Grow&lt;/em&gt;” effect:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Download Hover.css.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In css/hover.css, find the Grow CSS code, which is clearly marked with a comment.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AqOq9GzZzXrJrfYyt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AqOq9GzZzXrJrfYyt.png" width="800" height="791"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Copy the effect and paste it into your own stylesheet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In your HTML file where you want the effect to appear, add the class “&lt;em&gt;.hvr-grow&lt;/em&gt;” to the chosen element:&lt;/p&gt;

&lt;p&gt;Submit&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;**Reference Hover.css: **If you plan to use many Hover.css effects, it is ideal to reference the entire Hover.css stylesheet.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Download &lt;em&gt;hover-min.css.&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add &lt;em&gt;hover-min.css&lt;/em&gt; to your website’s files, typically in a directory named css.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Link the &lt;em&gt;hover-min.css&lt;/em&gt; in the &amp;lt; head &amp;gt; section of the HTML page where you want to apply the Hover.css effects.&lt;/p&gt;




&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Assuming you want to use the &lt;em&gt;Grow *effect in the HTML file, add the class of *.hvr-grow&lt;/em&gt; to your chosen element.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hover.css is among the most popular CSS libraries, with over 28.9k+ Stars on GitHub and almost 4,000 weekly downloads through npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AREOGeeV4c2kHosPe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AREOGeeV4c2kHosPe.png" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s now look at an example of using Hover.css in a navigation menu:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;nav class="navbar"&amp;gt;
      &amp;lt;div class="navbar-logo"&amp;gt;
        &amp;lt;img
          src="https://www.lambdatest.com/resources/images/logos/logo.svg"
          alt="lambdatest"
        /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;ul class="navbar-items"&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/feature"
            class="navbar-link"
            target="_blank"
            &amp;gt;Platform&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/enterprise"
            class="navbar-link"
            target="_blank"
            &amp;gt;Enterprise&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/blog"
            class="navbar-link"
            target="_blank"
            &amp;gt;Resources&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/support/docs/getting-started-with-lambdatest-automation/"
            class="navbar-link"
            target="_blank"
            &amp;gt;Developers&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://billing.lambdatest.com/billing/plans"
            class="navbar-link"
            target="_blank"
            &amp;gt;Pricing&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;
      &amp;lt;ul class="navbar-items"&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://accounts.lambdatest.com/dashboard"
            class="navbar-link"
            target="_blank"
            &amp;gt;Dashboard&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item"&amp;gt;
          &amp;lt;a 
            href="https://billing.lambdatest.com/billing/plans"
            class="navbar-button"
            target="_blank"
            id="upgrade"
            &amp;gt;Upgrade&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/demo"
            target="_blank"
            class="navbar-button"
            id="bookDemo"
            &amp;gt;Book a Demo&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


/* Navbar styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-family: Arial, sans-serif;
  color: #333333;
  background-color: #eef5ff;
}


.navbar-logo {
  margin-right: 20px;
}
img {
  height: 35px;
}


.navbar-items {
  display: flex;
  align-items: center;
}


.navbar-item {
  margin-right: 20px;
}


.navbar-item:last-child {
  margin-right: 0;
}


.navbar-link {
  text-decoration: none;
  color: inherit;
  padding: 0 5px;
}


.navbar-button {
  text-decoration: none;
  font-weight: bold;
  color: inherit;
  padding: 12px 16px;
  border-radius: 5px;
}
#bookDemo {
  background-color: linear-gradient(91.88deg, #2c57f3 0.88%, #a506d8 98.71%);
  background-image: linear-gradient(
    91.88deg,
    rgb(44, 87, 243) 0.88%,
    rgb(165, 6, 216) 98.71%
  );
  background-position-x: initial;
  background-position-y: initial;
  background-size: initial;
  background-attachment: initial;
  background-origin: initial;
  background-clip: initial;
  color: #fff;
}
#upgrade {
  border: 1.5px solid #2c57f3;
  padding: 10px 16px;
}
/* Underline From Center */
.hvr-underline-from-center {
  display: inline-block;
  position: relative;
  padding-bottom: 7px;
}


.hvr-underline-from-center:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background: #333333;
  height: 3px;
  width: 0;
  transition: width 0.3s ease-out;
}
.hvr-underline-from-center:hover:before,
.hvr-underline-from-center:focus:before,
.hvr-underline-from-center:active:before {
  width: 100%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Make the conversion from &lt;a href="https://www.lambdatest.com/free-online-tools/yaml-to-json?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;YAML to JSON&lt;/a&gt; quick and easy with our free online converter YAML to JSON converter tool. No signup or installation required. Try it now!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/MWZoQYp?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example above, we have a navbar with a few links inside it. On hovering over each link element, we want to show an underline that transitions from the center. So, we utilized the underline from the center effect from Hover.css.&lt;/p&gt;

&lt;p&gt;However, in the original effect, there’s no space between the element and the underline, so we customized the effect to fit our needs where we have some space between the element and the underline. This ability to customize styles makes Hover.css an excellent choice for adding unique effects that apply to our own project requirements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Hover.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to use:&lt;/strong&gt; Hover.css is a self-contained library, so you can easily copy and paste the effects you want to use in your own stylesheet.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wide browser support:&lt;/strong&gt; Hover.css supports a wide range of browsers, including Chrome, Firefox, Safari, Edge, and Opera.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable:&lt;/strong&gt; You can customize the hover effects to fit your needs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Hover.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not all effects are supported in older browsers:&lt;/strong&gt; Some of the hover effects in Hover.css rely on &lt;a href="https://www.lambdatest.com/blog/css3-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS3&lt;/a&gt; features that are not supported in older browsers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Performance issue:&lt;/strong&gt; While Hover.css simplifies adding animations, too many hover effects on a single page can increase the page’s load time. It can also make your website look cluttered and distracting.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Simplify the process of converting &lt;a href="https://www.lambdatest.com/free-online-tools/json-to-html?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;JSON to HTML&lt;/a&gt; with our efficient online JSON to HTML converter to convert your JSON data to HTML code quickly and easily.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  pattern.css
&lt;/h2&gt;

&lt;p&gt;pattern.css is a collection of stunningly beautiful patterns that you can easily incorporate into your projects. You can apply those patterns as hero backgrounds, text fills, separators, and more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASQ3rSa6VWl-boF-O.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASQ3rSa6VWl-boF-O.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It provides various patterns, including horizontal and vertical lines, checks, zigzags, dots, cross dots, grids, diagonal patterns, horizontal stripes, vertical stripes, etc. It is also highly customizable and allows you to change the size of each pattern with Bootstrap-like classes such as &lt;em&gt;sm, md, lg, xl,&lt;/em&gt; etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2690%2F0%2AERmKaxDlUOticMu5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2690%2F0%2AERmKaxDlUOticMu5.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that pattern.css is built with two colors only — &lt;em&gt;transparent&lt;/em&gt; and &lt;em&gt;currentColor. currentColor&lt;/em&gt; is the current active text color inside an element. To change the color, just change the text color property. To change the other color, just change the background color, and the background color will be visible through a transparent color&lt;/p&gt;

&lt;p&gt;pattern.css is open source, with over 3.8k Stars and 100+ Forks on GitHub. It also has 900+ weekly downloads, according to npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AXIXQJoNLE_-Ox1ps.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AXIXQJoNLE_-Ox1ps.png" width="800" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s consider an example of using pattern.css to create a hero page:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link href="https://unpkg.com/pattern.css" rel="stylesheet" /&amp;gt;
    &amp;lt;div class="container pattern-vertical-lines-md"&amp;gt;
      &amp;lt;h1 class=""&amp;gt;
        Next-Generation Mobile Apps and &amp;lt;br /&amp;gt;
        Cross Browser &amp;lt;span&amp;gt;Testing Cloud&amp;lt;/span&amp;gt;
      &amp;lt;/h1&amp;gt;
      &amp;lt;p&amp;gt;
        Deliver unparalleled digital experience with our next-gen AI-powered
        testing cloud platform. Ensure exceptional user experience across all
        devices and browsers.
      &amp;lt;/p&amp;gt;
      &amp;lt;button&amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/" target="_blank"&amp;gt;Try now&amp;lt;/a&amp;gt;
      &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Roboto, sans-serif;
}
.container {
  color: #fde482;
  background-color: #facb0e;
  padding: 4em;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
h1 {
  font-size: 3rem;
  color: #000;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.4;
}


span {
  background: linear-gradient(180deg, rgba(250, 255, 255, 0) 50%, #00b4d8 50%);
}
p {
  color: #333;
  width: 60%;
  text-align: center;
  line-height: 1.4;
  font-size: 1.1rem;
  margin-bottom: 25px;
}


button {
  padding: 15px;
  width: 200px;
  font-size: 1rem;
  background-color: #111111;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: capitalize;
}
a {
  text-decoration: none;
  color: inherit;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Want to convert ASCII to hexadecimal? With our &lt;a href="https://www.lambdatest.com/free-online-tools/ascii-to-hex?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;ASCII to hex&lt;/a&gt; converter to convert text to its hexadecimal equivalent. Get started today and streamline your workflow!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/GRPMvPG?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example above, we utilized pattern.css to add vertical lines pattern background to our hero page. To begin with, we first imported the pattern.css library using a CDN within the HTML document.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link href="https://unpkg.com/pattern.css" rel="stylesheet" /&amp;gt;
&amp;lt;div class="container pattern-vertical-lines-md"&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The main HTML content is enclosed in the &lt;em&gt;&amp;lt; div &amp;gt;&lt;/em&gt; element with the class .container. To generate a background with vertical lines, we use the pattern.&lt;em&gt;css pattern-vertical-lines-md&lt;/em&gt; class on the container element. This class applies a vertical line pattern to the element with a medium size.&lt;/p&gt;

&lt;p&gt;To define the color of the pattern, we set color and background-color properties to the container element.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
color: #fde482;
background-color: #facb0e;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;As we mentioned earlier, you can also use patterns to fill texts, to make separators, or to create a subtle border effect around images. Here’s an example of a border around the image:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2074%2F0%2AkBQdQNwnoYqhjJhf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2074%2F0%2AkBQdQNwnoYqhjJhf.png" width="800" height="563"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of pattern.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to use:&lt;/strong&gt; It is easy to use, even if you have no prior knowledge of CSS. Simply include the pttern.css stylesheet in your HTML document and add pattern.css classes to your HTML elements to apply the desired patterns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compatible with frameworks like Bootstrap:&lt;/strong&gt; It can be used alongside &lt;a href="https://www.lambdatest.com/blog/best-css-frameworks/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS frameworks&lt;/a&gt;, such as Bootstrap. This allows the mixing and matching of different CSS components to create unique and custom designs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dynamic patterns:&lt;/strong&gt; pattern.css patterns are not static PNG files but CSS code. This means you can customize the patterns to match your preferences, such as color, size, and opacity.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of pattern.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited compatibility with other CSS frameworks:&lt;/strong&gt; pattern.css does not support or with other popular CSS frameworks, such as &lt;a href="https://www.lambdatest.com/blog/tailwind-css/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Tailwind CSS&lt;/a&gt;. This can be a limitation for users who want to use pattern.css in conjunction with other CSS frameworks.
&amp;gt;  &lt;strong&gt;Make your data tamper-proof with our &lt;a href="https://www.lambdatest.com/free-online-tools/whirlpool-hash-calculator?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Whirlpool Hash Calculator&lt;/a&gt;. Create secure hashes quickly and easily with just a few clicks. Try it out now!&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Fluiditype
&lt;/h2&gt;

&lt;p&gt;In today’s digital landscape, the significance of responsive web design cannot be emphasized. It plays a pivotal role in ensuring that websites adjust seamlessly to an array of screen sizes and devices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AFvDkHfW3-gBSyXSQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AFvDkHfW3-gBSyXSQ.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A key aspect of this responsive design is &lt;a href="https://www.lambdatest.com/blog/css-typography-and-encoding/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;typography in CSS&lt;/a&gt;. You want to make sure that the text on your website is always readable, regardless of the screen size. This is especially important for text-based websites like blogs, documentation, and eCommerce websites.&lt;/p&gt;

&lt;p&gt;Traditional CSS methods for setting font size using fixed values, such as with &lt;em&gt;pixels&lt;/em&gt;, can make it challenging to achieve responsive typography. This is because the same font size may be too large or too small on different devices and screen sizes.&lt;/p&gt;

&lt;p&gt;That’s where Fluiditype comes in. It is a small CSS library that helps you create fluid typography. Fluid typography is a design approach that allows the size of your text to adapt based on the viewport’s width. This means that your text will always be readable, regardless of the device or screen size on which your users view your website.&lt;/p&gt;

&lt;p&gt;Fluiditype works by using the &lt;em&gt;vw&lt;/em&gt; unit, which stands for viewport width. The &lt;em&gt;vw&lt;/em&gt; unit is a relative unit, meaning that when you set the font size of an element to 1*vw*, it will be equal to 1% of the viewport width.&lt;/p&gt;

&lt;p&gt;An important thing to note is that Fluiditype works only on elements that are directly linked to the typography on your page. For example, elements like headings (h1 — h6), paragraphs, text styles (blockquotes, bold, underline), lists (ordered and unordered), code snippets, links, and hyperlinks will be affected by Fluiditype.&lt;/p&gt;

&lt;p&gt;Below is an example of using Fluiditype:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/bkirov/embed/BayBbdB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Hamburgers
&lt;/h2&gt;

&lt;p&gt;Hamburger menus are a popular way to display navigation links on mobile devices and smaller screens. They are also becoming increasingly popular on desktop websites, as they can be used to create a more compact and minimalistic navigation bar.&lt;/p&gt;

&lt;p&gt;However, creating hamburger menus with beautiful, subtle animations can be time-consuming. That’s where Hamburgers library comes in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AIU_eHb_etnAQU8ZD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AIU_eHb_etnAQU8ZD.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hamburgers provide a collection of animated hamburgers that you can use to create a beautiful and responsive hamburger menu for your website. The subtle animation of the hamburger can significantly enhance the user experience of your website.&lt;/p&gt;

&lt;p&gt;Additionally, Hamburgers is modular and customizable, so you can easily change the appearance of your hamburger menu to match your website’s design.&lt;/p&gt;

&lt;p&gt;Hamburgers are popular for creating animated hamburgers with over 16k+ weekly downloads on npm trends and almost 8k Stars on GitHub.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AMLqTxAfsnidbRjAy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AMLqTxAfsnidbRjAy.png" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Need to create MD5 hashes quickly? Our &lt;a href="https://www.lambdatest.com/free-online-tools/md5-hash-calculator?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;MD5 hash calculator&lt;/a&gt; create reliable, one-way hashes quickly and keep your information secure. Try it out now!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s look at an example of using Hamburgers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;nav class="navbar"&amp;gt;
      &amp;lt;button class="hamburger hamburger--squeeze" type="button"&amp;gt;
        &amp;lt;span class="hamburger-box"&amp;gt;
          &amp;lt;span class="hamburger-inner"&amp;gt; &amp;lt;/span&amp;gt;
        &amp;lt;/span&amp;gt;
      &amp;lt;/button&amp;gt;
      &amp;lt;div class="navbar-logo"&amp;gt;
        &amp;lt;img
          src="https://www.lambdatest.com/resources/images/logos/logo.svg"
          alt="lambdatest"
        /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;ul class="navbar-items"&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/feature"
            class="navbar-link"
            target="_blank"
            &amp;gt;Platform&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/enterprise"
            class="navbar-link"
            target="_blank"
            &amp;gt;Enterprise&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/blog"
            class="navbar-link"
            target="_blank"
            &amp;gt;Resources&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://www.lambdatest.com/support/docs/getting-started-with-lambdatest-automation/"
            class="navbar-link"
            target="_blank"
            &amp;gt;Developers&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://billing.lambdatest.com/billing/plans"
            class="navbar-link"
            target="_blank"
            &amp;gt;Pricing&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;
      &amp;lt;ul class="navbar-items" id="second-list"&amp;gt;
        &amp;lt;li class="navbar-item hvr-underline-from-center"&amp;gt;
          &amp;lt;a 
            href="https://accounts.lambdatest.com/dashboard"
            class="navbar-link"
            target="_blank"
            &amp;gt;Dashboard&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item btn" id="upgrade"&amp;gt;
          &amp;lt;a href="https://billing.lambdatest.com/billing/plans" target="_blank"
            &amp;gt;Upgrade&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
        &amp;lt;li class="navbar-item btn" id="bookDemo"&amp;gt;
          &amp;lt;a href="https://www.lambdatest.com/demo" target="_blank"
            &amp;gt;Book a Demo&amp;lt;/a
          &amp;gt;
        &amp;lt;/li&amp;gt;
      &amp;lt;/ul&amp;gt;
    &amp;lt;/nav&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}


/* Navbar styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  font-family: Arial, sans-serif;
  color: #333333;
  background-color: #eef5ff;
}


.navbar-logo {
  margin-right: 20px;
}
img {
  height: 35px;
}


.navbar-items {
  display: flex;
  align-items: center;
}


.navbar-item {
  margin-right: 20px;
}


.navbar-item:last-child {
  margin-right: 0;
}


.navbar-link {
  text-decoration: none;
  color: inherit;
  padding: 0 5px;
}


.btn {
  text-decoration: none;
  font-weight: bold;
  color: inherit;
  padding: 12px 16px;
  border-radius: 5px;
}
.btn a {
  text-decoration: none;
  color: inherit;
}
#bookDemo {
  background-color: linear-gradient(91.88deg, #2c57f3 0.88%, #a506d8 98.71%);
  background-image: linear-gradient(
    91.88deg,
    rgb(44, 87, 243) 0.88%,
    rgb(165, 6, 216) 98.71%
  );
  background-position-x: initial;
  background-position-y: initial;
  background-size: initial;
  background-attachment: initial;
  background-origin: initial;
  background-clip: initial;
  color: #fff;
}
#upgrade {
  border: 1.5px solid #2c57f3;
  padding: 10px 16px;
}


/* hamburger menu */
.hamburger {
  padding: 15px 15px;
  display: none;
  cursor: pointer;
  transition-property: opacity, filter;
  transition-duration: 0.15s;
  transition-timing-function: linear;
  font: inherit;
  color: inherit;
  text-transform: none;
  background-color: transparent;
  border: 0;
  margin: 0;
  overflow: visible;
  position: absolute;
  right: 0;
  top: 6px;
}
.hamburger:hover {
  opacity: 0.7;
}
.hamburger.is-active:hover {
  opacity: 0.7;
}
.hamburger.is-active .hamburger-inner,
.hamburger.is-active .hamburger-inner::before,
.hamburger.is-active .hamburger-inner::after {
  background-color: #000;
}


.hamburger-box {
  width: 40px;
  height: 24px;
  display: inline-block;
  position: relative;
}


.hamburger-inner {
  display: block;
  top: 50%;
  margin-top: -2px;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 40px;
  height: 4px;
  background-color: #000;
  border-radius: 4px;
  position: absolute;
  transition-property: transform;
  transition-duration: 0.15s;
  transition-timing-function: ease;
}
.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  display: block;
}
.hamburger-inner::before {
  top: -10px;
}
.hamburger-inner::after {
  bottom: -10px;
}


.hamburger--squeeze .hamburger-inner {
  transition-duration: 0.075s;
  transition-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
}
.hamburger--squeeze .hamburger-inner::before {
  transition: top 0.075s 0.12s ease, opacity 0.075s ease;
}
.hamburger--squeeze .hamburger-inner::after {
  transition: bottom 0.075s 0.12s ease,
    transform 0.075s cubic-bezier(0.55, 0.055, 0.675, 0.19);
}


.hamburger--squeeze.is-active .hamburger-inner {
  transform: rotate(45deg);
  transition-delay: 0.12s;
  transition-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
}
.hamburger--squeeze.is-active .hamburger-inner::before {
  top: 0;
  opacity: 0;
  transition: top 0.075s ease, opacity 0.075s 0.12s ease;
}
.hamburger--squeeze.is-active .hamburger-inner::after {
  bottom: 0;
  transform: rotate(-90deg);
  transition: bottom 0.075s ease,
    transform 0.075s 0.12s cubic-bezier(0.215, 0.61, 0.355, 1);
}


@media only screen and (max-width: 768px) {
  .hamburger {
    display: inline-block;
  }
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
  }


  .navbar-logo {
    margin-right: 0;
    margin-bottom: 20px;
  }
  .navbar-items {
    flex-direction: column;
    align-items: start;
    display: none;
  }
  .navbar-items.menu-active {
    display: flex;
  }
  .navbar-item {
    margin-right: 0;
    margin-bottom: 10px;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;JavaScript:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// select .hamburger
const hamburger = document.querySelector(".hamburger");
// Select menu container
const menuContainer = document.querySelectorAll(".navbar-items");


// On click
hamburger.addEventListener("click", function () {
  // Toggle class "is-active"
  hamburger.classList.toggle("is-active");
  // Toggle 'menu-active' class on the menu container to show/hide it
  menuContainer.forEach(function (container) {
    container.classList.toggle("menu-active");
  });
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/MWZoQYp?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Stop worrying about data security. Our &lt;a href="https://www.lambdatest.com/free-online-tools/sha512-hash-calculator?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;SHA512 hash calculator&lt;/a&gt; can help you protect your information from unauthorized access. Create secure hashes quickly and easily.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this example, we used the squeeze hamburger from Hamburgers library, which is a responsive hamburger menu that collapses into a three-line icon on smaller screens, to display the navigation links.&lt;/p&gt;

&lt;p&gt;To use Hamburgers, we first need to download and include the CSS file in the &amp;lt; &lt;em&gt;head&lt;/em&gt; &amp;gt; of the HTML document like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link href=”dist/hamburgers.css” rel=”stylesheet” /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note that, for the purpose of this example, I just copied related CSS from the dist folder.&lt;br&gt;
Once we have linked the file, we will add the base hamburgers markup to the HTML, followed by the class name of the type of hamburger we want to use:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button class="hamburger hamburger - squeeze" type="button"&amp;gt;
&amp;lt;span class="hamburger-box"&amp;gt;
&amp;lt;span class="hamburger-inner"&amp;gt; &amp;lt;/span&amp;gt;
&amp;lt;/span&amp;gt;
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this case, we wanted to use the “&lt;em&gt;Squeeze&lt;/em&gt;” hamburger, so we added &lt;em&gt;hamburger–squeeze&lt;/em&gt; to it. Next, we modify the navbar style for smaller screens using properties like flex-direction: column; which will make navbar items stack vertically.&lt;/p&gt;

&lt;p&gt;Lastly, we toggle the active class on click of the hamburger icon using JavaScript:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// On click
hamburger.addEventListener("click", function () {
// Toggle class "is-active"
hamburger.classList.toggle("is-active");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;With this, we have an animated hamburger menu that will be visible on smaller screens, which users can toggle to see the navigation links.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Hamburgers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sass and Rails support:&lt;/strong&gt; The Hamburgers library provides source files for Sass, a popular CSS precompiler. It is also available as a Ruby gem for Rails applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modular:&lt;/strong&gt; The Hamburgers library is modular, so you can download and include only the library parts you need.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to use and customize:&lt;/strong&gt; The Hamburgers library is easy to use and customize. It includes various hamburger types to choose from, and you can easily change the appearance of your hamburger to match your website’s design.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Hamburgers:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Can be challenging to debug:&lt;/strong&gt; If something goes wrong with your hamburger menu, it can be difficult to debug the issue. This is because the Hamburgers library uses a lot of CSS animations, which can be challenging to track down and fix.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No JavaScript:&lt;/strong&gt; The Hamburgers library only provides the CSS styling for the hamburger menu. You will need to write your own JavaScript to toggle the menu open and close.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Limited browser support:&lt;/strong&gt; The Hamburgers library is not supported in older browsers like Internet Explorer 9 and Opera Mini.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Want to compare two texts side-by-side? Our free online &lt;a href="https://www.lambdatest.com/free-online-tools/difference-checker?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Difference Checker&lt;/a&gt; helps you quickly compare two texts and highlight the differences in seconds.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Pure CSS
&lt;/h2&gt;

&lt;p&gt;Pure CSS is a lightweight library that provides a set of basic CSS modules for building responsive, accessible, cross-browser-compatible websites and web applications. It is a good choice for projects where speed and performance are important, or you need complete control over the CSS.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AQ365R_AK4bbE_Kyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AQ365R_AK4bbE_Kyw.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pure CSS uses a &lt;a href="https://www.lambdatest.com/blog/mobile-first-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;mobile-first approach&lt;/a&gt;, which makes it an excellent choice for projects where you need to focus on mobile devices. It includes modules for forms, buttons, menus, tables, navigation bars, etc. These modules come with out-of-box responsiveness, automatically adapting to various screen sizes and devices. Pure CSS is built on top of Normalize.css, which will fix cross-browser compatibility issues for you.&lt;/p&gt;

&lt;p&gt;The best thing about Pure CSS is that it’s incredibly lightweight, weighing just 3.5KB when minified and gzipped. This means that it will not slow down your website. Pure CSS is also very unopinionated, so you can easily customize it to match your design.&lt;/p&gt;

&lt;p&gt;Pure CSS is one of the most popular choices for building fast and performant websites, with over 23.2k+ Stars on GitHub and 21k+ weekly downloads on npm trends. It’s also used by several websites, such as Speedtest, Flickr, and Pixaby.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AhCTf1HdBpx-akrhR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AhCTf1HdBpx-akrhR.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tired of manually &lt;a href="https://www.lambdatest.com/free-online-tools/sorting-list?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;sorting list&lt;/a&gt;? Sort any list of names, strings, or numbers with our hassle-free online sorting tool. Try our automated list sorting tool now!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s look at an example of using Pure CSS to create a pricing page:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css"
      integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls"
      crossorigin="anonymous"
    /&amp;gt;
    &amp;lt;link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/grids-responsive-min.css"
    /&amp;gt;
    &amp;lt;div class="banner"&amp;gt;
      &amp;lt;h1 class="banner-head"&amp;gt;
        LambdaTest Manual Testing Pricing.&amp;lt;br /&amp;gt;
        Try before you buy.
      &amp;lt;/h1&amp;gt;
    &amp;lt;/div&amp;gt;


    &amp;lt;div class="pricing-container"&amp;gt;
      &amp;lt;div class="pricing-tables pure-g"&amp;gt;
        &amp;lt;div class="pure-u-1 pure-u-md-1-3"&amp;gt;
          &amp;lt;div class="pricing-table pricing-table-free"&amp;gt;
            &amp;lt;div class="pricing-table-header"&amp;gt;
              &amp;lt;h2&amp;gt;Free&amp;lt;/h2&amp;gt;


              &amp;lt;span class="pricing-table-price"&amp;gt;
                $0 &amp;lt;span&amp;gt;per month&amp;lt;/span&amp;gt;
              &amp;lt;/span&amp;gt;
            &amp;lt;/div&amp;gt;


            &amp;lt;ul class="pricing-table-list"&amp;gt;
              &amp;lt;li&amp;gt;Live real time testing&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;200+ Desktop Browsers&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;10 Screenshot Tests per month&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;10 Responsive Test per month&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;3 sessions of Native App Testing on Emulators/Simulators&amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;


            &amp;lt;a 
              class="button-choose pure-button"
              href="https://www.lambdatest.com/pricing"
              target="_blank"
              &amp;gt;Choose&amp;lt;/a
            &amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;


        &amp;lt;div class="pure-u-1 pure-u-md-1-3"&amp;gt;
          &amp;lt;div class="pricing-table pricing-table-biz pricing-table-selected"&amp;gt;
            &amp;lt;div class="pricing-table-header"&amp;gt;
              &amp;lt;h2&amp;gt;Live&amp;lt;/h2&amp;gt;


              &amp;lt;span class="pricing-table-price"&amp;gt;
                $15 &amp;lt;span&amp;gt;per month &amp;lt;/span&amp;gt;
              &amp;lt;/span&amp;gt;
            &amp;lt;/div&amp;gt;


            &amp;lt;ul class="pricing-table-list"&amp;gt;
              &amp;lt;li&amp;gt;Unlimited Live Real Time Testing&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;3000+ Desktop Browsers&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Unlimited Screenshot Testing&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Unlimited Responsive Testing&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Emulators / Simulators for web and app testing&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Geolocation Testing&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Web and mobile debugging tools&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Integrate with JIRA, Asana, Slack&amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;


            &amp;lt;a 
              class="button-choose pure-button"
              href="https://www.lambdatest.com/pricing"
              target="_blank"
              &amp;gt;Choose&amp;lt;/a
            &amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;


        &amp;lt;div class="pure-u-1 pure-u-md-1-3"&amp;gt;
          &amp;lt;div class="pricing-table pricing-table-enterprise"&amp;gt;
            &amp;lt;div class="pricing-table-header"&amp;gt;
              &amp;lt;h2&amp;gt;Real Device&amp;lt;/h2&amp;gt;


              &amp;lt;span class="pricing-table-price"&amp;gt;
                $25 &amp;lt;span&amp;gt;per month &amp;lt;/span&amp;gt;
              &amp;lt;/span&amp;gt;
            &amp;lt;/div&amp;gt;


            &amp;lt;ul class="pricing-table-list"&amp;gt;
              &amp;lt;li&amp;gt;Real Mobile devices&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Test native, hybrid, and web apps&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;App Uploads&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Natural gestures and interactions&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Network Throttling&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;Detailed device and app/crash logs&amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;
                Integrate with AppStore,PlayStore, AppCenter and TestFlight
              &amp;lt;/li&amp;gt;
              &amp;lt;li&amp;gt;GPS based geolocation testing and more&amp;lt;/li&amp;gt;
            &amp;lt;/ul&amp;gt;


            &amp;lt;a 
              class="button-choose pure-button"
              href="https://www.lambdatest.com/pricing"
              target="_blank"
              &amp;gt;Choose&amp;lt;/a
            &amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  color: #526066;
}


h2,
h3 {
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 600;
}
/* styles for banner */
.banner {
  background: transparent
    url("https://24.media.tumblr.com/ccb268832580ac12951828a1c179de69/tumblr_mo2xbk8JUK1st5lhmo1_1280.jpg")
    0 0 no-repeat fixed;
  text-align: center;
  background-size: cover;
  height: 200px;
  width: 100%;
  margin-bottom: 3em;
  display: table;
}


.banner-head {
  display: table-cell;
  vertical-align: middle;
  margin-bottom: 0;
  font-size: 2em;
  color: white;
  font-weight: 500;
  text-shadow: 0 1px 1px black;
}
/*pricing table wrapper*/
.pricing-tables {
  max-width: 980px;
  margin: 0 auto;
  margin-bottom: 3.125em;
  text-align: center;
}


.pricing-table {
  border: 1px solid #ddd;
  margin: 0 0.5em 2em;
  padding: 0 0 3em;
}
.pricing-table-free .pricing-table-header {
  background: #519251;
}


.pricing-table-biz .pricing-table-header {
  background: #2c4985;
}
.pricing-table-header {
  background: #111;
  color: #fff;
}
.pricing-table-header h2 {
  margin: 0;
  padding-top: 2em;
  font-size: 1em;
  font-weight: normal;
}


/*
 * -- PRICING TABLE PRICE --
 * Styles for the price and the corresponding &amp;lt;span&amp;gt;per month&amp;lt;/span&amp;gt;
 */
.pricing-table-price {
  font-size: 6em;
  margin: 0.2em 0 0;
  font-weight: 100;
}
.pricing-table-price span {
  display: block;
  text-transform: uppercase;
  font-size: 0.2em;
  padding-bottom: 2em;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}
.pricing-table-list {
  list-style-type: none;
  margin: 0;
  padding: 0;
  text-align: center;
}


/*
 * -- PRICING TABLE LIST ELEMENTS --
 * Styles for the individual list elements within each pricing table
 */
.pricing-table-list li {
  padding: 0.8em 0;
  background: #f7f7f7;
  border-bottom: 1px solid #e7e7e7;
}
/* PRICING TABLE BUTTON */
.button-choose {
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  border-radius: 2em;
  font-weight: bold;
  position: relative;
  bottom: -1.5em;
}


@media (min-width: 767px) {
  .banner-head {
    font-size: 4em;
  }
  .pricing-table {
    margin-bottom: 0;
  }
}


@media (min-width: 480px) {
  .banner {
    height: 400px;
  }
  .banner-head {
    font-size: 3em;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.lambdatest.com/free-online-tools/text-uppercase?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;**Text Uppercase&lt;/a&gt; is a free online tool for converting text into uppercase. Enter your text and click the convert button to make all lowercase letters upper case.**&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/QWzqrYP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the example above, we used Pure CSS to create a pricing page that has three pricing cards.&lt;/p&gt;

&lt;p&gt;To begin with, we include Pure CSS in our project using the CDN. Notice that we are linking two CDNs, this is because the grid system is not part of the base Pure CSS library. This means that if you want to use the grid system, you need to include the separate grids CSS file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/pure-min.css"
      integrity="sha384-X38yfunGUhNzHpBaEBsWLO+A0HDYOQi8ufWDkZ0k9e0eXz/tH3II7uKZ9msv++Ls"
      crossorigin="anonymous"
    /&amp;gt;
    &amp;lt;link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/purecss@3.0.0/build/grids-responsive-min.css"
    /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above snippet, the first &amp;lt; &lt;em&gt;link&lt;/em&gt; &amp;gt; tag includes the base Pure CSS framework and the second &amp;lt; &lt;em&gt;link&lt;/em&gt; &amp;gt; tag includes the grid system CSS file.&lt;/p&gt;

&lt;p&gt;The Pure CSS components we use in this example are the grid system and &lt;em&gt;button — grid&lt;/em&gt; is for the responsive pricing cards layout, and the &lt;em&gt;button&lt;/em&gt; component is for the &lt;em&gt;choose&lt;/em&gt; button inside each pricing card.&lt;/p&gt;

&lt;p&gt;To create the grid layout, we first add the &lt;em&gt;.pure-g&lt;/em&gt; class to the &lt;em&gt;.pricing-tables&lt;/em&gt; element, which lays out the child elements inside it in a grid layout. This &lt;em&gt;.pricing-tables&lt;/em&gt; element has three child elements responsible for the three pricing cards.&lt;/p&gt;

&lt;p&gt;To control the positioning of these child elements, we utilize two pure classes in these individual card elements. The first class is the &lt;em&gt;.pure-u-1&lt;/em&gt;, which creates a column that spans the full width of the grid. This makes each card take the full width of the grid and stack vertically on smaller screens.&lt;/p&gt;

&lt;p&gt;The second class we apply is &lt;em&gt;.pure-u-md-1–3&lt;/em&gt;, which makes a column take one-third of the width on medium and large screens. So, in medium and large screens, the grid’s width gets divided into 3 columns, allowing the three pricing cards to take one-third of the grid layout.&lt;/p&gt;

&lt;p&gt;The last Pure CSS component we use is the &lt;em&gt;buttons&lt;/em&gt;. To add a pure button, we just need to add a &lt;em&gt;.pure-button&lt;/em&gt; class to any &amp;lt; &lt;em&gt;a/&lt;/em&gt; &amp;gt; or &amp;lt; &lt;em&gt;button&lt;/em&gt; /&amp;gt;. In our case, we add it to the &lt;em&gt;anchor tag&lt;/em&gt; of each pricing card.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;a class="button-choose pure-button"
              href="https://www.lambdatest.com/pricing"
              target="_blank"
              &amp;gt;Choose&amp;lt;/a
            &amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Note that in addition to the Pure CSS components, we also added a few more style rules to enhance the visual appearance of the page.&lt;br&gt;
&lt;strong&gt;Advantages of Pure CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; Pure CSS is very lightweight, with the entire set of modules weighing just 3.5KB minified and gzipped. This means that websites built with Pure CSS will load quickly and efficiently.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessible:&lt;/strong&gt; It is designed to be accessible to all users, including users with disabilities. Pure CSS uses CSS best practices and follows the W3C’s Web Content Accessibility Guidelines (WCAG).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible and customizable:&lt;/strong&gt; Pure CSS is designed to be unopinionated, allowing you to customize it to match your design requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive:&lt;/strong&gt; Pure CSS includes a responsive grid system that will automatically adjust to different screen sizes and devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-browser compatible:&lt;/strong&gt; It is cross-browser compatible, so your website will look good and function on all browsers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Pure CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Less features than other CSS frameworks:&lt;/strong&gt; Pure CSS is a lightweight framework, so it does not have as many features as some other CSS frameworks, such as &lt;a href="https://www.lambdatest.com/blog/bootstrap-buttons-badges/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Bootstrap&lt;/a&gt; and Foundation.
&amp;gt;  &lt;a href="https://www.lambdatest.com/free-online-tools/xml-minify?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;**XML Minify&lt;/a&gt; your code with our efficient and reliable online free tool for better website performance. Get faster page load times and better results today.**&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Three Dots
&lt;/h2&gt;

&lt;p&gt;Loading states are an essential part of any website. When users request data from remote sources, there is a delay between sending and receiving the request. This delay is known as the loading state&lt;/p&gt;

&lt;p&gt;In a loading state, to retain the user’s attention and prevent them from abandoning the page, designers often use eye-catching loading animations. Three Dots makes creating and implementing these loading animations for your website easy.&lt;/p&gt;

&lt;p&gt;Three Dots brings you a wide range of loading animations that you can easily incorporate into your project. All you need is a single element and a class from Three Dots.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A98modp5Bc4pz-bt6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A98modp5Bc4pz-bt6.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Three Dots has 1.3k Stars on GitHub and 2000+ weekly downloads through npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Ah1JRU44RdnL3yrXL.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Ah1JRU44RdnL3yrXL.jpg" width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://npmtrends.com/three-dots" rel="noopener noreferrer"&gt;*Source&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;Let’s look at an example of using Three Dots:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;link
      href="
https://cdn.jsdelivr.net/npm/three-dots@0.3.2/dist/three-dots.min.css
"
      rel="stylesheet"
    /&amp;gt;
 &amp;lt;div class="container"&amp;gt;
&amp;lt;div class="dot-bouncing"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  background-color: #010617;
}
.container {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Tired of unorganized YAML code? Our &lt;a href="https://www.lambdatest.com/free-online-tools/yaml-beautifier?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;YAML Beautifier&lt;/a&gt; tool makes YAML code easy to read and understand. Simply paste your code and produce well-formatted document in seconds!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/abPVqoZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this example, we added Three Dots library using the CDN and then applied a &lt;em&gt;bouncing dots&lt;/em&gt; loading animation by adding the class &lt;em&gt;.dot-bouncing&lt;/em&gt; to a &lt;em&gt;div&lt;/em&gt; element. The CSS we have just sets a background color and centers the loader.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Three Dots:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to incorporate:&lt;/strong&gt; Three Dots is extremely easy to incorporate in a project. You just need to install the library and add your preferred loading animation class to an element. For instance, to add a falling dot animation, you would add the &lt;em&gt;.dot-falling&lt;/em&gt; class to an element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable with Dart Sass API:&lt;/strong&gt; With the Dart Sass API, you can change the default values for the style variables and customize the loading animations to suit your preferences&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Three Dots:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Can add bloat to a website:&lt;/strong&gt; Three Dots does not provide the option to install and import only the required loading animation. So, for an app that may need only one loader, you would have to install the entire library, which can result in increasing bloat of your app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Not easily customizable:&lt;/strong&gt; Three Dots does not provide an easy way to customize the loaders that can be a consideration when you want loader color to be the same as your brand color.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Struggling with messy Lua scripts? Our &lt;a href="https://www.lambdatest.com/free-online-tools/lua-beautifier?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Lua Beautifier&lt;/a&gt; tool provides clean and structured formatting. Beautify your code and Improve readability today!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Magic CSS
&lt;/h2&gt;

&lt;p&gt;Magic CSS is a lightweight animation library that allows you to add unique and complex animation effects to your websites. Magic CSS has a lot of animations that are unique to it, which sets it apart from the animated CSS libraries we have covered so far.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AGIcNimA_b03YSMhD.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AGIcNimA_b03YSMhD.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With Magic CSS, you can incorporate animations that are not very straightforward.&lt;/p&gt;

&lt;p&gt;Magic CSS uses JavaScript and jQuery to apply animations to elements. You just need to copy the animation name from the library and paste it into your JavaScript code.&lt;/p&gt;

&lt;p&gt;Here’s an example of adding a &lt;em&gt;Puffin&lt;/em&gt; animation from Magic CSS:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      href="
https://cdn.jsdelivr.net/npm/magic.css@1.4.8/dist/magic.min.css
"
      rel="stylesheet"
    /&amp;gt;


&amp;lt;div class="container"&amp;gt;
      &amp;lt;div class="element"&amp;gt;&amp;lt;/div&amp;gt;
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.animated-element {
  width: 150px;
  height: 150px;
  border-radius: 4px;
  background-color: rgb(235, 19, 116);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;JavaScript:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const selector = document.querySelector(".element");
selector.classList.add("magictime", "puffIn");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/QWzvbOO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this example, we are adding a &lt;em&gt;Puffin&lt;/em&gt; animation to a &amp;lt; &lt;em&gt;div/&lt;/em&gt; &amp;gt; element on load. To do that, we first link the Magic CSS CDN and then use the &lt;em&gt;querySelector()&lt;/em&gt; method to select the &amp;lt; &lt;em&gt;div&lt;/em&gt; &amp;gt; element with the class &lt;em&gt;.animated-element&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Next, we add the animation using &lt;em&gt;classList.add()&lt;/em&gt; method which adds two classes to the &amp;lt; &lt;em&gt;div&lt;/em&gt; &amp;gt; element — &lt;em&gt;magictime&lt;/em&gt; and &lt;em&gt;puffIn&lt;/em&gt;. The magictime class is required for all Magic CSS animations, and the &lt;em&gt;puffIn&lt;/em&gt; class is the animation name we want.&lt;/p&gt;

&lt;p&gt;Magic CSS is a popular choice in animation libraries because of its easy-to-use nature. It has 8.2k Stars on GitHub and 1000+ weekly downloads through npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AuvoognSB036IUAUN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AuvoognSB036IUAUN.png" width="800" height="348"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Magic CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Wide range of options:&lt;/strong&gt; Magic CSS provides a wide range of animations for you to choose from. Be it fades, flips, slides, rotations, or complex animations like perspectives or space-outs, Magic CSS has it all.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Customizable:&lt;/strong&gt; It allows you to customize the duration of the animations using CSS, which can be very handy in certain scenarios.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Magic CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Does not support Opera Mini:&lt;/strong&gt; Magic CSS does not support Opera Mini, which is a popular mobile browser with a market share of 2.7%. So, if you need to support users of Opera Mini, you might want to consider using an alternative.
&amp;gt;  &lt;strong&gt;Struggling with messy PHP Formatter &amp;amp; Beautifier Online scripts? Our &lt;a href="https://www.lambdatest.com/free-online-tools/php-beautifier?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;PHP Beautifier&lt;/a&gt; &amp;amp; Formatter Online tool provides clean and structured formatting. Beautify your code and Improve readability today!&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Spectrum CSS
&lt;/h2&gt;

&lt;p&gt;Spectrum CSS is an open-source CSS library developed by Adobe. It includes components and resources to make web applications more cohesive. Spectrum is used by all of Adobe’s products, including Creative Cloud, Document Cloud, and Acrobat. It is also used by other organizations, including The New York Times, Slack, and Airbnb.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AM9ayQOn7gmntq0qv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AM9ayQOn7gmntq0qv.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a CSS-only library, meaning that it does not require any JavaScript to use. It provides a wide range of components, including buttons, menus, modals, tables, and forms that you can easily incorporate into your project. Spectrum CSS also includes a variety of utilities, such as typography, colors, and spacing.&lt;/p&gt;

&lt;p&gt;With Spectrum CSS, you can quickly and efficiently create consistent and aesthetically pleasing user interfaces without spending excessive time on design and styling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Spectrum CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Comprehensive:&lt;/strong&gt; Spectrum CSS is an all-in-one library that gives you everything you need to build a modern web application. From buttons to menus, modals to tables, cards to forms, date pickers to calendars, Spectrum CSS has it all.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modular:&lt;/strong&gt; It is highly modular, with each component released on NPM as a separate package. This means you can use only the components you need for your project without installing everything. This makes your project smaller and faster and your code reusable and maintainable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documented:&lt;/strong&gt; Spectrum CSS is well-documented with clear and concise examples of using the library. This makes it easy to learn and incorporate into a project.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Spectrum CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Opinionated:&lt;/strong&gt; Spectrum CSS comes with limitations, especially if you need to significantly customize your application’s look and feel.
&amp;gt;  &lt;strong&gt;Don’t let encoding IDNs slow you down. Save time and hassle with our &lt;a href="https://www.lambdatest.com/free-online-tools/idn-encode?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;IDN Encode&lt;/a&gt; free online tool to quickly and easily converts internationalized domain names. Try it now!&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Skeleton
&lt;/h2&gt;

&lt;p&gt;Skeleton is a minimal and lightweight CSS library that provides a basic set of styles and layout templates for building responsive web pages. It is designed to be a starting point for your project rather than a complete UI library that provides pre-built components to build a page from end to end.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ArHFVcbuoYUv_husB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ArHFVcbuoYUv_husB.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;UI libraries often provide a wide range of components and styles, which can be useful for saving time and effort. However, this can also make them less flexible and customizable.&lt;br&gt;
Skeleton, on the other hand, is designed to be more lightweight and flexible.&lt;/p&gt;

&lt;p&gt;With Skeleton, you have a simple set of styles that will help you build a web page quickly while providing the flexibility to customize and create your unique design.&lt;/p&gt;

&lt;p&gt;Skeleton includes a number of classes for styling typography, buttons, forms, and other common elements of a webpage. It is a good choice for developers who want to have complete control over the styling of their websites or for websites where performance is a critical concern. Skeleton is a popular lightweight library choice with over 18.9k+ Stars and 3.2k+ Forks on GitHub. However, it’s been inactive for the last few years, with its last update in 2014.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AGhFSwHqw7-Xv2NU5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AGhFSwHqw7-Xv2NU5.png" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Using Skeleton is incredibly straightforward. To get started, simply download the Skeleton boilerplate and leverage the provided Foundation to build your web projects. Let’s look at an example of using Skeleton to create a landing page:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;!-- Basic Page Needs
  –––––––––––––––––––––––––––––––––––––––––––––––––– --&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;title&amp;gt;Skeleton: Responsive CSS Boilerplate&amp;lt;/title&amp;gt;
    &amp;lt;meta name="description" content="" /&amp;gt;
    &amp;lt;meta name="author" content="" /&amp;gt;


    &amp;lt;!-- Mobile Specific Metas
  –––––––––––––––––––––––––––––––––––––––––––––––––– --&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1" /&amp;gt;


    &amp;lt;!-- FONT
  –––––––––––––––––––––––––––––––––––––––––––––––––– --&amp;gt;
    &amp;lt;link
      href="//fonts.googleapis.com/css?family=Raleway:400,300,600"
      rel="stylesheet"
      type="text/css"
    /&amp;gt;


    &amp;lt;!-- CSS
  –––––––––––––––––––––––––––––––––––––––––––––––––– --&amp;gt;
    &amp;lt;link rel="stylesheet" href="./css/normalize.css" /&amp;gt;
    &amp;lt;link rel="stylesheet" href="./css/skeleton.css" /&amp;gt;
    &amp;lt;link rel="stylesheet" href="./css/custom.css" /&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div class="section hero"&amp;gt;
      &amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="row"&amp;gt;
          &amp;lt;div class="one-half column"&amp;gt;
            &amp;lt;h4 class="hero-heading"&amp;gt;
              Stop relying on dev tools for ensuring responsiveness. Transform
              how you make responsive websites.
            &amp;lt;/h4&amp;gt;
            &amp;lt;a
              class="button button-primary"
              href="https://www.lambdatest.com/lt-browser"
              &amp;gt;Try LT Browser&amp;lt;/a
            &amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div class="one-half column phones"&amp;gt;
            &amp;lt;img
              class="phone"
              src="http://getskeleton.com/examples/landing/images/iphone.png"
            /&amp;gt;
            &amp;lt;img
              class="phone"
              src="http://getskeleton.com/examples/landing/images/iphone.png"
            /&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.button {
  border-radius: 100px;
}


.section {
  padding: 8rem 0 7rem;
  text-align: center;
}
.section-heading,
.section-description {
  margin-bottom: 1.2rem;
}


.phones {
  position: relative;
}
.phone {
  position: relative;
  max-width: 80%;
  margin: 3rem auto -12rem;
}
.phone + .phone {
  display: none;
}


@media (min-width: 550px) {
  .section {
    padding: 12rem 0 11rem;
  }
  .hero {
    padding-bottom: 12rem;
    text-align: left;
    height: 165px;
  }
  .phone {
    position: absolute;
    top: -7rem;
    right: 3rem;
    max-height: 362px;
    z-index: 3;
  }
  .phone + .phone {
    top: -6rem;
    display: block;
    max-width: 73.8%;
    right: 0;
    z-index: 2;
    max-height: 338px;
  }
  .hero-heading {
    font-size: 2.4rem;
  }
}


@media (min-width: 750px) {
  .hero {
    height: 190px;
  }
  .hero-heading {
    font-size: 2.6rem;
  }
  .section {
    padding: 14rem 0 15rem;
  }
  .hero {
    padding: 16rem 0 14rem;
  }


  .phone {
    top: -14rem;
    right: 5rem;
    max-height: 510px;
  }
  .phone + .phone {
    top: -12rem;
    max-height: 472px;
  }
}


@media (min-width: 1000px) {
  .section {
    padding: 20rem 0 19rem;
  }
  .hero {
    padding: 22rem 0;
  }
  .hero-heading {
    font-size: 3rem;
  }
  .phone {
    top: -16rem;
    max-height: 615px;
  }
  .phone + .phone {
    top: -14rem;
    max-height: 570px;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AgrDq2lsEUKFCzdYT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AgrDq2lsEUKFCzdYT.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AQgn-kvT5YXmbSBzw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AQgn-kvT5YXmbSBzw.png" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, we created a landing page with an image on the right and some text followed by a CTA button on the left. In smaller screens, both text and image stack vertically, and in larger screens, both stack side by side.&lt;/p&gt;

&lt;p&gt;To do this, we used Skeleton as a boilerplate, which provides an &lt;em&gt;index.html&lt;/em&gt; file and a folder called &lt;em&gt;css&lt;/em&gt;. We changed the content of &lt;em&gt;index.html&lt;/em&gt; and created a new file inside the &lt;em&gt;css&lt;/em&gt; folder where we added the above lines of CSS.&lt;/p&gt;

&lt;p&gt;These custom CSS styles are applied to enhance the page’s visual appeal. Buttons are styled with rounded edges, sections have padding and alignment, and phone images are positioned with specific dimensions. We also used media queries to adjust the minor details of the layout, like padding, height, and font size based on the screen width.&lt;/p&gt;

&lt;p&gt;In the HTML markup, we used Skeleton classes like &lt;em&gt;row&lt;/em&gt; to create a row, &lt;em&gt;one-half column&lt;/em&gt; to create a column that takes half of the space of the row, and &lt;em&gt;button-primary&lt;/em&gt; with the &lt;em&gt;button&lt;/em&gt; prefix to generate a primary button.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Skeleton:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; Skeleton is very lightweight. The minified and gzipped CSS file is only 4.2KB, which will load quickly and not slow down your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to customize:&lt;/strong&gt; Skeleton is easy to customize. The library is documented and provides many classes that you can use to style your website. You can also override any default styles to create your custom look.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive:&lt;/strong&gt; Skeleton includes a grid system and other features that make it easy to create responsive websites. This means that your website will look good and function properly on all devices, including desktop computers, laptops, tablets, and smartphones.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Skeleton:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Not suitable for larger projects:&lt;/strong&gt; Skeleton provides a boilerplate that might not be suitable for larger projects with complex file structures.
&amp;gt;  &lt;strong&gt;Don’t let internationalized domain names (IDNs) slow you down. Our free online &lt;a href="https://www.lambdatest.com/free-online-tools/idn-decode?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;IDN Decode&lt;/a&gt; tool makes it easy to convert any IDN to its ASCII representation. Decode IDs in seconds!&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Basscss
&lt;/h2&gt;

&lt;p&gt;Basscss is a lightweight and modular CSS library that provides a set of utility classes to help you quickly and easily style your web projects. It follows the principle of utility-first CSS, which means that instead of writing custom CSS rules for each element and component, you use predefined utility classes to apply styles directly to the HTML elements.&lt;/p&gt;

&lt;p&gt;These predefined utility classes typically have names that describe their purpose, such as &lt;em&gt;.bg-blue&lt;/em&gt; for setting a blue background color or &lt;em&gt;.m1&lt;/em&gt; for adding a margin to an element.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AsgDB3YtxGivne2JT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AsgDB3YtxGivne2JT.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the best things about Basscss is that it’s modular. You can choose which parts of the library you want to use, so you don’t end up with a lot of unnecessary code. It’s a flexible and straightforward way to make your web pages look great without the complexity of larger CSS libraries.&lt;/p&gt;

&lt;p&gt;Basscss has 5.8k Stars and 300+ Forks on GitHub. It also has 7000+ weekly downloads according to npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6-SnVHkzsQz7vyK2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6-SnVHkzsQz7vyK2.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s look at an example of using Basscss.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;link
      href="https://unpkg.com/basscss@8.0.2/css/basscss.min.css"
      rel="stylesheet"
    /&amp;gt;
    &amp;lt;div class="p2 m2 border rounded" style="border-color: #ccc"&amp;gt;
      &amp;lt;p class="bold"&amp;gt;Bold&amp;lt;/p&amp;gt;
      &amp;lt;p class="regular"&amp;gt;Regular&amp;lt;/p&amp;gt;
      &amp;lt;p class="italic"&amp;gt;Italic&amp;lt;/p&amp;gt;
      &amp;lt;p class="caps"&amp;gt;Caps&amp;lt;/p&amp;gt;
      &amp;lt;p class="left-align"&amp;gt;Left align&amp;lt;/p&amp;gt;
      &amp;lt;p class="center"&amp;gt;Center&amp;lt;/p&amp;gt;
      &amp;lt;p class="right-align"&amp;gt;Right align&amp;lt;/p&amp;gt;
      &amp;lt;p class="justify"&amp;gt;
        Justify Bacon ipsum dolor sit amet chuck prosciutto landjaeger ham hock
        filet mignon shoulder hamburger pig venison.
      &amp;lt;/p&amp;gt;
      &amp;lt;p class="nowrap"&amp;gt;No wrap&amp;lt;/p&amp;gt;
      &amp;lt;p class="underline"&amp;gt;Underline&amp;lt;/p&amp;gt;
      &amp;lt;p class="truncate"&amp;gt;Truncate&amp;lt;/p&amp;gt;
      &amp;lt;p class="font-family-inherit"&amp;gt;Font Family Inherit&amp;lt;/p&amp;gt;
      &amp;lt;p class="font-size-inherit"&amp;gt;Font Size Inherit&amp;lt;/p&amp;gt;
      &amp;lt;a class="text-decoration-none"&amp;gt;Text Decoration None&amp;lt;/a&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AyDtf9sjn6oO2Nh2s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AyDtf9sjn6oO2Nh2s.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Basscss:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modularity:&lt;/strong&gt; Basscss is designed with a modular approach, so you can pick and choose which parts of the framework to include in your project. This reduces bloat and allows for faster load times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive design:&lt;/strong&gt; It includes responsive design classes that allow you to create layouts that adapt to different screen sizes and devices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Speed and clarity:&lt;/strong&gt; Basscss provides clear, humanized naming conventions that make it quick to internalize and easy to reason about. This can lead to faster development times and more readable code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility and control:&lt;/strong&gt; Basscss provides basic building blocks that can be used to create any design. This gives you complete control over your CSS and allows you to create custom designs that meet your specific needs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;No side effects:&lt;/strong&gt; Basscss utilities are immutable, meaning they can be used without worrying about unexpected behavior.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Basscss:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited component library:&lt;/strong&gt; Unlike more extensive CSS libraries like Foundation, Basscss does not have a library of pre-designed UI components (e.g., modals, navigation menus). You’ll need to build or style these components from scratch.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Learning curve:&lt;/strong&gt; While using utility classes can be efficient, it may have a learning curve, especially for developers who are used to writing custom CSS. It can take time to become proficient in using the utility classes effectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Community and updates:&lt;/strong&gt; The popularity and maintenance of Basscss may not be as extensive as some larger CSS frameworks, which could impact the availability of community support and updates over time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Looking for a way to convert your CSS code to SCSS? Look no further than our &lt;a href="https://www.lambdatest.com/free-online-tools/css-to-scss?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;CSS to SCSS&lt;/a&gt; Converter to easily convert your CSS code to SCSS. Give it a try today!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  98.css
&lt;/h2&gt;

&lt;p&gt;98.css is a CSS library for building interfaces that look like Windows 98. It is a design system that provides a set of consistent styles for all of the common elements of a web UI, such as buttons, menus, forms, and dialog boxes.&lt;/p&gt;

&lt;p&gt;Many developers want to build retro UIs but don’t have the time or expertise to create their own styles. 98.css solves this challenge by providing a ready-made set of styles that can be used to create any kind of retro UI.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AZLutsgsPVhvgFh7N.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AZLutsgsPVhvgFh7N.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;98.css is built on the principles of accessibility and semantic HTML. This means that it is easy to use 98.css to create websites accessible to people with impairments, and it is also easy to customize the styles of your website without breaking the overall design. 98.css is a relatively new CSS library that has quickly gained popularity. It has 8.2k Stars on GitHub and 3000+ weekly downloads on npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AB4wMQM6PSLYAVsJW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AB4wMQM6PSLYAVsJW.png" width="800" height="340"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://npmtrends.com/98.css" rel="noopener noreferrer"&gt;*Source&lt;/a&gt;*&lt;/p&gt;

&lt;p&gt;Let’s look at an example of using 98.css.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="https://unpkg.com/98.css" /&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      &amp;lt;h1 class="title"&amp;gt;An example of using 98.css&amp;lt;/h1&amp;gt;
      &amp;lt;button&amp;gt;Click me&amp;lt;/button&amp;gt;
      &amp;lt;input type="submit" /&amp;gt;
      &amp;lt;input type="reset" /&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  text-align: center; /* Center the content horizontally */
  height: 100vh; /* This centers the content vertically within the viewport */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/abPKZYZ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of 98.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unique:&lt;/strong&gt; 98.css is one of the few CSS libraries that help you create retro UIs. This makes it a unique and valuable resource for developers who want to build UIs with a retro look and feel.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessibility and Semantic HTML:&lt;/strong&gt; 98.css is built on the principles of accessibility and semantic HTML. This means that websites built with 98.css will be accessible to people with disabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compatible with any front-end framework:&lt;/strong&gt; It is compatible with any front-end framework. This means developers can use 98.css to build retro UIs with their favorite front-end frameworks, such as React, Vue.js, or Angular.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of 98.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Limited use cases:&lt;/strong&gt; It is only suitable for building UIs with a retro look and feel. This means that it has a limited use case and is unsuitable for building all types of websites.
&amp;gt;  &lt;strong&gt;Optimize your data management workflow with our &lt;a href="https://www.lambdatest.com/free-online-tools/sql-to-yaml?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;SQL to YAML&lt;/a&gt; Converter. Convert SQL queries to YAML files and easily manage and share data configurations&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Blaze UI
&lt;/h2&gt;

&lt;p&gt;Building websites is easy, but building scalable and maintainable websites is not.&lt;/p&gt;

&lt;p&gt;Blaze UI tackles this challenge by providing a solid structure for building websites quickly with a scalable and maintainable foundation. It does this by providing a set of consistent CSS styles for all of the common elements of a web UI. It also offers several features that make it easy to customize the look and feel of a website without breaking it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A3tMQgxuFK2w0oQTR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A3tMQgxuFK2w0oQTR.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The best thing about the Blaze UI is its flexibility. It is a framework-free UI toolkit, meaning you can use it with or even without any &lt;a href="https://www.lambdatest.com/blog/best-javascript-frameworks/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;JavaScript framework&lt;/a&gt;. This makes it a great choice for projects where you want complete control over the code and build custom solutions.&lt;/p&gt;

&lt;p&gt;Blaze UI has 1.6k Stars on GitHub and 300+ weekly downloads through npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A3uWsDVs4A3s9pgm5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A3uWsDVs4A3s9pgm5.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s look at an example of using Blaze UI.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;link
      rel="stylesheet"
      href="https://unpkg.com/@blaze/css@x.x.x/dist/blaze/blaze.css"
    /&amp;gt;


    &amp;lt;ul class="o-timeline o-timeline--alternate o-timeline--loading"&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--left"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;Nothing&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--brand"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;
          Big bang


          &amp;lt;p class="c-paragraph u-text--quiet u-small"&amp;gt;
            Widely considered to be how the universe began
          &amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--info c-timeline-item--left"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;Galaxies go everywhere&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--warning"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;Solar systems form&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li
        class="c-timeline-item c-timeline-item--success c-timeline-item--left"
      &amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;Earth appears&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--error"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;Human infestation occurs!&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--left c-timeline-item--last"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;
          All this has happened before, and will happen again
        &amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
      &amp;lt;li class="c-timeline-item c-timeline-item--loading"&amp;gt;
        &amp;lt;div class="c-timeline-item__body"&amp;gt;...Evolution&amp;lt;/div&amp;gt;
      &amp;lt;/li&amp;gt;
    &amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/QWzxMVE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this example, we used Blaze UI to create a timeline. Timelines are often used to illustrate a connected set of events that have happened or are planned to happen. However, creating a timeline using CSS requires much work, as you need to style each element individually.&lt;/p&gt;

&lt;p&gt;With the Blaze UI timeline component, we can create timelines with just a few lines of code. The timeline component is also fully responsive and will look good on all devices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Blaze UI:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accessible:&lt;/strong&gt; All of the components in Blaze UI are accessible so that everyone can use your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Framework-free:&lt;/strong&gt; Blaze UI is not tied to any specific framework, so you can use it with or without your favorite JavaScript library or framework. This gives you the flexibility to choose the best tools for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalable:&lt;/strong&gt; It is designed to be scalable, so you can use it to build small websites or large complex web applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsive:&lt;/strong&gt; All of the components in Blaze UI are responsive, so your website will look great on any device.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Blaze UI:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small community:&lt;/strong&gt; Blaze UI has a smaller community than some other CSS libraries, so less support and resources may be available.
&amp;gt;  &lt;strong&gt;Looking for an easy way to convert your HTML files to JADE? Try our free online &lt;a href="https://www.lambdatest.com/free-online-tools/html-to-jade?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;HTML to JADE &lt;/a&gt;converter tool to convert your HTML files to JADE format in seconds.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Woah.css
&lt;/h2&gt;

&lt;p&gt;Woah.css is an animation library that is designed to be fun and unique. It comes with various fun and showy CSS3-powered animations that can be easily applied to HTML elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AiEcoXxVnO1J57ySl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AiEcoXxVnO1J57ySl.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Woah.css provides various animation classes, including&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;wowsers:&lt;/em&gt;&lt;/strong&gt; A flashy animation that makes your element appear to explode from the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;comeInStyle:&lt;/em&gt;&lt;/strong&gt; A smooth animation that makes your element slide into view from the top left corner of the page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;rotateComplex:&lt;/em&gt;&lt;/strong&gt; A complex animation that makes your element rotate and flip in place.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;flyOut:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element fly out of the page to the right.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;flyIn:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element fly into the page from the left.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;blackMirror:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element glitch and flicker, like from the TV show Black Mirror.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;spin3D:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element spin 360 degrees on the Y axis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;simpleEntrance:&lt;/em&gt;&lt;/strong&gt; A simple animation that makes your element fade in from 0% to 100% opacity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;scaleOut:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element scale down to 0%.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;starWars:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element appear to fly through space like a Star Wars ship.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;blazingStar:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element appear like a blazing star.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;pulse:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element pulse in and out.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;shaker:&lt;/em&gt;&lt;/strong&gt; An animation that makes your element shake back and forth.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Woah.css is a great choice for developers who want to add excitement to their websites. Many of the animations it provides are unconventional and out of the box, which can be ideal for projects where you want to add some playful touch.&lt;/p&gt;

&lt;p&gt;Below is an example of Woah.css animations.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/chriscoyier/embed/BgeKoE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Woah.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to use:&lt;/strong&gt; Woah.css comes with a variety of pre-built animations that can be applied to HTML elements with just a few lines of code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; It is a relatively small library, which makes it a good choice for websites that need to minimize their file size.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexible:&lt;/strong&gt; Woah.css animations can be combined to create custom animations, and they can also be easily customized to match the specific needs of a website&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Woah.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited number of animations:&lt;/strong&gt; Woah.css has fewer animations than some other CSS animation libraries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Relatively new library:&lt;/strong&gt; Woah.css is a relatively new library, so it may not be as fully supported.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Need YAML data for testing? No need to stress about YAML data — Try our &lt;a href="https://www.lambdatest.com/free-online-tools/random-yaml-generator?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Random YAML Generator&lt;/a&gt; for a quick and effortless way to generate YAML data in seconds.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  RaisinCSS
&lt;/h2&gt;

&lt;p&gt;RaisinCSS is a utility-first CSS library that provides a wide range of pre-built utility classes that can be used to build custom and responsive websites.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASPgTWFHZIorLTvpI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASPgTWFHZIorLTvpI.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Utility classes are small, specific, and reusable CSS classes that can be used to style any element on a page. For example, a utility class might add a margin to an element, change its font color, or make it responsive.&lt;/p&gt;

&lt;p&gt;RaisinCSS is modular, which allows developers to pick and choose only the components they need, reducing the overall file size and improving the loading speed of web pages. It is also documented and beginner-friendly, making it a great choice for developers of all skill levels.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of RaisinCSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Supports CSS grid and flexbox:&lt;/strong&gt; RaisinCSS supports modern layout techniques like &lt;a href="https://www.lambdatest.com/blog/css-grid/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS grid&lt;/a&gt; and &lt;a href="https://www.lambdatest.com/blog/css-flexbox-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS flexbox&lt;/a&gt;, ensuring your projects align with contemporary web design practices. This allows you to create complex layouts with ease and flexibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Highly customizable:&lt;/strong&gt; RaisinCSS is highly customizable because of its modular structure. So you can quickly adapt styles and components to match your needs and project requirements.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lightweight:&lt;/strong&gt; It is a lightweight library that does not add unnecessary bloat to your website.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Easy to use:&lt;/strong&gt; RaisinCSS is easy to learn and use, even for developers who are new to CSS.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Documentation:&lt;/strong&gt; RaisinCSS comes with clear and concise documentation that is easy to follow.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of RaisinCSS:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Limited number of components:&lt;/strong&gt; RaisinCSS does not come with a lot of pre-built components, such as navigation bars and forms. However, there are a number of third-party RaisinCSS components available online.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Relatively new library:&lt;/strong&gt; It is relatively new, so it may not be as fully supported as other CSS libraries.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Normalize.css
&lt;/h2&gt;

&lt;p&gt;Normalize.css is a lightweight CSS library that helps make the default styles of web browsers more consistent and in line with modern standards. Normalize.css is one of the most popular CSS libraries with over 50k Stars on GitHub and is used by thousands of websites, including some renowned names like Twitter, GitHub, Medium, etc.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AdYncoIm5cfFJZxWz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AdYncoIm5cfFJZxWz.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It is a modern alternative to traditional CSS resets. Unlike a traditional CSS reset, Normalize.css does not remove all default styles. Instead it preserves useful defaults and tries to normalize only the necessary styles across browsers. This makes it a good starting point for any web development project, as it can significantly help reduce cross-browser compatibility issues.&lt;/p&gt;

&lt;p&gt;Normalize.css is also maintained and regularly updated, making it a reliable and trustworthy choice for developers. It has 11k Forks on GitHub and a staggering million+ weekly downloads through npm trends.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ACJEpZA8dxgkvW3a0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ACJEpZA8dxgkvW3a0.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The below CodePen shows the usage of Normalize.css with various HTML elements.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/dfdumaresq/embed/kXjYRN?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Normalize.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;**Improves cross-browser consistency: **Normalize.css helps to ensure that your website looks the same across all major browsers. This can save you a lot of time and effort, as you don’t have to manually test your website on every browser.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fixes common browser bugs:&lt;/strong&gt; Normalize.css fixes common desktop and mobile browser bugs that can affect the appearance of your website. This includes bugs related to HTML5 elements, preformatted text, SVG overflow, and forms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Doesn’t use multiple selectors:&lt;/strong&gt; Normalize.css uses targeted styles and avoids using multiple selectors in rulesets. This makes it easier to debug your CSS and identify the source of any issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Modular and easy to customize:&lt;/strong&gt; Normalize.css is broken down into relatively independent sections. This means you can easily add or remove specific styles depending on your needs.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Limitations of Normalize.css:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Lack of opinionated styles:&lt;/strong&gt; Normalize.css focuses on resetting or normalizing default styles without providing opinionated design choices. While this is a strength for flexibility, you’ll need to write your own custom CSS to create a unique design.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Maintenance:&lt;/strong&gt; It requires updating with evolving web standards and browser changes. You may need to update it periodically to address new issues or changes in browser behavior.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Need decimal fractions for your project or testing? Use our free and fast online &lt;a href="https://www.lambdatest.com/free-online-tools/random-decimal-fraction-generator?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Random decimal Fraction Generator&lt;/a&gt; to generate random decimal fractions in seconds!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Criteria for Selecting CSS Libraries
&lt;/h2&gt;

&lt;p&gt;Selecting the best CSS libraries for your project is crucial for efficiency, maintainability, and achieving your design goals. However, with a plethora of CSS libraries available, it can be challenging to pick the best one for your specific needs.&lt;/p&gt;

&lt;p&gt;Note that the best library for your project will vary depending on your specific project requirements. However, to assist you in making an informed choice, here are some key criteria to consider when selecting the right CSS libraries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Performance considerations&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  One of the most important things you should consider when choosing a library is its performance.
&lt;/h3&gt;

&lt;p&gt;Look for libraries that are optimized for speed and efficiency. A good library should not add unnecessary bloat to your website, which could slow it down. Check if the library’s code is minified or compressed, as smaller file sizes load faster.&lt;/p&gt;

&lt;p&gt;Also, check if the library follows best practices for reducing render-blocking resources, which can improve page load times.&lt;/p&gt;

&lt;p&gt;If you don’t know what render-blocking resources are, they are elements like stylesheets and scripts that can slow down the loading of a web page. When a browser encounters these resources, it often stops rendering the page temporarily to fetch and process them. This pause can make the page appear slower to users.&lt;/p&gt;

&lt;p&gt;To prevent it, some libraries follow practices like loading only the necessary parts first and deferring the rest until after the page is visible. So, when a library follows such best practices, it helps the web page load faster.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Compatibility and browser support&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The success of your website depends heavily on its ability to function flawlessly across a wide range of browsers and devices. So, ensuring the CSS library you pick works with popular web browsers is crucial. This is important for several reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;**Wider audience: **Every web browser has its own group of users. By ensuring compatibility across these browsers, you can reach a broader audience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;User experience:&lt;/strong&gt; Users have different preferences and expect your website to work without glitches on their preferred browser. A website that functions flawlessly across different browsers improves user experience.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Search Engine Optimization(SEO):&lt;/strong&gt; Search engines like Google consider user experience an important ranking factor. A website with good browser compatibility will likely rank higher, improving its visibility.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, when choosing CSS libraries, selecting one that prioritizes compatibility and browser support is important.&lt;/p&gt;

&lt;p&gt;To ensure your libraries are compatible with the latest browser versions, you can test your website using a cross browser testing platform like LambdaTest. LambdaTest is an AI-powered test orchestration and execution platform that allows you to test your website on an online browser farm of 3,000+ browsers and operating systems. You can also test your website on mobile phones, tablets, and more.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WYbyLfLM2-E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Ease of use and documentation&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The documentation should provide clear step-by-step instructions, examples, and practical usage guidelines. This way, you can quickly understand how to maximize the library’s capabilities without hassle. A good library will simplify your development and save you time.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Customizability and flexibility&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every project has its unique design requirements. A good CSS library should allow for customization and flexibility.&lt;/p&gt;

&lt;p&gt;To recap, when selecting the best CSS libraries, consider factors like performance, compatibility, ease of use, and customization. A library that excels in these areas will help you build efficient, cross-browser-compatible, and visually appealing websites while saving you time and effort in the development process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2448%2F0%2AQU6NMY00jWR6iaoO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2448%2F0%2AQU6NMY00jWR6iaoO.png" width="800" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap it up!
&lt;/h2&gt;

&lt;p&gt;CSS libraries are a robust way of building modern and inclusive websites. By choosing the right library for your web project, you can streamline your workflow, produce high-quality, maintainable code, and deliver a seamless user experience worldwide.&lt;/p&gt;

&lt;p&gt;However, with the vast number of CSS libraries available, choosing the right one for your project can be challenging. So, in this blog, we have handpicked the best 20 CSS libraries for you to leverage. While choosing these libraries, we considered factors like ease of use, popularity, use cases, clear documentation, browser support, and flexibility.&lt;/p&gt;

&lt;p&gt;Hope this blog has been helpful to you and helped you discover some useful CSS libraries. Until next time, happy coding!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Looking for an easy way to generate random octal numbers? Use our online &lt;a href="https://www.lambdatest.com/free-online-tools/random-octal-generator?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=feb_14&amp;amp;utm_term=bh&amp;amp;utm_content=free_online_tools" rel="noopener noreferrer"&gt;Random Octal Generator&lt;/a&gt; tool to generate random numbers in octal format. Try it now for free.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are libraries in CSS?
&lt;/h3&gt;

&lt;p&gt;CSS libraries are collections of pre-written CSS codes that offer common styling elements like buttons and forms to speed up web development.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which is the best CSS library?
&lt;/h3&gt;

&lt;p&gt;The best CSS library depends on project needs; popular choices include Bootstrap for its extensive components, Foundation for flexibility, and Materialize for material design aesthetics.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Bootstrap a library for CSS?
&lt;/h3&gt;

&lt;p&gt;Yes, Bootstrap is a widely-used CSS library known for its comprehensive set of ready-to-use components for responsive web design.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Creating a 12 Column CSS Grid: A Complete Tutorial</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Tue, 19 Dec 2023 08:36:20 +0000</pubDate>
      <link>https://forem.com/testmuai/creating-a-12-column-css-grid-a-complete-tutorial-3jb2</link>
      <guid>https://forem.com/testmuai/creating-a-12-column-css-grid-a-complete-tutorial-3jb2</guid>
      <description>&lt;p&gt;Creating layouts has always been the most important aspect of web design because they determine how a website looks across different devices. Be it mobiles, tablets, laptops, or desktops, the way your web app looks across these devices is mainly controlled by the structure of your layout.&lt;/p&gt;

&lt;p&gt;In the earlier days of the Internet, things like tables and positioning were used to create layouts. But they were mere hacks rather than actual layout modules.&lt;/p&gt;

&lt;p&gt;With the introduction of CSS Grid, we had our first actual layout creation module. With CSS Grid, we can create complex, grid-based layouts that adapt seamlessly to different screen sizes and devices. As grid-based layouts gained popularity, a framework called a 12 column CSS grid came into the picture.&lt;/p&gt;

&lt;p&gt;Today, popular platforms like Twitter, Medium, Stripe, Dribble, etc., use a 12 column CSS grid on their websites. But what exactly is a 12 column layout?&lt;/p&gt;

&lt;p&gt;A 12 column CSS grid is a layout system that divides the width of a container into 12 equal columns, providing a framework for arranging content and elements on a webpage.&lt;/p&gt;

&lt;p&gt;The concept behind a 12 column CSS grid is to break down the horizontal space into a set number of columns, allowing developers and designers to allocate different numbers of columns to different sections or elements within the layout. This system provides a consistent and structured approach to organizing content, regardless of the device or screen size used.&lt;/p&gt;

&lt;p&gt;With a 12 column CSS grid, each column typically occupies a fraction of the container’s width. For example, if a container is 1200 pixels wide, each column would be 1/12th of that width, resulting in columns that are 100 pixels wide. We can then assign any number of columns to an element using CSS classes.&lt;/p&gt;

&lt;p&gt;A 12 column CSS grid revolutionizes the way we approach layout creation. It has become a widespread choice due to its flexibility, ease of implementation, and compatibility with responsive design principles.&lt;/p&gt;

&lt;p&gt;In this blog, we look at creating a 12 column CSS grid layout that adapts gracefully to various screen sizes and devices. By the end of this blog, you will have a solid understanding of how to create a 12 column CSS grid, allocate different widths to specific elements within the grid, or rearrange columns for smaller screens.&lt;/p&gt;

&lt;p&gt;So, let’s get started!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover 31 top &lt;a href="https://www.lambdatest.com/blog/automation-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;automation testing tools list&lt;/a&gt; in 2023 for powerful and efficient testing solutions.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What is a 12 Column CSS Grid?
&lt;/h2&gt;

&lt;p&gt;A 12 column CSS grid refers to a layout system that divides a web page into 12 equal-width columns, providing a framework for creating flexible and &lt;a href="https://www.lambdatest.com/learning-hub/responsive-design?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;responsive designs&lt;/a&gt;. In this system, the horizontal space is divided into 12 equal columns, and you can then use those columns to position elements within the layout.&lt;/p&gt;

&lt;p&gt;By default, each column gets a width of 1fr, which means it takes up 1 fraction of the container’s total width. This means if a grid is 1200 pixels wide, each column would be 1/12th of that width, resulting in columns that are 100 pixels wide.&lt;/p&gt;

&lt;p&gt;This allows for flexibility in designing the layout, as the columns can be combined or resized according to the specific needs of the webpage. For example, you can have a single element spanning the entire width of the grid by using all 12 columns, or you can divide the space into multiple smaller sections by assigning different numbers of columns to each element.&lt;/p&gt;

&lt;p&gt;This way of organizing content provides a convenient and efficient framework for creating responsive designs that adapt to different screen sizes and devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Real-World Examples of 12 Column CSS Grid
&lt;/h2&gt;

&lt;p&gt;Because of its flexibility and versatility, the 12 column CSS grid has become popular in &lt;a href="https://www.lambdatest.com/blog/20-elements-of-modern-web-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;modern web design&lt;/a&gt;. Let’s take a look at some famous names that utilize the 12 column CSS grid system in their website layouts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Airbnb&lt;/strong&gt;Airbnb, a popular online marketplace for vacation rentals and lodging, utilizes the 12 column CSS grid in its layout to organize property listings, search results, and filters, allowing users to navigate and explore available accommodations easily.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Airbnb, a popular online marketplace for vacation rentals and lodging, utilizes the 12 column CSS grid in its layout to organize property listings, search results, and filters, allowing users to navigate and explore available accommodations easily.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3998%2F0%2AoYT1nqq4D239Yo0H.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3998%2F0%2AoYT1nqq4D239Yo0H.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The New York Times&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The New York Times, a prominent news organization, uses the 12 column CSS grid system to arrange its articles, advertisements, and various sections, ensuring a cohesive and responsive design.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3998%2F0%2AiENscB6ZEg6FPMV5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3998%2F0%2AiENscB6ZEg6FPMV5.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Bootstrap&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bootstrap, a widely popular front-end framework, employs the 12 column CSS grid system to create responsive and flexible website designs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aj2sh_TZ6xHG5suTd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aj2sh_TZ6xHG5suTd.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Amazon&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Amazon, one of the largest eCommerce platforms globally, incorporates the 12 column CSS grid layout to organize its products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AuYhwJli5Si70oZnY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AuYhwJli5Si70oZnY.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Adobe&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adobe, a leading organization known for its creative tools, utilizes the 12 column CSS grid on its website to provide a clear and structured presentation of its various products, tutorials, and resources.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASK2_r3aRtqqPOVQb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASK2_r3aRtqqPOVQb.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Automation testing uses tools and scripts to automate software test case execution. Dive deep into our detailed blog to learn the &lt;a href="https://www.lambdatest.com/blog/types-of-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;types of automation testing&lt;/a&gt;, its benefits, best practices, and more.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Browser Compatibility of CSS Grid Layout
&lt;/h2&gt;

&lt;p&gt;We know that &lt;a href="https://www.lambdatest.com/learning-hub/cross-browser-compatibility?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;browser compatibility&lt;/a&gt; is an important aspect of web development. Every property we use to develop a website should be tested to ensure compatibility across browsers.&lt;/p&gt;

&lt;p&gt;When it comes to CSS Grid, most major browsers have support for CSS Grid. Chrome offers full support starting from version 57, Firefox from version 52, Safari from version 10.1, and Edge from version 16.&lt;/p&gt;

&lt;p&gt;The below visualization provides a detailed overview of the support for CSS Grid:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A5BeafLaeZm1dHGHR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A5BeafLaeZm1dHGHR.png" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you create a 12 column CSS grid, you can test its browser compatibility across different browsers, browser versions, devices, and platforms. For this, you can leverage cloud testing platforms like LambdaTest.&lt;/p&gt;

&lt;p&gt;LambdaTest is an AI-powered test orchestration and execution platform that allows you to perform &lt;a href="https://www.lambdatest.com/online-browser-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;browser testing&lt;/a&gt; of your 12 column CSS grid for compatibility on an &lt;a href="https://www.lambdatest.com/online-browser-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online browser farm&lt;/a&gt; of 3000+ browsers, devices, and OS combinations.&lt;/p&gt;

&lt;p&gt;Here is a sample screenshot of a browser compatibility test done on macOS Sonoma running Safari 17.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A2JpW33yNvbl1zAaB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A2JpW33yNvbl1zAaB.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Selenium is an open-source framework designed for automating web browsers for testing web applications. Delve into &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;automation testing selenium&lt;/a&gt; architecture, benefits, and more through our detailed tutorial for enhanced cross-browser testing.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Quick Recap: Basics of CSS Grid
&lt;/h2&gt;

&lt;p&gt;To understand how to create a 12 column CSS grid, we first need a basic understanding of CSS Grid fundamentals.&lt;/p&gt;

&lt;p&gt;In this section, let’s do a quick recap of the fundamentals of CSS Grid. This will provide a solid foundation for building the 12 column CSS grid layout you will learn in this blog.&lt;/p&gt;

&lt;p&gt;Additionally, if you want to master CSS Grid and learn it in detail, I recommend checking out this comprehensive guide on &lt;a href="https://www.lambdatest.com/blog/css-grid/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Grid&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;CSS Grid is a grid-based layout system that allows us to create two-dimensional layouts on the web. It utilizes rows and columns for controlling the layout. This two-dimensional structure of the grid enables us to have precise control over the placement and alignment of elements.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJIrViKSRFbkFreAk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJIrViKSRFbkFreAk.png" width="800" height="535"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The specification for CSS Grid introduced several new terminologies that are important to understand to work with grid-based layouts. Let’s take a look at them:&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Container
&lt;/h2&gt;

&lt;p&gt;A grid container is an HTML element used to create a grid layout. It establishes a grid formatting context and allows you to organize child elements into a grid structure. It serves as the parent element that contains the grid items.&lt;/p&gt;

&lt;p&gt;To create a grid container, you can use the &lt;em&gt;display&lt;/em&gt; property with the value &lt;em&gt;grid&lt;/em&gt; or &lt;em&gt;inline-grid&lt;/em&gt;. Here’s an example of creating a basic grid container:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-container {
display: grid;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Grid Item
&lt;/h2&gt;

&lt;p&gt;Grid items refer to the individual elements that are direct children of a grid container. They are the building blocks of the grid structure and are positioned within the horizontal (grid columns) and vertical (grid rows) tracks defined by the grid container.&lt;/p&gt;

&lt;p&gt;By default, a container has one grid item for each grid cell. However, using various grid properties, you can control the number of cells a grid item occupies.&lt;/p&gt;

&lt;p&gt;Below is an example of a grid container with 15 grid items where item one spans four columns:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3066%2F0%2AY4NapyXZp7lNmAKK.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3066%2F0%2AY4NapyXZp7lNmAKK.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="grid-container"&amp;gt;
      &amp;lt;div class="first-grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;2&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;3&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;4&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;5&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;6&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;7&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;8&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;9&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;10&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;11&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;12&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;13&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;14&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;15&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-container {
  background-color: #f4f4f4;
  padding: 20px;
  display: grid;
  grid-gap: 20px;
  grid-template-columns: repeat(6, 1fr);
  width: 80%;
  margin: 0 auto;
  border: 2px dotted #999;
  box-sizing: border-box;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.first-grid-item {
  background-color: salmon !important;
  grid-column: 1 / 5;
  color: white;
}


.grid-container &amp;gt; div {
  background-color: #ffffff;
  padding: 20px;
  text-align: center;
  font-size: 18px;
  border: 1px solid #dddddd;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/eYQdKyP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The best test automation frameworks include Selenium, Cypress, Playwright, and Appium. Find more about these top &lt;a href="https://www.lambdatest.com/blog/best-test-automation-frameworks/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;automation testing frameworks&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Grid Lines
&lt;/h2&gt;

&lt;p&gt;Grid lines are the dividing horizontal and vertical lines created when we define the grid. They are used to position elements within the grid.&lt;/p&gt;

&lt;p&gt;The lines in the grid are numbered starting from 1 at the start edge of the grid. The numbering follows the writing style and direction of the document or component. This means that in a left-to-right language like English, column line 1 will be on the left side, while in a right-to-left language like Arabic, it will be on the right.&lt;/p&gt;

&lt;p&gt;There are two types of grid lines: column lines and row lines. The lines between columns are called column lines, and the lines between rows are called row lines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAQeq0qXZqjMmvPc9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAQeq0qXZqjMmvPc9.png" width="386" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The highlighted blue line in this image is column line 3&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Tracks
&lt;/h2&gt;

&lt;p&gt;Grid tracks define the columns and rows in a grid container. Each row track represents the space between two row lines, and similarly, each column track represents the space between two column lines.&lt;/p&gt;

&lt;p&gt;These tracks are made by giving them a size when we create our grid. Here’s how we can create grid tracks:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;div class="grid-container"&amp;gt;
      &amp;lt;div class="grid-item"&amp;gt;
        &amp;lt;h3&amp;gt;Testimonial by Ben Pritchard&amp;lt;/h3&amp;gt;
        &amp;lt;p&amp;gt;
          Super top notch customer support from @lambdatesting - just throwing
          it out there if you're looking for a decent browser testing platform,
          they get my full double thumbs up. Thumbs upThumbs up :-)
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item"&amp;gt;
        &amp;lt;h3&amp;gt;Testimonial by Faisal Khatri&amp;lt;/h3&amp;gt;
        &amp;lt;p&amp;gt;
          Thank you LambdaTest for providing free open source license to run the
          web and mobile tests of our open source projects for free on
          Lambdatest platform.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item"&amp;gt;
        &amp;lt;h3&amp;gt;Testimonial by Michael Horne&amp;lt;/h3&amp;gt;
        &amp;lt;p&amp;gt;
          Really superb customer service from Arpit @lambdatesting tricky
          Automation problem using Selenium in Python and they talked me through
          it and got me up-and-running. Awesome. :-)
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item"&amp;gt;
        &amp;lt;h3&amp;gt;Testimonial by Mat Gargano&amp;lt;/h3&amp;gt;
        &amp;lt;p&amp;gt;
          LambdaTest is fantastic. Cross browser and device testing frustration
          is minimized. You can't get rid of clients that need ie11 nor can you
          own every device but LambdaTest bridges that gap.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  background-color: #222;
  font-family: Arial, sans-serif;
}


.grid-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr; /* Creates three equal columns */
  grid-template-rows: 200px 300px; /* First row 200 pixels, second row 300 pixels */
  gap: 10px; /* Gap of 10 pixels between grid items */
}


.grid-item {
  background-color: #333;
  border-radius: 5px;
  padding: 20px;
  color: #fff;
}


.grid-item h3 {
  margin-top: 0;
  font-size: 18px;
}


.grid-item p {
  margin-bottom: 0;
  font-size: 14px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/poQRaoE?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Improve your software testing process with our &lt;a href="https://www.lambdatest.com/blog/automation-testing-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;automation testing tutorial&lt;/a&gt;. Discover the benefits of automation testing, learn about the best tools and techniques, and get expert insights on optimizing your testing strategy.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this example, we have a grid container with three columns and two rows. We use &lt;em&gt;grid-template-columns&lt;/em&gt; and &lt;em&gt;grid-template-rows&lt;/em&gt; properties to specify the size and number of rows and columns of the grid.&lt;/p&gt;

&lt;p&gt;These properties can be set to a length value, a percentage value, or a &lt;em&gt;fr&lt;/em&gt; value. The &lt;em&gt;fr&lt;/em&gt; value is a special value representing a fraction of the available space in the grid.&lt;/p&gt;

&lt;p&gt;In our example, the &lt;em&gt;grid-template-columns&lt;/em&gt; property sets the width of each column using the &lt;em&gt;1fr&lt;/em&gt; unit, which divides the available space equally among the columns. Similarly, the &lt;em&gt;grid-template-rows&lt;/em&gt; property specifies the height of the rows, with the first row being &lt;em&gt;200px&lt;/em&gt; and the second row being &lt;em&gt;300px&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;.grid-item&lt;/em&gt; class represents the individual items within the grid. In this example, we have four grid items, each having a background color of &lt;em&gt;#333&lt;/em&gt; and some basic styles defined.&lt;/p&gt;

&lt;p&gt;In addition to specifying track sizes individually, the CSS Grid layout module provides a convenient way to repeat track patterns using the &lt;em&gt;repeat&lt;/em&gt; function. The &lt;em&gt;repeat&lt;/em&gt; function allows us to define a repeated pattern for grid tracks in a shorter syntax.&lt;/p&gt;

&lt;p&gt;In the above grid layout, instead of specifying three equal columns using &lt;em&gt;1fr 1fr 1fr&lt;/em&gt;, we can use &lt;em&gt;repeat(3, 1fr)&lt;/em&gt;. This will repeat the &lt;em&gt;1fr&lt;/em&gt; value three times, resulting in the same effect of three equal columns.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ANHSPMBmTUJI4SURv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ANHSPMBmTUJI4SURv.png" width="272" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Visualization of a grid track between third and fourth-row grid lines&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover the 17 key &lt;a href="https://www.lambdatest.com/blog/17-key-benefits-of-automation-testing-for-a-successful-release/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;benefits of automation testing&lt;/a&gt;, which will help you decide whether this is the right call for your SDLC. Find out more.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Grid Area
&lt;/h2&gt;

&lt;p&gt;A grid area is a named region in a grid layout. The &lt;em&gt;grid-area&lt;/em&gt; property assigns grid items to named grid areas within the grid container. By defining named grid areas, we can easily position and place grid items in specific grid areas.&lt;/p&gt;

&lt;p&gt;Let’s look at an example:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
      &amp;lt;header&amp;gt;Header&amp;lt;/header&amp;gt;
      &amp;lt;main&amp;gt;main&amp;lt;/main&amp;gt;
      &amp;lt;nav&amp;gt;nav&amp;lt;/nav&amp;gt;
      &amp;lt;aside&amp;gt;aside&amp;lt;/aside&amp;gt;
      &amp;lt;footer&amp;gt;footer&amp;lt;/footer&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
header {
  grid-area: header;
}
nav {
  grid-area: nav;
}
main {
  grid-area: main;
}
aside {
  grid-area: sidebar;
}
footer {
  grid-area: footer;
}
header,
footer,
main,
aside,
nav {
  background-color: #3a86ff;
  color: #fff;
  border: 1px solid #fff;
  padding: 20px;
}
.container {
  display: grid;
  grid-template-areas:
    "header header header"
    "nav main sidebar"
    "nav footer footer";
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 70px 2fr 50px;
  height: 100vh;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/JjvdMWb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we have a grid container with three columns and three rows. We use the &lt;em&gt;grid-area&lt;/em&gt; property to assign specific grid areas to the grid items. The &lt;em&gt;grid-template-areas&lt;/em&gt; property defines a named grid area layout, where each row represents a grid line, and each area name is enclosed in quotation marks.&lt;/p&gt;

&lt;p&gt;The area names defined in &lt;em&gt;grid-template-areas&lt;/em&gt; match the &lt;em&gt;grid-area&lt;/em&gt; values assigned to the elements. This association automatically allows the elements to occupy designated areas within the grid layout.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Perform live mobile &lt;a href="https://www.lambdatest.com/test-site-on-mobile?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;web device testing&lt;/a&gt; on different devices with LT Browser . Test on multiple mobile and tablet viewports and debug UI issues on the go across 50+ device viewports!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Grid Cell
&lt;/h2&gt;

&lt;p&gt;A grid cell is the smallest unit within the grid layout, representing a space bordered by two neighboring rows and two neighboring column grid lines. If you create a grid but don’t place any items in it, each grid cell will automatically be filled with one item.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A4lvaGJ2dQ6_BhARB.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A4lvaGJ2dQ6_BhARB.png" width="272" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Visualization of a grid cell between row grid lines 2 and 3 and column grid lines 1 and 2&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Gaps
&lt;/h2&gt;

&lt;p&gt;Gaps refer to the space between grid items. They can be easily controlled using the &lt;em&gt;grid-gap&lt;/em&gt; property, which allows us to define the gap size between rows and columns in a grid. (Note that this property was renamed “&lt;em&gt;gap&lt;/em&gt;” in CSS3).&lt;/p&gt;

&lt;p&gt;New to CSS3? Check out this complete &lt;a href="https://www.lambdatest.com/blog/css3-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS3 tutorial&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;grid-gap&lt;/em&gt; property serves as a shorthand for the &lt;em&gt;grid-row-gap&lt;/em&gt; and &lt;em&gt;grid-column-gap&lt;/em&gt; properties. The &lt;em&gt;grid-row-gap&lt;/em&gt; property is responsible for controlling the size of the gap between rows, while the &lt;em&gt;grid-column-gap&lt;/em&gt; property controls the size of the gap between columns.&lt;/p&gt;

&lt;p&gt;Note that the &lt;em&gt;grid-row-gap&lt;/em&gt; and &lt;em&gt;grid-column-gap&lt;/em&gt; properties were renamed to &lt;em&gt;row-gap&lt;/em&gt; and &lt;em&gt;column-gap&lt;/em&gt; respectively.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  row-gap: 20px; /* sets the gap between rows*/
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Below is a visualization of a 20-pixel row gap in a grid layout:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6eKcDncEjMTyahG0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6eKcDncEjMTyahG0.png" width="800" height="305"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  gap: 20px; /* sets both row gap and columns gap*/
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Here’s another visualization with a 20-pixel gap between both rows and columns:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AswAYwLjfpKHLRWm8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AswAYwLjfpKHLRWm8.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  How to Create a 12 Column Grid With CSS
&lt;/h2&gt;

&lt;p&gt;In the previous sections, we explored the concept of a 12 column CSS grid, its significance, and the essential considerations before getting started. We also looked at its browser compatibility and saw examples of popular websites that use it in their layouts.&lt;/p&gt;

&lt;p&gt;In this section, let’s dive into the practical implementation steps and create the 12 column CSS grid.&lt;/p&gt;

&lt;p&gt;To demonstrate this, we will create a web page with a header, a product page, and a featured product section. We will also make it responsive to ensure it renders seamlessly across various devices and screen sizes.&lt;/p&gt;

&lt;p&gt;One of the key considerations for responsiveness is the effective use of &lt;a href="https://www.lambdatest.com/blog/responsive-css-media-queries-for-responsive-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS media queries&lt;/a&gt;. Media queries allow us to define specific CSS rules that will be triggered when certain screen widths are met.&lt;/p&gt;

&lt;p&gt;In our implementation, we will define &lt;a href="https://www.lambdatest.com/blog/common-css-breakpoints/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS breakpoints&lt;/a&gt; at various screen widths to address common device categories like mobile phones, tablets, and desktops. By adjusting our CSS rules within these breakpoints, we can optimize the layout for each device category.&lt;/p&gt;

&lt;p&gt;But before we proceed, here’s a sneak peek of our webpage:&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/PNzKAjRU46k"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;We will create a 12 column CSS grid clone of a popular eCommerce website. The website is implemented keeping responsiveness and cross-browser &amp;amp; cross-platform compatibility in mind.&lt;/p&gt;

&lt;p&gt;Here are some of the renders captured on different view-port sizes using &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LT Browser&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Desktop view:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AO0Ce1h4oK4ChDSk0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AO0Ce1h4oK4ChDSk0.png" width="800" height="469"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mobile view:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AUT-GdRs2BkoUceRI.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AUT-GdRs2BkoUceRI.png" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In case you want to get your hands dirty by experimenting with the responsive eCommerce website, feel free to download the source code.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Perform live mobile website tests on different devices with LT Browser . Test on multiple mobile and tablet viewports, &lt;a href="https://www.lambdatest.com/test-site-on-mobile?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;view website on different devices &lt;/a&gt; and debug UI issues on the go across 50+ device viewports!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Demo: Creating a 12 Column CSS Grid
&lt;/h2&gt;

&lt;p&gt;Now, let’s move on to setting up the HTML structure for our webpage. The HTML structure serves as the foundation for our layout and content. It provides the necessary elements and tags that will define the structure and organization of our page.&lt;/p&gt;

&lt;p&gt;Our page will have a header, a section containing some products, followed by a section with a featured product. (Please note that in this context, by the term “section,” we refer to a general area of content rather than the specific HTML &lt;em&gt;&amp;lt; section &amp;gt;&lt;/em&gt; element.)&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/GRwryqd?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
First, we have a header that contains the logo, search input, and some nav links, including a cart.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;header&amp;gt;
      &amp;lt;div class="grid-item-brand"&amp;gt;
        &amp;lt;a href="#" class="logo"&amp;gt;
          &amp;lt;img src="./assets/logo.svg" alt="LambdaTest" /&amp;gt;
        &amp;lt;/a&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item-search"&amp;gt;
        &amp;lt;input
          type="text"
          class="search-input"
          placeholder="Search for products"
        /&amp;gt;
        &amp;lt;button class="search-button"&amp;gt;
          &amp;lt;img src="./assets/search-icon.png" alt="search-icon" /&amp;gt;
        &amp;lt;/button&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item-account"&amp;gt;
        &amp;lt;a href="#" class="nav-link"&amp;gt;Sign in&amp;lt;/a&amp;gt;


        &amp;lt;a href="#" class="nav-link cart-link"&amp;gt;
          Cart
          &amp;lt;span class="cart-count"&amp;gt;0&amp;lt;/span&amp;gt;
        &amp;lt;/a&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/header&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the above HTML, we divided our header items into three sections. The first section is the logo, the second section is the search-related elements, and the third is account-related elements like sign-in and the cart.&lt;/p&gt;

&lt;p&gt;So, in CSS, when we make the header element a grid, each section will be a grid item because they are direct children of the header. We can then style our grid items to occupy the desired space.&lt;/p&gt;

&lt;p&gt;After the &lt;em&gt;header&lt;/em&gt; element, we have our main element, which contains a theme image, a section on the products, and a section on the featured product. Let’s first look at the products section structure:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;main&amp;gt;
&amp;lt;img class="theme-image" src="./assets/theme-img.jpg" alt="Theme Image" /&amp;gt;
      &amp;lt;div class="products-container"&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;Kindle E readers&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/kindle.jpg" alt="Kindle E readers" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;Shop Laptops &amp;amp; Tablets&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/laptops.jpg" alt="Shop Laptops &amp;amp; Tablets" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;Home refresh ideas&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/homeRefreshIdeas.jpg" alt="Home refresh ideas" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;For your Fitness Needs&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/fitness.jpg" alt="For your Fitness Needs" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;New arrivals in Toys&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/toys.jpg" alt="New arrivals in Toys" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;Shop activity trackers and smartwatches&amp;lt;/h1&amp;gt;
          &amp;lt;img
            src="./assets/smartwatch.jpg"
            alt="Shop activity trackers and smartwatches"
          /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;Create with strip lights&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/light.jpg" alt="Create with strip lights" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="product"&amp;gt;
          &amp;lt;h1&amp;gt;Shop Pet supplies&amp;lt;/h1&amp;gt;
          &amp;lt;img src="./assets/pets.jpg" alt="Shop Pet supplies" /&amp;gt;
          &amp;lt;a href="https://www.amazon.com/"&amp;gt;Shop now&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the above HTML, we have a &lt;em&gt;main&lt;/em&gt; element, and within that element, we have a theme image and a products section with the class &lt;em&gt;.products-container&lt;/em&gt;, which lists all our products.&lt;/p&gt;

&lt;p&gt;Inside that container, we have 8 products with the class &lt;em&gt;.product&lt;/em&gt;. Each product has an h1, an image, and an anchor tag. That’s it about our products section.&lt;/p&gt;

&lt;p&gt;Let’s look at the second section of the &lt;em&gt;main&lt;/em&gt; element, which has our featured product.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;div class="featured-section"&amp;gt;
        &amp;lt;img src="./assets/featured-product.jpg" alt="featured-product" /&amp;gt;
        &amp;lt;div class="banner-text"&amp;gt;
          &amp;lt;h1&amp;gt;Snap 12x18 Black Wood Wall Photo Frame&amp;lt;/h1&amp;gt;
          &amp;lt;p&amp;gt;
            A timeless flat black frame that holds a 12x18 image without a mat.
            Contemporary narrow frame profile and flex tab back opening allowing
            you to easily add and remove photos or art. Each frame includes
            ready-to-hang durable hangers on the back for vertical or horizontal
            hanging options.Frame is crafted from durable solid wood.
            Lightweight protective glass will keep your favorite photos looking
            great for years.
          &amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/main&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the above HTML, we have a parent div with the class &lt;em&gt;.featured-section&lt;/em&gt;. Inside that section, we have an image followed by a &lt;em&gt;div&lt;/em&gt; element with the class &lt;em&gt;.banner-text&lt;/em&gt; that introduces the product. Finally, we close our &lt;em&gt;main&lt;/em&gt; tag that started from the products section.&lt;/p&gt;

&lt;p&gt;Now that we have our HTML structure in place, let’s move to the fun part of building the 12 column CSS grid layout to style our page.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Online browser compatibility testing of your website &amp;amp; web app with a &lt;a href="https://www.lambdatest.com/online-device-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Device Farm&lt;/a&gt; on cloud. Get instant access of Browsers like Safari, Chrome, Firefox, Opera, Yandex. 3000+ mobile and desktop environments.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Building the 12 Column Grid Layout
&lt;/h2&gt;

&lt;p&gt;Before we proceed to write any style, let’s first reset the browser defaults using the below lines:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This will set the &lt;em&gt;margin&lt;/em&gt; to , &lt;em&gt;0 padding&lt;/em&gt; to &lt;em&gt;0&lt;/em&gt;, and &lt;em&gt;box-sizing&lt;/em&gt; to &lt;em&gt;border-box&lt;/em&gt; on every element of the page.&lt;/p&gt;

&lt;p&gt;Next, we will enhance the body element by adding a background color, font color, and font style to it:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  background-color: #f0f2f2;
  color: #0f1111;
  font-family: "Roboto", sans-serif;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Header: 12 Column CSS Grid
&lt;/h3&gt;

&lt;p&gt;Now, let’s begin with our actual layout. The first section of our layout is the header.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJNdBMC9kzijVdsm_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AJNdBMC9kzijVdsm_.png" width="800" height="61"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the header, we have 3 main sections. First is the logo, second is the search element, and third is the account-related elements. Notice how the search input is centered, taking the most space.&lt;/p&gt;

&lt;p&gt;To achieve this layout, we will make the header element a 12 columns CSS grid and then divide these columns between the 3 items accordingly to make them take up the needed space. Let’s look at the entire code first, and then we will break it down.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* header styles */
header {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: 10px;
  align-items: center;
  background-color: #131921;
  color: #fff;
  padding: 10px;
}
/* Logo wrapper styles */
.grid-item-brand {
  grid-column: span 2;
  justify-self: center;
}


/* Logo img */
.logo img {
  height: 45px;
}


/* Search input wrapper styles */
.grid-item-search {
  display: flex;
  align-items: center;
  grid-column: 4 / span 6;
}


/* Search input styles */
.search-input {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  outline: none !important;
  border: none;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}


/* Search button styles */
.search-button {
  background-color: #f8c06c;
  color: #fff;
  font-size: 14px;
  border: none;
  cursor: pointer;
  width: 10%;
  padding: 8.2px;
  outline: none !important;
  border-top-right-radius: 3px;
  border-bottom-right-radius: 3px;
}
.search-button img {
  width: 20px;
  object-fit: contain;
}
/* Account wrapper styles */
.grid-item-account {
  grid-column: span 3;
  justify-self: center;
}
/* Navigation link styles */
.nav-link {
  color: #fff;
  text-decoration: none;
  margin-right: 30px;
  font-size: 16px;
}


/* Cart link styles */
.cart-link {
  position: relative;
}


.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  display: inline-block;
  background-color: #ff4444;
  color: #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 12px;
  text-align: center;
  line-height: 16px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Let’s break down the important parts of the code and understand how we are laying out the header elements using a 12 column CSS grid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AY1lGckWu8nrem_aq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AY1lGckWu8nrem_aq.png" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;First, we set up the grid on the &lt;em&gt;header&lt;/em&gt; element using the &lt;em&gt;display: grid&lt;/em&gt; property. This makes the &lt;em&gt;header&lt;/em&gt; a grid container. Next, we define the grid to be 12 columns using the &lt;em&gt;grid-template-columns: repeat(12, 1fr)&lt;/em&gt; property. This creates 12 columns, each having an equal fraction of the available space (&lt;em&gt;1fr&lt;/em&gt; means one fraction). So, the grid now gets divided into 12 equal-width columns.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AqJ50PRQ0wlFzu_wj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AqJ50PRQ0wlFzu_wj.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To create spacing between the grid items, we set the &lt;em&gt;grid-gap&lt;/em&gt; property to &lt;em&gt;10px&lt;/em&gt;. This adds a 10-pixel gap between the grid items both horizontally and vertically. So, when you want to add space in grid items, you can use this property in the grid container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AqA4gydLYxTZDZk4G.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AqA4gydLYxTZDZk4G.png" width="604" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we want to vertically align the items within the grid container. The &lt;em&gt;align-items: center&lt;/em&gt; property ensures that the items are centered vertically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_w3wvMVubY5KcjLZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_w3wvMVubY5KcjLZ.png" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We also specify some visual styles for the header, such as setting the &lt;em&gt;background-color&lt;/em&gt; to &lt;em&gt;#131921&lt;/em&gt; (a dark color) and the text color to &lt;em&gt;#fff&lt;/em&gt;. Additionally, we add &lt;em&gt;padding: 10px&lt;/em&gt; to create some space inside the header.&lt;/p&gt;

&lt;p&gt;Moving on to the grid items within the header, the first item is the logo with the class &lt;em&gt;.grid-item-brand&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AET1rwdaLvDcsa_eV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AET1rwdaLvDcsa_eV.png" width="650" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Find a &lt;a href="https://www.lambdatest.com/aws-device-farm-alternative?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;AWS device farm pricing&lt;/a&gt; alternative for better performance, coverage &amp;amp; support at a fraction of cost. Try LambdaTest for free!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To add content in grid columns, you can use the &lt;em&gt;grid-column&lt;/em&gt; property. In this case, we make the &lt;em&gt;.grid-item-brand&lt;/em&gt; element span 2 columns using the &lt;strong&gt;&lt;em&gt;grid-column: span 2 property&lt;/em&gt;&lt;/strong&gt;. So, out of our 12 columns header, we allocate 2 columns to the logo.&lt;/p&gt;

&lt;p&gt;To ensure the logo is visually centered within these two columns, we apply the &lt;em&gt;justify-self: center&lt;/em&gt; property. This brings symmetry to the layout by aligning the logo horizontally.&lt;/p&gt;

&lt;p&gt;The next item in the header is the search container with the class &lt;em&gt;.grid-item-search&lt;/em&gt;. It has an input and a button element within it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2652%2F0%2Av3wVA2JMG4ElQoHC.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2652%2F0%2Av3wVA2JMG4ElQoHC.png" width="800" height="405"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAdXruL9aVVueYQv4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAdXruL9aVVueYQv4.png" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This container is set to span 6 columns starting from the 4th column using &lt;em&gt;grid-column: 4 / span 6&lt;/em&gt;. If you are confused about what’s happening here, let’s break it down.&lt;/p&gt;

&lt;p&gt;We know that our logo took 2 columns out of 12, so next, we skipped column 3 to have a space and then started the search container from column 4 and spanned it across 6 columns. That means the logo takes 2 columns, the search container takes 6 columns, and skipping 1 column adds up making 9 columns occupied. Now we have 3 columns left.&lt;/p&gt;

&lt;p&gt;You may also have noticed the &lt;em&gt;display: flex&lt;/em&gt; on the search container. This makes the container a flex container, allowing us to align its contents easily. We could have achieved the same using just the grid, but since combining both &lt;a href="https://www.lambdatest.com/blog/css-flexbox-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;CSS Flexbox&lt;/a&gt; and grid in creating layouts is a common practice, it’s good to know where this might fit in.&lt;/p&gt;

&lt;p&gt;The last element in our grid is the grid item with the class &lt;em&gt;.grid-item-account&lt;/em&gt;, which has two anchor tags inside it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2068%2F0%2AO41fuucVSk_NJ4-M.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2068%2F0%2AO41fuucVSk_NJ4-M.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A5OOrreNPgNuwAEzp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A5OOrreNPgNuwAEzp.png" width="650" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It spans 3 columns using &lt;em&gt;grid-column: span 3&lt;/em&gt;; and is centered horizontally within the allocated columns using &lt;em&gt;justify-self: center&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;With LambdaTest’s &lt;a href="https://www.lambdatest.com/smart-visual-ui-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Smart Visual UI Testing&lt;/a&gt;, ensure visual perfection and deliver seamless websites and web applications 3000+ devices. Try now!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Main Container: Theme Image
&lt;/h3&gt;

&lt;p&gt;Now that we are done with creating and styling the header layout. Let’s move on to the next element of the page, which is our &lt;em&gt;main&lt;/em&gt; container. The main container has 3 sections. First is a theme image, second is the product container, and third is a featured product section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aopv5lbB27CTchU4_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aopv5lbB27CTchU4_.png" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let’s start by laying out the theme image.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main .theme-image {
width: 100%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this case, we simply set the image’s width to &lt;em&gt;100%&lt;/em&gt;. Here, using a grid is unnecessary. One of the essential principles of writing CSS is to avoid unnecessary complexity. If a task can be accomplished without a grid, keeping the code concise and efficient is considered best practice.&lt;/p&gt;
&lt;h3&gt;
  
  
  Products: 12 Column CSS Grid
&lt;/h3&gt;

&lt;p&gt;The next element in our main container is the products section. It has 4 cards in each row with a subtle gap between each of them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aicww3p77Tbs_ESKE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Aicww3p77Tbs_ESKE.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is how we have created the layout:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.products-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 20px;
  padding: 0 20px;
  margin: 3em 0;
}


.product {
  background-color: #fff;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease;
}


.product:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}


.product h1 {
  margin-bottom: 10px;
  font-size: 21px;
  line-height: 27.3px;
}


.product img {
  width: 100%;
  height: 300px; /* Set a fixed height of 300px for the images */
  object-fit: cover;
  margin-bottom: 10px;
}


.product a {
  display: block;
  margin-top: auto;
  color: #007185;
  text-decoration: none;
}


.product a:hover {
  text-decoration: underline;
  color: #ff9900;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Let’s break down the code:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAwYyLEQ3yVQEHKwj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAwYyLEQ3yVQEHKwj.png" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above snippet, we first set up the grid on the div element that has the class . &lt;em&gt;products-container&lt;/em&gt; by using &lt;em&gt;display:grid&lt;/em&gt;. This tells the browser to treat this container as a grid element.&lt;/p&gt;

&lt;p&gt;Next, we define the columns of our grid using the &lt;em&gt;grid-template-columns&lt;/em&gt; property. In this case, we use &lt;em&gt;repeat(4, 1fr)&lt;/em&gt;, which means we want four columns, each occupying an equal fraction of available space &lt;em&gt;(1fr)&lt;/em&gt;. This ensures that our grid can accommodate four product item cards in a single row. Each column will dynamically adjust its width to evenly distribute the available space.&lt;/p&gt;

&lt;p&gt;Then, we add some spacing between grid items using the &lt;em&gt;grid-gap&lt;/em&gt; property. By setting it to &lt;em&gt;20px&lt;/em&gt;, we create a gap of 20 pixels between each grid item.&lt;/p&gt;

&lt;p&gt;Moving on, we have div elements with the class &lt;em&gt;.product&lt;/em&gt;, representing each item within the products container grid. This class is responsible for styling individual product elements within the layout.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2624%2F0%2A4BG4CLIbrOzCvur0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2624%2F0%2A4BG4CLIbrOzCvur0.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ACH08YU8bDfnvXklx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ACH08YU8bDfnvXklx.png" width="800" height="529"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this Selenium C# tutorial, we are going to help you set up &lt;a href="https://www.lambdatest.com/blog/setting-up-selenium-in-visual-studio/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Selenium Visual Studio&lt;/a&gt; and run your first Selenium C# example script for automated browser testing of your web-application.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Firstly, we set the background color of each product element to &lt;em&gt;white (#fff)&lt;/em&gt; and apply a padding of &lt;em&gt;20px&lt;/em&gt; to create some space inside the element. To give the elements a subtle shadow effect, we use the &lt;em&gt;box-shadow&lt;/em&gt; property with specific values.&lt;/p&gt;

&lt;p&gt;Next, we utilize flexbox properties to control the layout of the product elements. By setting the &lt;em&gt;display&lt;/em&gt; to &lt;em&gt;flex&lt;/em&gt; and &lt;em&gt;flex-direction&lt;/em&gt; to &lt;em&gt;column&lt;/em&gt;, we ensure that the content within each product is arranged vertically.&lt;/p&gt;

&lt;p&gt;Finally, we set the &lt;em&gt;grid-column&lt;/em&gt; property with the value &lt;em&gt;span 3&lt;/em&gt;, which indicates that each product element will occupy three columns of the 12 column grid container. This means that we will have a total of four products placed horizontally in each row of our grid layout.&lt;/p&gt;

&lt;p&gt;Within each product, we have an &lt;em&gt;h1&lt;/em&gt; element for the title, an image element for the product image, and an anchor element for the link. To ensure a harmonious design, we apply some basic styles to these elements. For instance, the &lt;em&gt;h1&lt;/em&gt; element receives a margin-bottom of &lt;em&gt;10px&lt;/em&gt;, a font size of &lt;em&gt;21px&lt;/em&gt;, and a line height of &lt;em&gt;27.3px&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2620%2F0%2AtKDG1SICmJXE2ItY.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2620%2F0%2AtKDG1SICmJXE2ItY.png" width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, we set the img element to occupy the full width of its container using &lt;em&gt;width: 100%&lt;/em&gt; while maintaining a fixed height of &lt;em&gt;300px&lt;/em&gt;. The &lt;em&gt;object-fit&lt;/em&gt; property is applied with the value of &lt;em&gt;“cover”&lt;/em&gt; to ensure the image retains its aspect ratio and fits neatly within the allocated space. Additionally, we add a bottom margin of &lt;em&gt;10px&lt;/em&gt; to provide a subtle spacing between the image and the anchor element.&lt;/p&gt;

&lt;p&gt;Next, we style the anchor tags by setting a color, removing the text decoration, and adding the &lt;em&gt;margin-top: auto&lt;/em&gt;. Note that this margin top is crucial in positioning the links within each product card. It ensures that the links are consistently aligned at the bottom of each card, regardless of the content inside.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AaeXyTqfmoru-euW8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AaeXyTqfmoru-euW8.png" width="664" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Without this property, the links would be positioned in different vertical locations within each card, resulting in an uneven layout.&lt;/p&gt;

&lt;p&gt;With these styles in place, we are done creating and styling the layout for the second section of our &lt;em&gt;main&lt;/em&gt; container.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This tutorial focuses on &lt;a href="https://www.lambdatest.com/learning-hub/playwright-visual-regression-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Playwright visual regression testing&lt;/a&gt;, providing a reliable way to test web applications and ensure that they look and behave correctly across different browsers and platforms.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Featured Products: 12 Column CSS Grid
&lt;/h3&gt;

&lt;p&gt;Now, we can move on to the last and final part which is designing the featured products section. This section is relatively straightforward, so let’s dive right in.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Ae_5mHjUB5Upfxs2T.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Ae_5mHjUB5Upfxs2T.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have the product image on the left and some text on the right. Below is our CSS to achieve this:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;main .featured-section {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  max-width: 1200px;
  margin: 60px auto;
  padding: 20px;
}


main .featured-section img {
  grid-column: span 6;
  width: 100%;
  border-radius: 6px;
}


main .featured-section .banner-text {
  grid-column: 8 / span 5;
}
main .featured-section .banner-text h1 {
  margin-bottom: 20px;
  font-size: 3rem;
}


main .featured-section .banner-text p {
  line-height: 28px;
  font-size: 1.1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Agskw-0Z2_SvgkXy9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Agskw-0Z2_SvgkXy9.png" width="800" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To begin with, we establish a grid container on the &lt;em&gt;.featured-section&lt;/em&gt; class element. Then, we define the columns of the grid by setting the &lt;em&gt;grid-template-columns: repeat(12, 1fr)&lt;/em&gt; property. This creates 12 equally sized columns using the &lt;em&gt;repeat()&lt;/em&gt; function.&lt;/p&gt;

&lt;p&gt;Next, to control the overall width of the featured section, we set the &lt;em&gt;max-width to 1200px&lt;/em&gt;. This limits the container width to 1200 pixels. Then we set the &lt;em&gt;margin: 60px auto&lt;/em&gt;, which centers the section horizontally within its container, creating some space around it. Additionally, we apply a &lt;em&gt;padding&lt;/em&gt; of &lt;em&gt;20px&lt;/em&gt; to add some space between the content and the edges of the section.&lt;/p&gt;

&lt;p&gt;The featured section contains an image that occupies half of the container’s width. To achieve this visually, we assigned the image to span six columns using &lt;em&gt;grid-column: span 6&lt;/em&gt;. By doing so, the image effectively takes up 50% of the available space within the 12 column grid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ArjW9pHFu5LeX9ZUs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ArjW9pHFu5LeX9ZUs.png" width="726" height="482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next to the image, we have the banner text represented by the class &lt;em&gt;.banner-text&lt;/em&gt;. To position it correctly, we skip column 7 and allocate five columns starting from the eighth column of the grid. This ensures the banner text occupies columns 8 to 12, using the available space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A2MbirPp61Teg8HKm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A2MbirPp61Teg8HKm.png" width="800" height="613"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Explore the best 25 &lt;a href="https://www.lambdatest.com/blog/visual-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;visual regression testing tools&lt;/a&gt; for a seamless user experience in 2023. Find your perfect tool today with our comprehensive list.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Lastly, we provide some basic styles to the h1 and the p tag of the &lt;em&gt;.banner-text&lt;/em&gt; element to enhance their appearance.&lt;/p&gt;

&lt;p&gt;With the completion of this section, we have successfully built and styled the 12 column CSS grid layout for our web page.&lt;/p&gt;

&lt;p&gt;However, we must address an important aspect that’s currently missing. Its responsiveness! Right now, our layout is not optimized for smaller screens, resulting in a not-so-seamless experience.&lt;/p&gt;

&lt;p&gt;So, in the next section, we will dive right into making web pages responsive. The best part? It’s remarkably simple! By implementing a few changes, we’ll ensure our web page looks seamless on every device.&lt;/p&gt;
&lt;h2&gt;
  
  
  Responsiveness in 12 Column CSS Grid
&lt;/h2&gt;

&lt;p&gt;In this section, we focus on making the layout more adaptable in smaller screen sizes. To achieve this, we will utilize media queries, which allow us to apply specific styles based on the screen width.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A9W9erCNFEt8-5_Rn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A9W9erCNFEt8-5_Rn.png" width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Responsive Testing using LT Browser&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Realizing Responsive Header&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s begin with the header.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media screen and (max-width: 868px) {
  header {
    display: flex;
    padding: 5px;
    justify-content: space-between;
  }
 .logo img {
    height: 25px;
  }
  .grid-item-search {
    flex: 1;
    align-items: end;
  }
  .search-input {
    width: 100%;
  }
  .search-button {
    width: 30px;
  }
  .grid-item-account {
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  .nav-link {
    margin-right: 10px;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the above code snippet, we use a media query to target screens with a maximum width of 868 pixels or less. Within this media query, we made a few changes to enhance the layout of the header to make it more adaptable on smaller screens.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AhFLPIXloTcIgz5El.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AhFLPIXloTcIgz5El.png" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Firstly, we reduced the padding of the header to 5 pixels. This adjustment helps in conserving space and creates a more compact appearance.&lt;/p&gt;

&lt;p&gt;Secondly, we switched from a grid layout to a flexbox by setting the header’s &lt;em&gt;display&lt;/em&gt; property to &lt;em&gt;flex&lt;/em&gt;. By doing so, the header items are aligned in a row, allowing them to better fit within the limited space.&lt;/p&gt;

&lt;p&gt;To ensure optimal positioning of the items, we set &lt;em&gt;justify-content: space-between&lt;/em&gt;. This aligns the items at the beginning and end of the header, creating space between them and effectively placing them on opposite sides.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Aq2mPML-OFwhp2_m6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Aq2mPML-OFwhp2_m6.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, we’ll decrease the logo image height from &lt;em&gt;45px&lt;/em&gt; to &lt;em&gt;25px&lt;/em&gt; and apply some simple styles to the search container to ensure it occupies less space.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ASAU_YeXrsTsYlKgO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ASAU_YeXrsTsYlKgO.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Moving on to the account section, we targeted the element with the class &lt;em&gt;.grid-item-account&lt;/em&gt; and changed its &lt;em&gt;display&lt;/em&gt; property to &lt;em&gt;flex&lt;/em&gt;, enabling its contents to be displayed in a row instead of occupying separate grid columns. We also set &lt;em&gt;justify-content&lt;/em&gt; to the &lt;em&gt;end&lt;/em&gt; and &lt;em&gt;align-items&lt;/em&gt; to the &lt;em&gt;center&lt;/em&gt;. These adjustments optimize the presentation of account elements on smaller screens, efficiently using the available space.&lt;/p&gt;

&lt;p&gt;We also reduce the &lt;em&gt;margin-right&lt;/em&gt; of individual items to &lt;em&gt;10 pixels&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ApHyotXgpOal2UR4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ApHyotXgpOal2UR4b.png" width="742" height="596"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If there were multiple items in this section, we could implement a menu to allow the user to toggle between them. However, since we only have two items, a menu is unnecessary for our case.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Boost your testing efficiency with LambdaTest’s &lt;a href="https://www.lambdatest.com/test-intelligence/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Test Intelligence&lt;/a&gt;. Gain valuable insights, flaky test trends, and accelerate your release cycles. Try LambdaTest today!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Realizing Products Section Responsiveness&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that we are done with making our header responsive, let’s move on to the next section of our web page, i.e., the products section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A0wC1iksvMIW8O8tq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A0wC1iksvMIW8O8tq.png" width="800" height="426"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A93TftO9oDT-SHc-F.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A93TftO9oDT-SHc-F.jpg" width="800" height="530"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AN-PKegvbx3cposK6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AN-PKegvbx3cposK6.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above screenshots were rendered using LT Browser — a &lt;a href="https://www.lambdatest.com/responsive-checker?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;responsive website checker&lt;/a&gt; by the LambdaTest platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LT Browser&lt;/a&gt; is a responsive testing tool for testing mobile-friendliness. It enables you to conduct responsiveness tests on webpages to ensure they function flawlessly on various screen sizes. With LT Browser, you can access over 50 different device viewports.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rqFeuaZ-wAY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Read through the blog to understand what is &lt;a href="https://www.lambdatest.com/blog/test-observability/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;test observability&lt;/a&gt; and how it can improve your testing process.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Catch up on the latest testing tutorials around &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium automation, Cypress testing&lt;/a&gt;, and more. Subscribe to the &lt;a href="https://www.youtube.com/c/LambdaTest?sub_confirmation=1?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=youtube" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel&lt;/a&gt; for quick updates.&lt;/p&gt;

&lt;p&gt;These viewports can be used to assess and fine-tune the responsiveness of your webpage. LT Browser provides viewports for both Android and iOS device viewports, allowing you to test and optimize your 12 column CSS grids.&lt;/p&gt;

&lt;p&gt;Check the documentation — &lt;a href="https://www.lambdatest.com/support/docs/lt-browser/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=support_doc" rel="noopener noreferrer"&gt;Getting Started With LT Browser&lt;/a&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media screen and (max-width: 968px) {
  .products-container {
    max-width: 100%;
    width: 500px;
    margin: 3em auto;
    gap: 40px;
    grid-template-columns: 1fr;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For the products section, we target all the screens with a width of &lt;em&gt;968px&lt;/em&gt; or less.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AaegReHSqygJUEHT2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AaegReHSqygJUEHT2.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To begin with, we select the &lt;em&gt;.products-container&lt;/em&gt; and set a max-width of 500 pixels to it. This ensures that our container doesn’t take more than 500 pixels width on smaller screens. Next, we adjust the &lt;em&gt;margin&lt;/em&gt; to &lt;em&gt;3em auto&lt;/em&gt;. This adds a margin of &lt;em&gt;3em&lt;/em&gt; on top and bottom and &lt;em&gt;auto&lt;/em&gt; on the left and right, which centers the container horizontally.&lt;/p&gt;

&lt;p&gt;Additionally, we increase the spacing between the items by setting the gap to &lt;em&gt;40px&lt;/em&gt;. Next, we change our layout from 12 columns to 1 column.&lt;/p&gt;

&lt;p&gt;By doing this, we ensure that each product takes up the entire container width, allowing it to stack vertically rather than being arranged horizontally. Lastly, we define the columns to be &lt;em&gt;1fr&lt;/em&gt;, which specifies that the grid container should have a single column with a flexible width that occupies the entire available space.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Realizing responsiveness of the ‘Featured Product’&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Moving on to the next section of our web page, we have the featured product section.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AjbqrNE8NhFhX0NqU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AjbqrNE8NhFhX0NqU.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To optimize its display for smaller screen sizes, let’s add a responsive breakpoint.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@media screen and (max-width: 868px) {
  .featured-section img {
    grid-column: 2 / span 10; /* start at column 2 and span 10 columns*/
    margin-bottom: 20px;
  }


  .featured-section .banner-text {
    grid-column: 3 / span 8; /* start at column 3 and span 8 columns*/
    text-align: center;
  }


  .featured-section .banner-text h1 {
    font-size: 2rem;
  }


  .featured-section .banner-text p {
    line-height: 24px;
    font-size: 1rem;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Similar to our header breakpoint, this code snippet also utilizes a media query to target screens with a width of 868 pixels or less. Let’s break it down:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2808%2F0%2ABhDvIg-brz_D4oOm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2808%2F0%2ABhDvIg-brz_D4oOm.png" width="800" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This article sheds light on the best &lt;a href="https://www.lambdatest.com/blog/cross-browser-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;cross browser testing tools&lt;/a&gt; to look for in 2023.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Within this media query, we start by targeting the image element within the featured section. We use the &lt;em&gt;grid-column&lt;/em&gt; property to specify that the image should start at column 2 and span across 10 columns. This adjustment ensures that the image occupies a significant portion of the available space, making it more prominent on smaller screens.&lt;/p&gt;

&lt;p&gt;Additionally, we add a &lt;em&gt;20px&lt;/em&gt; margin at the bottom of the image, creating spacing between the image and the text.&lt;/p&gt;

&lt;p&gt;Next, we modify the styles of the banner text element. Using the &lt;em&gt;grid-column&lt;/em&gt; property again, we set it to start from column 3 and span across 8 columns. By doing this, we allocate a narrower space for the text content, allowing it to fit more appropriately within the smaller screen size. To ensure better alignment, we also apply the &lt;em&gt;text-align: center&lt;/em&gt; property to center the text horizontally.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2776%2F0%2A6zljK9QEv4lZ6aKv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2776%2F0%2A6zljK9QEv4lZ6aKv.png" width="800" height="255"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to further optimize the typography within the banner text, we have made some additional adjustments. The font size of the &lt;em&gt;h1&lt;/em&gt; heading is set to &lt;em&gt;2rem&lt;/em&gt;, which ensures it is appropriately sized for smaller screens. To enhance readability, we have also reduced the line height of the paragraph (p) to &lt;em&gt;24px&lt;/em&gt;, which reduces the spacing between lines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2APY_UTu6WFiIs0QHf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2APY_UTu6WFiIs0QHf.png" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Furthermore, we have adjusted the font size of the paragraph to &lt;em&gt;1rem&lt;/em&gt;, ensuring it remains small and legible on smaller screens.&lt;/p&gt;

&lt;p&gt;With these modifications in place, our 12 column CSS grid layout is now fully responsive and adapts seamlessly to all screen sizes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The best test automation frameworks include Selenium, Cypress, Playwright, and Appium. Find more about these top &lt;a href="https://www.lambdatest.com/blog/best-test-automation-frameworks/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;test automation frameworks&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Wrap it up!
&lt;/h2&gt;

&lt;p&gt;A 12 column CSS grid is a powerful tool for creating modern, flexible, and responsive layouts. In this tutorial, we learned everything you need to know about 12 column CSS grids, from the basics of CSS grids to how to create a responsive 12 column grid layout.&lt;/p&gt;

&lt;p&gt;We started by discussing what a 12 column grid is, and some real-world examples that use 12 column CSS grids. Then we discussed the prerequisites for 12 column CSS grids. With a 12 column grid layout, we built a fully responsive web page. Additionally, we learned how to make these layouts responsive for different devices. We also discussed browser support for CSS Grids to ensure our grid layout works across all browsers.&lt;/p&gt;

&lt;p&gt;I hope this blog has given you a thorough understanding of the 12 column CSS grid and equipped you with the ability to create them.&lt;/p&gt;

&lt;p&gt;It’s time for you to make some amazing websites utilizing the power of this incredible layout module!&lt;/p&gt;

&lt;p&gt;Until next time, happy coding!&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the 12 column grid structure?
&lt;/h3&gt;

&lt;p&gt;The 12 column grid structure is a design framework used in web development. It divides a webpage into 12 equal-width columns, providing a flexible layout system. Designers can assign different numbers of columns to various page elements, making it easy to create responsive and visually pleasing layouts.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A Complete Guide To CSS Cascade Layers</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Thu, 20 Jul 2023 09:45:14 +0000</pubDate>
      <link>https://forem.com/testmuai/a-complete-guide-to-css-cascade-layers-2kn1</link>
      <guid>https://forem.com/testmuai/a-complete-guide-to-css-cascade-layers-2kn1</guid>
      <description>&lt;p&gt;In our increasingly diverse online world, developing websites that cater to different languages and audiences is crucial. In today’s era, a one-size-fits-all approach is no longer sufficient.&lt;/p&gt;

&lt;p&gt;CSS — the style language of the web was developed with the English language in mind, and English is written from left to right. But, that’s not the case with all languages. Different languages have different writing directions. Arabic, for example, is written from right to left. Similarly, languages like Japanese and Chinese are written vertically.&lt;/p&gt;

&lt;p&gt;The issue arises when our websites need to be localized or cater to multilingual audiences. Conventional CSS properties are based on the physical dimension of the viewport.&lt;/p&gt;

&lt;p&gt;We define styles using properties like left, right, top, and bottom. So, when the writing direction changes, they no longer meet our needs.&lt;/p&gt;

&lt;p&gt;To fix this problem, we can either manually adjust our styles for different directions or create separate stylesheets for each direction. If you are wondering what’s the problem with this approach, let me give you an example.&lt;/p&gt;

&lt;p&gt;Suppose you have an image and some text. You want the image on the left side and the text on the right.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AfWaL6HBysciCL4b_.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AfWaL6HBysciCL4b_.png" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Automate &lt;a href="https://www.lambdatest.com/cypress-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Cypress testing&lt;/a&gt; and perform browser automation testing with LambdaTest. Our cloud infrastructure has 3000+ desktop &amp;amp; mobile environments. Try for free!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can use &lt;em&gt;float:left&lt;/em&gt; on the image, and it will work. But, when the direction changes from Left-to-Right (LTR) to Right-to-Left (RTL), you will need to change this &lt;em&gt;float:left&lt;/em&gt; to &lt;em&gt;float:right&lt;/em&gt; because now our text flows from right to left and we wanted the image to be on the left side.&lt;/p&gt;

&lt;p&gt;This means we need to adjust our styles for different languages and directions, and there’s no way we can reuse them.&lt;/p&gt;

&lt;p&gt;CSS logical properties provide an alternative approach by allowing us to write styles that adapt based on the logical flow of a document rather than its physical dimension. This means you can apply a float right to the image in a default LTR language like English; however, when that direction changes to RTL, this floating will automatically adjust and act as a float left.&lt;/p&gt;

&lt;p&gt;This revolutionary flexibility in styling approach allows us to create adaptive designs that automatically adjust based on the user’s language, reading direction, and layout preferences, thereby eliminating manual adjustments.&lt;/p&gt;

&lt;p&gt;In this blog, we look at how you can leverage CSS logical properties to create designs that flawlessly adapt across different writing directions. By the end of this blog, you will have a strong understanding of CSS logical properties and be able to craft designs that seamlessly adjust to various writing modes and directions without requiring manual adjustments.&lt;/p&gt;

&lt;p&gt;So, let’s dive right in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why do we need CSS Logical Properties?
&lt;/h2&gt;

&lt;p&gt;Before we dive into CSS logical properties, let’s take a step back to understand why we even need logical properties. This will help you better grasp the problem that CSS logical properties are meant to solve.&lt;/p&gt;

&lt;p&gt;The problem with traditional CSS properties is that they are based on the physical directions of the viewport. For instance, in CSS, we typically describe boxes by specifying their &lt;em&gt;width&lt;/em&gt;, and &lt;em&gt;height&lt;/em&gt;, and position them using the &lt;em&gt;top&lt;/em&gt; and &lt;em&gt;left&lt;/em&gt; attributes. This works well in the case of LTR languages like English, but when the writing direction changes(such as in RTL languages), these properties fail to adapt to that content flow.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Run your &lt;a href="https://www.lambdatest.com/playwright?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Playwright automated testing&lt;/a&gt; scripts instantly on 50+ browser and OS combinations using the LambdaTest cloud. Read more.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let’s look at a simple example to understand this scenario:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/eYPagEB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this example, we have two cards that contain an avatar and some text. The first card follows the LTR direction, and the second card follows the RTL direction. Notice the margin between the avatar and the text. For the first card, the margin is on the right of the avatar. So, for the second card, this margin should be flipped to the left.&lt;/p&gt;

&lt;p&gt;With conventional CSS properties, we can do this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.avatar {
  margin-right: 1rem;
}


.rtl .avatar {
  margin-right: 0;
  margin-left: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the second card’s avatar, we first set &lt;em&gt;margin-right&lt;/em&gt; to &lt;em&gt;0&lt;/em&gt; since it’s not needed there and then added &lt;em&gt;margin-left&lt;/em&gt; to have a margin between the avatar and the text, just like the first card. With this, the second card’s avatar also has a margin, but instead of being on the right side like the first card, it is on the left side because we have an RTL direction here.&lt;/p&gt;

&lt;p&gt;It’s fine in our case but imagine doing that for a large-scale project! It would be nearly impossible to tweak every property to adapt to different writing directions.&lt;/p&gt;

&lt;p&gt;That’s where CSS logical properties come in. CSS logical properties provide a way to write styles that adapt automatically based on the writing mode of the content. For example, to achieve the above scenario where our margin adapts based on the writing direction, we can use the following CSS logical properties:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.avatar {
margin-inline-end: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We just set this property on the avatar, and it sets the margin right when the direction is LTR and the margin-left when the direction is RTL. This means our margin adapts based on the direction. Isn’t it incredibly powerful?&lt;/p&gt;

&lt;p&gt;Let’s now look at another example where we utilize CSS logical properties in a grid-based layout:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
      &amp;lt;h1&amp;gt;
        Supercharge Your Testing with
        &amp;lt;a href="https://www.lambdatest.com/"&amp;gt;LambdaTest&amp;lt;/a&amp;gt;
      &amp;lt;/h1&amp;gt;
      &amp;lt;div class="toggle-container"&amp;gt;
        &amp;lt;input type="checkbox" id="toggleButton" class="toggle-input" /&amp;gt;
        &amp;lt;label for="toggleButton" class="toggle-label"&amp;gt;&amp;lt;/label&amp;gt;
        &amp;lt;div class="toggle-text"&amp;gt;Toggle Writing Mode&amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;


      &amp;lt;div class="grid"&amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/cross-browser-testing" class="item"
          &amp;gt;Cross-Browser Testing&amp;lt;/a
        &amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/responsive-testing" class="item"
          &amp;gt;Responsive Testing&amp;lt;/a
        &amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/selenium-testing" class="item"
          &amp;gt;Selenium Testing&amp;lt;/a
        &amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/real-time-testing" class="item"
          &amp;gt;Real-Time Testing&amp;lt;/a
        &amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/playwright-testing" class="item"
          &amp;gt;Playwright Testing&amp;lt;/a
        &amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/cypress-testing" class="item"
          &amp;gt;Cypress Testing&amp;lt;/a
        &amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background-color: #f5f5f5;
}


.container{
  margin: 0 auto;
  padding: 30px;
  text-align: center;
}


h1 {
  font-size: 28px;
  color: #111;
  margin-bottom: 40px;
}




a {
  color: #1a73e8;
  text-decoration: none;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 20px;
  width: 800px;
  margin: 0 auto;
  writing-mode: horizontal-tb;
}


.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}




.toggle-input {
  display: none;
}
.toggle-label {
  display: inline-block;
  width: 40px;
  height: 20px;
  border-radius: 10px;
  background-color: #ccc;
  position: relative;
  cursor: pointer;
}
.toggle-label:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 0.3s ease;
}
.toggle-input:checked + .toggle-label {
  background-color: #1a73e8;
}
.toggle-input:checked + .toggle-label:before {
  transform: translateX(20px);
}


.toggle-text {
  margin-left: 10px;
  font-size: 17px;
  color: #111;
}
.item {
  background-color: #fff;
  border-radius: 4px;
  padding: 25px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 16px;
  transition: background-color 0.3s ease;
}


.item:hover {
  background-color: #f5f5f5;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;*&lt;em&gt;Inspect web elements to help developers and testers to debug UI flaws or make modifications in HTML or CSS files. Learn &lt;a href="https://www.lambdatest.com/software-testing-questions/how-to-inspect-on-macbook?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=stq" rel="noopener noreferrer"&gt;how to inspect element on mac&lt;/a&gt;. *&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/rNqPKZm?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we have a grid container with the class &lt;em&gt;.grid&lt;/em&gt;. The container has a width of &lt;em&gt;800px&lt;/em&gt;. When the writing mode property is set to &lt;em&gt;horizontal-tb&lt;/em&gt;, the grid layout appears as expected. The grid items are arranged in three columns.&lt;/p&gt;

&lt;p&gt;However, when you toggle the writing mode button to &lt;em&gt;vertical-rl&lt;/em&gt;, the grid layout gets affected. While the grid items still maintain their alignment, the appearance of the grid changes. This issue arises from the container’s width, which remains fixed at &lt;em&gt;800&lt;/em&gt; pixels and fails to adapt to the vertical flow of content. As a result, the grid appears misaligned within the vertical writing mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ABMiazqL2FDYDmb_V.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ABMiazqL2FDYDmb_V.png" width="800" height="581"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To address this issue, instead of using &lt;em&gt;width&lt;/em&gt; on the &lt;em&gt;.grid&lt;/em&gt; container, we can use the &lt;strong&gt;inline-size&lt;/strong&gt; property:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid {
inline-size: 800px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;This ensures that the container’s width adjusts dynamically based on the content flow, allowing the grid to adapt correctly to the vertical writing mode.&lt;/p&gt;

&lt;p&gt;These examples should give you a clear understanding of the importance of CSS logical properties.&lt;/p&gt;

&lt;p&gt;Additionally, here are a few leading names in the industry that leverage CSS logical properties to make their designs more flexible and adaptable across different languages and writing directions:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Need a great testing solution for &lt;a href="https://www.lambdatest.com/safari-browser-for-windows?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Safari browser for Windows&lt;/a&gt;? Forget about emulators or simulators — use real online browsers. Try LambdaTest for free!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Amazon
&lt;/h2&gt;

&lt;p&gt;This multinational eCommerce company demonstrates its commitment to catering to a global audience by offering localized versions of its website in various languages.&lt;/p&gt;

&lt;p&gt;Here are two prominent examples showcasing Amazon’s commitment to serving diverse markets:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Amazon Arabic&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Amazon Japanese&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6YJbh59n9SFehuYp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2A6YJbh59n9SFehuYp.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AELliV4O6T5P3069T.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AELliV4O6T5P3069T.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  BBC
&lt;/h2&gt;

&lt;p&gt;This international media organization strives to bridge linguistic and cultural gaps by offering tailored experiences to its global audience.&lt;/p&gt;

&lt;p&gt;Below is an illustration of BBC Arabic:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AMYVthkjNfjr3WLSx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AMYVthkjNfjr3WLSx.png" width="800" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Test native, hybrid, and web apps on any mobile OS with our free &lt;a href="https://www.lambdatest.com/android-emulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online emulator Android&lt;/a&gt; . Sign up to optimize app performance.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Wikipedia
&lt;/h2&gt;

&lt;p&gt;This collaborative online encyclopedia’s dedication to inclusivity is evident through its localized versions in different languages.&lt;/p&gt;

&lt;p&gt;One such version is Wikipedia Arabic:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2APEUsAJmq47Yjpmiq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2APEUsAJmq47Yjpmiq.png" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Block and Inline Dimension
&lt;/h2&gt;

&lt;p&gt;We now know that CSS logical properties are based on a flow-relative approach rather than the physical direction. Block and inline dimensions are the building blocks of this flow-relative approach. Let’s explore what they mean.&lt;/p&gt;

&lt;p&gt;Block dimension is the dimension in which blocks of content are placed. You can think of the block dimension as the direction in which blocks, such as paragraphs, display one after the other. In an English document, the block flow is top-to-bottom.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AgsN6u3sz-2gSdHjS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AgsN6u3sz-2gSdHjS.png" width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The inline dimension refers to how the text flows in a sentence. For instance, the inline dimension is horizontal in English or Arabic documents with horizontal text flow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASoWjOc-pG1S0P8tj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2ASoWjOc-pG1S0P8tj.png" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note that the meaning of inline and block can change depending on the writing mode. For languages like English, the inline is the horizontal dimension, whereas the block is the vertical one. For languages like Japanese, the inline is the vertical dimension, and the block is the horizontal one.&lt;/p&gt;

&lt;p&gt;Below is a visualization of the block and inline dimensions in horizontal and vertical writing modes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ABbJkO_99sTwhvm4Z.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2800%2F0%2ABbJkO_99sTwhvm4Z.jpg" width="800" height="380"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The key idea behind inline and block dimensions is that instead of focusing on the element’s physical directions, you need to consider them as either inline or block.&lt;/p&gt;

&lt;p&gt;To illustrate this, let’s consider the common practice of centering an element using &lt;em&gt;margin-right&lt;/em&gt; and &lt;em&gt;margin-left&lt;/em&gt;:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.element {
  margin-left: auto;
  margin-right: auto;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Instead of focusing on the individual right and left margins; we can achieve the same result with a single line of code using the &lt;em&gt;margin-inline&lt;/em&gt; logical property. This property sets both the &lt;em&gt;margin-left&lt;/em&gt; and &lt;em&gt;margin-right&lt;/em&gt; simultaneously:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.element {
  margin-inline: auto;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/NWOQNZz?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Test native, hybrid, and web apps on any mobile OS with our free &lt;a href="https://www.lambdatest.com/android-emulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online android emulator&lt;/a&gt;. Sign up to optimize app performance.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Similarly, the &lt;em&gt;margin-block&lt;/em&gt; property sets both &lt;em&gt;margin-top&lt;/em&gt; and &lt;em&gt;margin-bottom&lt;/em&gt;. In addition, CSS logical properties provide us with similar shorthands for controlling borders and paddings.&lt;/p&gt;

&lt;p&gt;For instance, if you have a design that requires borders only on the sides, you can use the &lt;em&gt;border-inline&lt;/em&gt; property instead of individually specifying each physical direction. This allows for a more efficient approach to styling.&lt;/p&gt;

&lt;p&gt;Below is a visualization that shows physical border and padding properties along with their logical shorthand alternative:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AfF6bBHBp0LITKVVP.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AfF6bBHBp0LITKVVP.png" width="800" height="382"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Logical Properties for Floating and Positioning
&lt;/h2&gt;

&lt;p&gt;Floating and positioning are commonly used techniques in &lt;a href="https://www.lambdatest.com/blog/20-elements-of-modern-web-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;web design&lt;/a&gt; to control the layout. Traditionally, CSS has relied on physical properties, such as &lt;em&gt;float *and *clear&lt;/em&gt;, based on the direction of the writing mode (e.g., left-to-right or right-to-left).&lt;/p&gt;

&lt;p&gt;The CSS logical properties aim to provide a more flexible and intuitive approach to element positioning by decoupling them from the specific writing direction.&lt;/p&gt;

&lt;p&gt;The specification for CSS logical properties introduces a set of properties that can be used to control the floating and positioning of elements.&lt;/p&gt;

&lt;p&gt;The below table shows these logical properties along with their corresponding physical properties:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;CATEGORY&lt;/td&gt;
        &lt;td&gt;LOGICAL PROPERTY&lt;/td&gt;
        &lt;td&gt;PHYSICAL PROPERTY&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Floating and Clearing&lt;/td&gt;
        &lt;td&gt;float: inline-start&lt;/td&gt;
        &lt;td&gt;float: left&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;float: inline-end&lt;/td&gt;
        &lt;td&gt;float: right&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;clear: inline-start&lt;/td&gt;
        &lt;td&gt;clear: left&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;clear: inline-end&lt;/td&gt;
        &lt;td&gt;clear: right&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Insets&lt;/td&gt;
        &lt;td&gt;inset-inline-start&lt;/td&gt;
        &lt;td&gt;left&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;inset-inline-end&lt;/td&gt;
        &lt;td&gt;right&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;inset-block-start&lt;/td&gt;
        &lt;td&gt;top&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;inset-block-end&lt;/td&gt;
        &lt;td&gt;bottom&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Text Alignment&lt;/td&gt;
        &lt;td&gt;text-align: start&lt;/td&gt;
        &lt;td&gt;text-align: left&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;/td&gt;
        &lt;td&gt;text-align: end&lt;/td&gt;
        &lt;td&gt;text-align: right&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In addition to these CSS logical properties, the specification also introduces some additional shorthand properties that leverage the ability to address block and inline dimensions.&lt;/p&gt;

&lt;p&gt;These shorthand properties provide convenient ways to simultaneously set values for both the inline and block dimensions, except for the inset property, which has a physical mapping for multi-value settings.&lt;/p&gt;

&lt;p&gt;Below are these additional shorthand properties:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;SHORTHAND PROPERTY&lt;/td&gt;
        &lt;td&gt;DESCRIPTION&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;inset-inline&lt;/td&gt;
        &lt;td&gt;Sets values for both inset-inline-start and inset-inline-end properties simultaneously, addressing the inline dimension.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;inset-block&lt;/td&gt;
        &lt;td&gt;Sets values for both inset-block-start and inset-block-end properties simultaneously, addressing the block dimension.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;inset&lt;/td&gt;
        &lt;td&gt;Sets values for all four inset properties (inset-inline-start, inset-inline-end, inset-block-start, and inset-block-end) simultaneously, with a physical mapping when using multiple values.&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Explore our comprehensive guide on &lt;a href="https://www.lambdatest.com/learning-hub/gui-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;GUI Testing&lt;/a&gt;, uncovering its vital role in software development. Learn about its different types, best practices, and steps for effective implementation to enhance your software’s user interaction.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Now, let’s look at some practical examples of using these CSS logical properties to ensure you have a solid understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of float and clear
&lt;/h2&gt;

&lt;p&gt;You might be wondering about the relevance of using the float property in 2023. However, when we encounter a situation where we need some text to wrap around a shape, the good old float remains the best approach.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AWFLiLkOtaQ5pwDAe.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AWFLiLkOtaQ5pwDAe.jpg" width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, we have two cards. To wrap our text around the image, we can do the following:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;img {
  float: left;
  margin-right: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We floated the image to the left and added a margin-right. But this will work only for the LTR layout card. To make this work in the RTL card, we will need to adjust it like this:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html[dir="rtl"] img {
  float: right;
  margin-right: 0;
  margin-left: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here, we floated the image to the right because our layout is right-to-left. We then set &lt;em&gt;margin-right&lt;/em&gt; to &lt;em&gt;0&lt;/em&gt; and added &lt;em&gt;margin-left&lt;/em&gt; of &lt;em&gt;20px&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Here’s how we can achieve the same using &lt;em&gt;float:inline-start&lt;/em&gt; and &lt;em&gt;margin-inline-end&lt;/em&gt; CSS logical properties, and it will work irrespective of our writing direction:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;img {
  float: inline-start;
  margin-inline-end: 20px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the case of an LTR direction, &lt;em&gt;inline-start&lt;/em&gt; floats the image to the left, and in the case of an RTL direction, it floats the image to the right. In the case of LTR, &lt;em&gt;margin-inline-end&lt;/em&gt; adds a margin to the right; in the case of RTL, it adds a margin to the left.&lt;/p&gt;

&lt;p&gt;This dynamic behavior of CSS logical properties demonstrates its flexibility, which is fascinating.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Looking to manage your tests more efficiently? In this blog, explore a variety of &lt;a href="https://www.lambdatest.com/blog/best-test-management-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;test case management&lt;/a&gt; tools and select the one that suits your team’s needs.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Example of CSS Logical Properties for positioned layout
&lt;/h2&gt;

&lt;p&gt;In web development, positioning elements are crucial for creating visually appealing and user-friendly interfaces. One common use case of positioning is the creation of a floating sidebar that remains fixed in a specific position as the user scrolls through a webpage.&lt;/p&gt;

&lt;p&gt;Traditionally, we have used properties like top, right, bottom, and left to achieve this effect. These properties allow us to position an element relative to its containing block and control its placement on the screen. However, with the introduction of CSS logical properties, we now have additional options for positioning elements based on text flow in different writing modes.&lt;/p&gt;

&lt;p&gt;Let’s look at an example where we utilize the CSS logical properties &lt;em&gt;inset-block-start&lt;/em&gt; and &lt;em&gt;inset-inline-end&lt;/em&gt; to create a floating sidebar that adapts based on the direction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="sidebar"&amp;gt;
      &amp;lt;div class="product"&amp;gt;
        &amp;lt;img
          src="https://www.lambdatest.com/resources/images/hyperexecute/hyperlogo.svg"
          alt=""
          class="logo"
        /&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="links"&amp;gt;
        &amp;lt;h2&amp;gt;Why HyperExecute?&amp;lt;/h2&amp;gt;
        &amp;lt;ul&amp;gt;
          &amp;lt;li&amp;gt;Ai-powered workflows&amp;lt;/li&amp;gt;
          &amp;lt;li&amp;gt;Dependency caching&amp;lt;/li&amp;gt;
          &amp;lt;li&amp;gt;Customizable test environments&amp;lt;/li&amp;gt;
          &amp;lt;li&amp;gt;Automatic tunnel management&amp;lt;/li&amp;gt;
        &amp;lt;/ul&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;main&amp;gt;
      &amp;lt;h1&amp;gt;
        Ai-powered blazing fast &amp;lt;br /&amp;gt;
        end-to-end test orchestration cloud
      &amp;lt;/h1&amp;gt;
      &amp;lt;p class="info-text"&amp;gt;upto &amp;lt;span&amp;gt;70% faster&amp;lt;/span&amp;gt; than any cloud grid.&amp;lt;/p&amp;gt;
      &amp;lt;div class="buttons"&amp;gt;
        &amp;lt;a 
          href="https://hyperexecute.lambdatest.com/quickstart?origin=try-now"
          class="button"
          id="tryNow"
          target="_blank"
          &amp;gt;Try it now&amp;lt;/a
        &amp;gt;
        &amp;lt;a 
          href="https://www.lambdatest.com/demo?type=Hyperexecute"
          class="button"
          id="bookDemo"
          target="_blank"
          &amp;gt;Book a demo&amp;lt;/a
        &amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;h2 class="features"&amp;gt;Features you must know about&amp;lt;/h2&amp;gt;
      &amp;lt;div class="cards-container"&amp;gt;
        &amp;lt;div class="card"&amp;gt;
          &amp;lt;div class="heading"&amp;gt;Runs on Linux containers, macOS and Windows&amp;lt;/div&amp;gt;
          &amp;lt;p&amp;gt;
            HyperExecute platform comes with feature-packed hosted runners for
            every major OS including Windows, MacOS, and Linux containers. The
            runners come with pre-installed support for all major programming
            languages and frameworks including Java, Node.js, Python, PHP, GO,
            C#, Rust, and Ruby.
          &amp;lt;/p&amp;gt;
          &amp;lt;a 
            href="https://hyperexecute.lambdatest.com/hyperexecute"
            class="button"
            target="_blank"
            &amp;gt;Try it now&amp;lt;/a
          &amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="card"&amp;gt;
          &amp;lt;div class="heading"&amp;gt;AI-Powered Test Orchestration&amp;lt;/div&amp;gt;
          &amp;lt;p&amp;gt;
            Through a simple YAML file, HyperExecute allows you to group and
            distribute tests intelligently across runner environments. The
            AI-powered test orchestration takes into account past test run data,
            and automatically reorders the test runs to surface failures faster
            and cuts down developer feedback time.
          &amp;lt;/p&amp;gt;
          &amp;lt;a 
            href="https://hyperexecute.lambdatest.com/hyperexecute"
            class="button"
            target="_blank"
            &amp;gt;Try it now&amp;lt;/a
          &amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="card"&amp;gt;
          &amp;lt;div class="heading"&amp;gt;Real Time Console and Execution Logs&amp;lt;/div&amp;gt;
          &amp;lt;p&amp;gt;
            In legacy test clouds you get separate terminal and test execution
            logs, stitching them together is an ETL nightmare. With
            HyperExecute, you get a single automation dashboard view with both
            terminal logs of test commands and complete test execution logs. All
            test execution logs like terminal logs, test run video, network log,
            commands, exceptions, and more, all available in a single intuitive
            dashboard. 
          &amp;lt;/p&amp;gt;
          &amp;lt;a 
            href="https://hyperexecute.lambdatest.com/hyperexecute"
            class="button"
            target="_blank"
            &amp;gt;Try it now&amp;lt;/a
          &amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="card"&amp;gt;
          &amp;lt;div class="heading"&amp;gt;Automatic report generation&amp;lt;/div&amp;gt;
          &amp;lt;p&amp;gt;
            With all test execution data available in a single place,
            HyperExecute enables developers and testers to truly analyze the
            quality of their builds on a single platform through AI-powered
            automatic reports generated for each build run. Eliminate the need
            of gathering data from multiple sources and building extensive
            reporting frameworks.
          &amp;lt;/p&amp;gt;
          &amp;lt;a 
            href="https://hyperexecute.lambdatest.com/hyperexecute"
            class="button"
            target="_blank"
            &amp;gt;Try it now&amp;lt;/a
          &amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/main&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  writing-mode: horizontal-tb !important;
  writing-mode: vertical-rl;
  background-color: #05010c;
  color: #ffffff;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}


.sidebar {
  block-size: 100%; /* Equivalent to height in vertical direction */
  inline-size: 30%; /* Equivalent to width in vertical direction */
  position: fixed;
  inset-block-start: 0;
  inset-inline-start: 0;
  background-color: #0e1117;
  overflow-y: auto;
}


.product {
  margin-inline: 20px;
  margin-block: 30px;
}


.logo {
  max-width: 200px;
  height: auto;
}
a {
  text-decoration: none;
  color: inherit;
}
.links {
  margin: 20px;
}


h2 {
  font-size: 20px;
  margin-block-end: 30px;
  color: #ffffff;
}


ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}


li {
  display: flex;
  align-items: center;
  margin-block-end: 20px;
  color: #ffffff;
  cursor: pointer;
}


main {
  margin-inline-start: 30%;
  padding: 30px;
  padding-top: 40px;
}


h1 {
  font-size: 38px;
  margin-bottom: 20px;
  line-height: 1.3;
}


.info-text {
  font-size: 20px;
  margin-bottom: 30px;
}
span {
  background: -webkit-linear-gradient(left, #ff10bc, #ffb501);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 1px;
}


.button {
  padding: 10px 18px;
  width: auto;
  font-size: 16px;
  background-color: #0dbcc4;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  text-align: center;
}
.buttons {
  display: flex;
  gap: 12px;
  flex-direction: row;
}
@media only screen and (max-height: 468px) and (writing-mode: vertical-rl) {
  .buttons {
    flex-direction: column;
  }
}
#tryNow {
  background-color: #ffffff;
  color: #0e1117;
  padding: 12px 18px;
}


#bookDemo {
  background-color: transparent;
  border: 1px solid #aaa;
  padding: 12px 18px;
}


.features {
  font-size: 28px;
  margin-bottom: 30px;
}


.cards-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 30px;
}


.card {
  padding: 20px;
  background-color: #0e1117;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  justify-content: space-between;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}


.heading {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  line-height: 1.5;
  color: #a0a0a0;
}


.card p {
  margin-bottom: 20px;
  line-height: 1.5;
  color: #a0a0a0;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/mdzYdKg?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The ultimate guide to &lt;a href="https://www.lambdatest.com/learning-hub/software-testing-metrics?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;software testing metrics&lt;/a&gt;: definition, types, and examples explained for informed decisions. Enhance your testing process now!&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the above example, we have a sidebar and a main section. The sidebar remains fixed on the left side of the screen as the user scrolls through the main content. We utilized the logical properties &lt;em&gt;inset-block-start&lt;/em&gt; and &lt;em&gt;inset-inline-end&lt;/em&gt; to create this sidebar.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;inset-block-start&lt;/em&gt; property positions the sidebar relative to the top edge of its containing block, while the inset-inline-end property positions it relative to the right edge.&lt;/p&gt;

&lt;p&gt;If we change the &lt;em&gt;writing-mode&lt;/em&gt; property of the body to vertical-rl by uncommenting the following line, the floating sidebar will adapt to the new text flow direction and position itself to the vertical left making our layout responsive.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
writing-mode: horizontal-tb !important;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To ensure responsive design for any layout, you can refer to the detailed tutorial on &lt;a href="https://www.lambdatest.com/learning-hub/responsive-design?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Responsive Design&lt;/a&gt; that covers the basics of designing responsive layouts.&lt;/p&gt;

&lt;p&gt;In addition to designing a responsive layout, it’s crucial to conduct &lt;a href="https://www.lambdatest.com/responsive-test-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;responsiveness tests &lt;/a&gt;on various viewports. To simplify this process, you can take advantage of &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LT Browser 2.0&lt;/a&gt;, offered by LambdaTest. This dev-friendly tool provides over 50 pre-installed viewports with different screen resolutions, allowing you to test your website’s responsiveness effortlessly. Additionally, LT Browser 2.0 offers a range of advanced developer tools that you can utilize.&lt;/p&gt;

&lt;p&gt;For more information about LT Browser 2.0, we have an informative tutorial available. Feel free to explore the following tutorial, which provides detailed insights into LT Browser 2.0 and its features.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rqFeuaZ-wAY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Subscribe to the &lt;a href="https://www.youtube.com/channel/UCCymWVaTozpEng_ep0mdUyw?sub_confirmation=1?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=video" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel &lt;/a&gt;and stay updated with the latest tutorials around &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium testing&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/playwright-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Playwright testing&lt;/a&gt;, and more.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This guide explores &lt;a href="https://www.lambdatest.com/learning-hub/digital-transformation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Digital Transformation&lt;/a&gt;, its benefits, goals, importance and challenges involved in Digital Transformation.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Example of CSS Logical Properties for text-align
&lt;/h2&gt;

&lt;p&gt;When it comes to aligning text in CSS, logical values are available that take text direction inot account. Instead of relying on the traditional left and right values, we can leverage the more versatile start and end values. Let’s see an example to understand how these logical values work for text alignment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="toggle-container"&amp;gt;
      &amp;lt;input type="checkbox" id="toggleButton" class="toggle-input" /&amp;gt;
      &amp;lt;label for="toggleButton" class="toggle-label"&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;div class="toggle-text"&amp;gt;Toggle the direction&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;


&amp;lt;div class="container"&amp;gt;
      &amp;lt;div class="block block1"&amp;gt;
        &amp;lt;h3&amp;gt;Block 1&amp;lt;/h3&amp;gt;
        &amp;lt;p&amp;gt;
          This block uses &amp;lt;code&amp;gt;text-align: right;&amp;lt;/code&amp;gt; to align text to the
          physical right.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="block block2"&amp;gt;
        &amp;lt;h3&amp;gt;Block 2&amp;lt;/h3&amp;gt;
        &amp;lt;p&amp;gt;
          This block uses &amp;lt;code&amp;gt;text-align: end;&amp;lt;/code&amp;gt; which aligns the text to
          the logical right based on the text direction.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  font-family: Arial, Sans-serif;
}
.container {
  display: flex;
  justify-content: center;
  gap: 30px;
}


.block {
  direction: ltr /change it to *rtl*/;
  width: 300px;
  height: 150px;
  background-color: #f2f2f2;
  border: 1px solid #ccc;
  padding: 20px;
}


.block1 {
  text-align: right;
}


.block2 {
  text-align: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/abRrvmw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this article, we will delve into the fundamentals of &lt;a href="https://www.lambdatest.com/learning-hub/quality-assurance?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Quality Assurance&lt;/a&gt;, its key principles, methodologies, and its vital role in delivering excellence.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the above example, we have two text blocks. In the first block, we align the text to the right using the property text-align: right, while in the second block, we use text-align: end, to do the same. By default, when the text direction is set to left-to-right (ltr), both blocks appear aligned to the right.&lt;/p&gt;

&lt;p&gt;However, things get interesting when we toggle the text direction from LTR to RTL in the .block class. Despite this change, the alignment of the first block remains consistent and stays on the right side, which is its logical end in the RTL direction. On the other hand, the second block adapts to the logical end and aligns itself to the left side, according to the LTR direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Logical Properties for Margins, Borders, and Paddings
&lt;/h2&gt;

&lt;p&gt;Margins, borders, and paddings are some of the first concepts we learn in CSS. They have the highest significance when it comes to creating well-designed layouts.&lt;/p&gt;

&lt;p&gt;The CSS logical properties specification introduces a set of properties dedicated to margins, borders, and paddings, allowing us to create flexible layouts that adapt to different directions. The specification also defines how logical values are mapped to their corresponding physical values.&lt;/p&gt;

&lt;p&gt;Assuming a horizontal-tb writing mode from left to right, the CSS logical properties &lt;em&gt;margin-inline-start&lt;/em&gt; is equivalent to &lt;em&gt;margin-left&lt;/em&gt; because the inline direction runs horizontally from left to right.&lt;/p&gt;

&lt;p&gt;However, it’s important to note that the mappings change depending on the writing mode and text direction. If the writing mode remains horizontal-tb, but the text direction changes to right-to-left, &lt;em&gt;margin-inline-start&lt;/em&gt; would be equivalent to &lt;em&gt;margin-right&lt;/em&gt; because now the inline direction runs horizontally but from right to left.&lt;/p&gt;

&lt;p&gt;In a vertical writing mode, &lt;em&gt;margin-inline-start&lt;/em&gt; would be equivalent to using &lt;em&gt;margin-top&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Here is a table illustrating the mappings between CSS logical properties and their corresponding physical properties in a horizontal-tb writing mode with an LTR direction:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;LOGICAL PROPERTY&lt;/td&gt;
        &lt;td&gt;PHYSICAL PROPERTY&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-end&lt;/td&gt;
        &lt;td&gt;border-bottom&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-end-color&lt;/td&gt;
        &lt;td&gt;border-bottom-color&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-end-style&lt;/td&gt;
        &lt;td&gt;border-bottom-style&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-end-width&lt;/td&gt;
        &lt;td&gt;border-bottom-width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-start&lt;/td&gt;
        &lt;td&gt;border-top&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-start-color&lt;/td&gt;
        &lt;td&gt;border-top-color&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-start-style&lt;/td&gt;
        &lt;td&gt;border-top-style&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-start-width&lt;/td&gt;
        &lt;td&gt;border-top-width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-end&lt;/td&gt;
        &lt;td&gt;border-right&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-end-color&lt;/td&gt;
        &lt;td&gt;border-right-color&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-end-style&lt;/td&gt;
        &lt;td&gt;border-right-style&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-end-width&lt;/td&gt;
        &lt;td&gt;border-right-width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-start&lt;/td&gt;
        &lt;td&gt;border-left&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-start-color&lt;/td&gt;
        &lt;td&gt;border-left-color&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-start-style&lt;/td&gt;
        &lt;td&gt;border-left-style&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-start-width&lt;/td&gt;
        &lt;td&gt;border-left-width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-start-start-radius&lt;/td&gt;
        &lt;td&gt;border-top-left-radius&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-end-start-radius&lt;/td&gt;
        &lt;td&gt;border-bottom-left-radius&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-start-end-radius&lt;/td&gt;
        &lt;td&gt;border-top-right-radius&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;LOGICAL PROPERTY&lt;/td&gt;
        &lt;td&gt;PHYSICAL PROPERTY&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-end-end-radius&lt;/td&gt;
        &lt;td&gt;border-bottom-right-radius&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;margin-block-end&lt;/td&gt;
        &lt;td&gt;margin-bottom&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;margin-block-start&lt;/td&gt;
        &lt;td&gt;margin-top&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;margin-inline-end&lt;/td&gt;
        &lt;td&gt;margin-right&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;margin-inline-start&lt;/td&gt;
        &lt;td&gt;margin-left&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;padding-block-end&lt;/td&gt;
        &lt;td&gt;padding-bottom&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;padding-block-start&lt;/td&gt;
        &lt;td&gt;padding-top&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;padding-inline-end&lt;/td&gt;
        &lt;td&gt;padding-right&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;padding-inline-start&lt;/td&gt;
        &lt;td&gt;padding-left&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This detailed guide explains how to detect &lt;a href="https://www.lambdatest.com/learning-hub/flaky-test?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;flaky tests&lt;/a&gt;, its causes, strategies to reduce flakiness and much more.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Additionally, some shorthand properties target both blocks or both inline edges of the box simultaneously. These shorthands have no physical equivalent:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;PROPERTY&lt;/td&gt;
        &lt;td&gt;DESCRIPTION&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block&lt;/td&gt;
        &lt;td&gt;Sets border-color, border-style, and border-width for both block borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-color&lt;/td&gt;
        &lt;td&gt;Sets border-color for both block borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-style&lt;/td&gt;
        &lt;td&gt;Sets border-style for both block borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-block-width&lt;/td&gt;
        &lt;td&gt;Sets border-width for both block borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline&lt;/td&gt;
        &lt;td&gt;Sets border-color, border-style, and border-width for both inline borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-color&lt;/td&gt;
        &lt;td&gt;Sets border-color for both inline borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-style&lt;/td&gt;
        &lt;td&gt;Sets border-style for both inline borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;border-inline-width&lt;/td&gt;
        &lt;td&gt;Sets border-width for both inline borders.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;margin-block&lt;/td&gt;
        &lt;td&gt;Sets all block margins.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;margin-inline&lt;/td&gt;
        &lt;td&gt;Sets all inline margins.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;padding-block&lt;/td&gt;
        &lt;td&gt;Sets block padding.&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;padding-inline&lt;/td&gt;
        &lt;td&gt;Sets inline padding.&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now that we are familiar with the CSS logical properties of margins, borders, and paddings, let’s apply some of them to a few practical examples.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of margin
&lt;/h2&gt;

&lt;p&gt;Let’s look at an example where we utilize the CSS logical properties to set flow relative margin, which adapts based on the writing direction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;p class="direction-text"&amp;gt;Left to Right (LTR)&amp;lt;/p&amp;gt;
    &amp;lt;div class="card"&amp;gt;
      &amp;lt;div class="avatar"&amp;gt;
        &amp;lt;video
          src="https://www.lambdatest.com/resources/images/hyperexecute/1stanimation.webm"
          autoplay
          loop
        &amp;gt;&amp;lt;/video&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="content"&amp;gt;
        &amp;lt;h2&amp;gt;HyperExecute&amp;lt;/h2&amp;gt;
        &amp;lt;p&amp;gt;HyperExecute is an AI-powered blazing fast end-to-end test orchestration cloud.&amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;


    &amp;lt;p class="direction-text"&amp;gt;Right to Left (RTL)&amp;lt;/p&amp;gt;
    &amp;lt;div class="card rtl"&amp;gt;
      &amp;lt;div class="avatar"&amp;gt;
        &amp;lt;video
          src="https://www.lambdatest.com/resources/images/hyperexecute/1stanimation.webm"
          autoplay
          loop
        &amp;gt;&amp;lt;/video&amp;gt;
      &amp;lt;/div&amp;gt;
      &amp;lt;div class="content"&amp;gt;
        &amp;lt;h2&amp;gt;HyperExecute&amp;lt;/h2&amp;gt;
        &amp;lt;p&amp;gt;HyperExecute هو سحابة لتنظيم الاختبارات من البداية إلى النهاية ، وهو مدعوم بالذكاء الاصطناعي ويتميز بسرعة فائقة.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  font-family: Arial, sans-serif;
  background-color: #f1f1f1;
}


.direction-text {
  text-align: center;
}


.card {
  display: flex;
  align-items: center;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin: 20px auto;
  max-width: 500px;
}


.rtl {
  direction: rtl;
}


.avatar {
  margin-inline-end: 1rem;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: lightblue;
  overflow: hidden;
}


.avatar video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.content {
  flex: 1;
}


h2 {
  font-size: 24px;
  margin-bottom: 10px;
}


p {
  font-size: 16px;
  color: #666;
  line-height: 1.4;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/ZEqNeWv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Deep dive to learn about &lt;a href="https://www.lambdatest.com/learning-hub/automation-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;test automation&lt;/a&gt;, its uasage, types and also gain insights on how to get started with automated testing.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the above example, we have two cards with an avatar and some text. For the first card, which has an LTR direction, the margin between the avatar and the text should be on the right of the avatar. While for the second card, which has an RTL direction, this margin should be on the left.&lt;/p&gt;

&lt;p&gt;To achieve this, we used the margin-inline-end property to set a 1rem margin between the avatar and text, which effectively adapts to writing directions. For the LTR direction card, &lt;em&gt;margin-inline-end&lt;/em&gt; acts as &lt;em&gt;margin-right&lt;/em&gt; and sets the margin on the right side of the avatar; for the RTL direction card, it acts as margin-left and sets the margin on the left side of the avatar.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example of border
&lt;/h2&gt;

&lt;p&gt;Let’s look at an example of a logical border property that caters to different writing directions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3136%2F0%2AtNKIeeLk_gZZba0R.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3136%2F0%2AtNKIeeLk_gZZba0R.jpg" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above illustration, we have a left border on both cards, as highlighted in blue. To achieve this with conventional CSS properties, we would do the following:&lt;/p&gt;

&lt;p&gt;For the LTR card:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.card {
  border-left: 6px solid blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For the RTL card:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html[dir="rtl"] .card {
  border-left: 0;
  border-right: 6px solid blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For the RTL card, we set the border left to 0 and applied a border right of 6px solid blue.&lt;/p&gt;

&lt;p&gt;To achieve the same without requiring any manual adjustments, we can utilize the &lt;em&gt;border-inline-start&lt;/em&gt; logical property. This will set the border left in the LTR direction and the border right in the RTL direction.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.card {
  border-inline-start: 6px solid blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Using logical properties not only streamlines our CSS but also improves efficiency in managing styles across various writing directions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover what&lt;a href="https://www.lambdatest.com/learning-hub/load-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt; load testing&lt;/a&gt; is and why it’s critical in ensuring optimal system performance. Understand its role in identifying bottlenecks, enhancing scalability, and improving user experience.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Example of padding
&lt;/h2&gt;

&lt;p&gt;Below is an example that utilizes logical padding to cater to different writing directions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3136%2F0%2AK9yKFbShzY3mgtAZ.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3136%2F0%2AK9yKFbShzY3mgtAZ.jpg" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, we have two cards: the first one with a left-to-right (LTR) direction and the second one with a right-to-left (RTL) direction.&lt;/p&gt;

&lt;p&gt;In the LTR direction card, we highlighted the right and left padding, which is set to &lt;em&gt;3rem *and *1rem&lt;/em&gt;, respectively(this padding variation is for easier visualization only. It’s not recommended to use inconsistent padding.). For the second card, which has a &lt;em&gt;right-to-left&lt;/em&gt; direction, the padding needs to be flipped to *3rem *on the left and 1rem on the right.&lt;/p&gt;

&lt;p&gt;Let’s see how we would manage this without CSS logical properties:&lt;/p&gt;

&lt;p&gt;For the LTR card:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.card {
  padding-left: 3rem;
  padding-right: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;For the RTL card:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;html[dir="rtl"] .card {
  padding-right: 3rem;
  padding-left: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We are manually tweaking padding for the RTL card which is not feasible especially when we have a large set of styles. Let’s now achieve the same more effectively using CSS logical properties:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.card {
  padding-inline-start: 3rem;
  padding-inline-end: 1rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Just these two lines, and our right and left padding will adjust based on the writing direction! Isn’t it powerful?&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Logical Properties for Sizing
&lt;/h2&gt;

&lt;p&gt;Sizing is an important aspect of web design. It allows us to determine the dimensions and proportions of elements on a webpage. Conventionally, in CSS, we use properties like *width *and *height *to define an element’s size. However, with logical properties for sizing, we now have a more flexible and contextual approach.&lt;/p&gt;

&lt;p&gt;The below table shows these CSS logical properties alongside corresponding physical properties. It’s important to note that the mappings between logical and physical properties depend on the writing mode. For instance, in a horizontal writing mode like English or Arabic, the logical property &lt;em&gt;inline-size&lt;/em&gt; sets the width of an element.&lt;/p&gt;

&lt;p&gt;Similarly, the &lt;em&gt;block-size&lt;/em&gt; property sets the height.&lt;/p&gt;

&lt;p&gt;On the other hand, if you were in a vertical writing mode, the CSS logical properties &lt;em&gt;inline-size&lt;/em&gt; would be mapped to the physical property height. And the &lt;em&gt;block-size&lt;/em&gt; property would be equal to the width.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;LOGICAL PROPERTY&lt;/td&gt;
        &lt;td&gt;PHYSICAL PROPERTY&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;inline-size&lt;/td&gt;
        &lt;td&gt;width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;block-size&lt;/td&gt;
        &lt;td&gt;height&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;min-inline-size&lt;/td&gt;
        &lt;td&gt;min-width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;min-block-size&lt;/td&gt;
        &lt;td&gt;min-height&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;max-inline-size&lt;/td&gt;
        &lt;td&gt;max-width&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;max-block-size&lt;/td&gt;
        &lt;td&gt;max-height&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Example of width:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s an example that showcases how inline-width and block-width behave in case of different writing directions:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="toggle-container"&amp;gt;
      &amp;lt;input type="checkbox" id="toggleButton" class="toggle-input" /&amp;gt;
      &amp;lt;label for="toggleButton" class="toggle-label"&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;div class="toggle-text"&amp;gt;Toggle Writing Mode&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      &amp;lt;div class="card"&amp;gt;
        &amp;lt;p&amp;gt;
          This card uses the logical property &amp;lt;code&amp;gt;inline-size&amp;lt;/code&amp;gt; and
block-size&amp;lt;/code&amp;gt; to define its size.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  font-family: Arial, sans-serif;
}

.container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  writing-mode: horizontal-tb;
}

.card {
  border: 1px solid #ccc;
  padding: 20px;
  inline-size: 300px;
  block-size: 200px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.card p {
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 0;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 30px;
}

.toggle-input {
  display: none;
}
.toggle-label {
  display: inline-block;
  width: 40px;
  height: 20px;
  border-radius: 10px;
  background-color: #ccc;
  position: relative;
  cursor: pointer;
}

.toggle-label:before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 0.3s ease;
}

.toggle-input:checked + .toggle-label {
  background-color: #1a73e8;
}

.toggle-input:checked + .toggle-label:before {
  transform: translateX(20px);
}

.toggle-text {
  margin-left: 10px;
  font-size: 20px;
  font-weight: bold;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/gOBVwXV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Deep dive to learn about test automation, its uasage, types and also gain insights on how to get started with &lt;a href="https://www.lambdatest.com/learning-hub/automation-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;automated testing&lt;/a&gt;.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this example, we defined the size of the .card element using inline-size and block-size logical properties. Initially, when the writing direction is horizontal, the inline-size property sets the width to 300px, and block-size sets the height to 100px.&lt;/p&gt;

&lt;p&gt;When we toggle the writing mode and change the direction to vertical, it behaves oppositely. The inline-size property now sets the height to 300px, and the block-size sets the width to 200px.&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser Support for CSS Logical Properties
&lt;/h2&gt;

&lt;p&gt;One of the key factors to consider when working with CSS is &lt;a href="https://www.lambdatest.com/learning-hub/cross-browser-compatibility?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=video" rel="noopener noreferrer"&gt;browser compatibility&lt;/a&gt;. Testing browser compatibility of the CSS properties helps ensure a consistent experience of our website across different platforms.&lt;/p&gt;

&lt;p&gt;To test browser compatibility and to know how your CSS properties would behave in real-world browser environments, you can use LambdaTest, a unified digital experience testing platform that allows you to test your website on an &lt;a href="https://www.lambdatest.com/online-browser-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online browser farm&lt;/a&gt; of 3000+ real browsers and operating systems.&lt;/p&gt;

&lt;p&gt;By utilizing LambdaTest, you can identify any compatibility issues and make the necessary adjustments to ensure your CSS properties function smoothly across multiple browsers. Now, to talk about the support for CSS logical properties, fortunately, its support has significantly improved across major modern browsers.&lt;/p&gt;

&lt;p&gt;Today, all leading browsers, like Google Chrome, Mozilla Firefox, Microsoft Edge, Apple Safari, etc., have varying support for CSS logical properties.&lt;/p&gt;

&lt;p&gt;Let’s look at the support provided by some of these browsers in detail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Support on Chrome
&lt;/h2&gt;

&lt;p&gt;In Chrome versions 4 to 68, CSS logical properties are supported partially with the prefix &lt;strong&gt;&lt;em&gt;-webkit-&lt;/em&gt;&lt;/strong&gt;. This support includes -before and -end values for -block-start and -block-end properties and start and end values for text-align, margin, border, and padding properties.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.element {
  -webkit-text-align: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Moving on to 69 to 86 versions of Chrome, there is a lack of support for properties like margin-block, margin-inline, padding-block, &lt;em&gt;padding-inline&lt;/em&gt;, and all the inset shorthand properties.&lt;/p&gt;

&lt;p&gt;Furthermore, Chrome versions 69 to 86 do not support &lt;em&gt;border-start-start-radius&lt;/em&gt;, &lt;em&gt;border-start-end-radius&lt;/em&gt;, &lt;em&gt;border-end-start-radius&lt;/em&gt;, and &lt;em&gt;border-end-end-radius&lt;/em&gt; properties.&lt;/p&gt;

&lt;p&gt;Similarly, Chrome versions 87 to 88 also lack support for the &lt;em&gt;border-start-start-radius&lt;/em&gt;, &lt;em&gt;border-start-end-radius&lt;/em&gt;, &lt;em&gt;border-end-start-radius&lt;/em&gt;, and &lt;em&gt;border-end-end-radius&lt;/em&gt; properties.&lt;/p&gt;

&lt;p&gt;Fortunately, starting from version 89, Chrome offers full support for all these properties, resolving the earlier limitations.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Learn the best practices and techniques for effective &lt;a href="https://www.lambdatest.com/learning-hub/code-review?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;code review&lt;/a&gt;. Improve code quality, software development processes with expert tips and insights.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Support on Edge
&lt;/h2&gt;

&lt;p&gt;In Edge versions 79 to 86, there is no support for margin-block, margin-inline, padding-block, padding-inline, or any of the inset shorthand properties. However, like in newer Chromium browsers, these properties can be enabled in newer versions of Edge by using the &lt;strong&gt;#enable-experimental-web-platform-features&lt;/strong&gt; flag.&lt;/p&gt;

&lt;p&gt;Furthermore, in Edge versions 79 to 86, the properties &lt;em&gt;border-start-start-radius&lt;/em&gt;, &lt;em&gt;border-start-end-radius&lt;/em&gt;, &lt;em&gt;border-end-start-radius&lt;/em&gt;, and &lt;em&gt;border-end-end-radius&lt;/em&gt; are not supported. However, starting from version 99, Edge offers full support for CSS logical properties, including these border-radius properties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Support on Firefox
&lt;/h2&gt;

&lt;p&gt;In Firefox versions 41 to 65, there is no support for properties such as &lt;em&gt;margin-block&lt;/em&gt;, &lt;em&gt;margin-inline&lt;/em&gt;, &lt;em&gt;padding-block&lt;/em&gt;, &lt;em&gt;padding-inline&lt;/em&gt;, or any of the inset shorthand properties. But you can support these properties in newer Chromium browsers by enabling the &lt;strong&gt;&lt;em&gt;#enable-experimental-web-platform-features&lt;/em&gt;&lt;/strong&gt; flag.&lt;/p&gt;

&lt;p&gt;Additionally, in Firefox versions 41 to 65, &lt;em&gt;border-start-start-radius&lt;/em&gt;, &lt;em&gt;border-start-end-radius&lt;/em&gt;, &lt;em&gt;border-end-start-radius&lt;/em&gt;, and &lt;em&gt;border-end-end-radius&lt;/em&gt; properties are not supported.&lt;/p&gt;

&lt;p&gt;However, starting from version 66, Firefox provides full support for all CSS logical properties.&lt;/p&gt;

&lt;p&gt;Now that we have explored the browser compatibility of logical properties across some major browsers, you can check out the rest in the below illustration that shows a detailed overview of its support across all relevant browsers versions:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3998%2F0%2A-3-Zx9Fn48KC9oiW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3998%2F0%2A-3-Zx9Fn48KC9oiW.png" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By utilizing LambdaTest’s Real Time Browser Testing functionality, you can conduct cross browser testing of the websites for CSS logical properties on various combinations of browsers and operating systems.&lt;/p&gt;

&lt;p&gt;For further details, please refer to the documentation on &lt;a href="https://www.lambdatest.com/support/docs/real-time-browser-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=support_doc" rel="noopener noreferrer"&gt;Real Time Browser Testing.&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Learn the essential concepts, techniques, and strategies for high-quality software through effective &lt;a href="https://www.lambdatest.com/learning-hub/software-quality-assurance?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Software Quality Assurance&lt;/a&gt;. This guide covers its importance, benefits, practical tips, and best practices.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WYbyLfLM2-E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages of using CSS Logical Properties
&lt;/h2&gt;

&lt;p&gt;When styling our web pages, CSS logical properties provide us with a powerful and flexible approach. They offer a range of advantages that make our lives as developers easier and more efficient. In this section, we’ll explore some of the key benefits of using logical properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adaptability and Flexibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With CSS logical properties, we can create layouts that adapt seamlessly to different writing modes and language directions. Instead of relying on specific directions like left or right, we can use properties such as start and end to ensure consistent alignment regardless of the text direction.&lt;/p&gt;

&lt;p&gt;This flexibility significantly enhances the accessibility and user experience of the websites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Improved Localization Experience&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CSS logical properties can be instrumental in accelerating the development (particularly content) of websites with a global audience. Using logical properties, we can empower websites to be easily localized for various languages and regions.&lt;/p&gt;

&lt;p&gt;Since logical properties adjust automatically based on the text direction, we no longer need to modify our stylesheets when translating content into languages that read RTL or any other direction. This saves time and effort, making localization a smoother process.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reduced Maintenance Efforts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the significant advantages of using CSS logical properties is the reduction in maintenance efforts. We can streamline our CSS code and minimize redundancy by utilizing CSS logical properties. Instead of duplicating styles for each text direction, we can consolidate them into a single rule, making maintenance and updates much more efficient.&lt;/p&gt;

&lt;p&gt;When a change or update is required, we only need to modify the CSS logical properties, and the styles will automatically adapt to different text directions. This simplifies the maintenance process, as we no longer have to update multiple instances of physical properties.&lt;/p&gt;

&lt;p&gt;Instead, by utilizing CSS logical properties, we can achieve results across multiple writing modes with fewer lines of code, reducing potential errors and easing future maintenance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consistency in styling&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We can use CSS logical properties to maintain consistency across different languages and writing directions. For instance, instead of relying on physical properties such as border-left and border-right to create borders on specific sides of an element, we can use CSS logical properties like border-start and border-end. This approach ensures consistent border styling across different text directions.&lt;/p&gt;

&lt;p&gt;Using CSS logical properties, you can ensure that spacing, alignment, and positioning remain consistent, regardless of the text direction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap it up!
&lt;/h2&gt;

&lt;p&gt;As we strive to make internet and web browsing an inclusive place, logical properties play a pivotal role in letting us achieve that. By writing styles that can adapt to diverse languages and their requirements, we can ensure that our users worldwide have a seamless experience catered to their linguistic needs.&lt;/p&gt;

&lt;p&gt;In this blog, we learned CSS logical properties in detail, including exploring practical examples of their needs. We looked at physical alternatives of floating and positioning, margins and paddings, borders and sizings which are fundamental aspects of CSS. We learned how logical properties revolutionize the way these properties work by providing powerful alternatives that adapt to different writing modes and directions.&lt;/p&gt;

&lt;p&gt;We also covered some significant advantages of using logical properties, followed by ensuring their compatibility across browsers. I hope this blog has given you a thorough understanding of CSS logical properties.&lt;/p&gt;

&lt;p&gt;It’s time for you to make powerful websites that can adapt to different directions without any manual adjustments!&lt;/p&gt;

&lt;p&gt;Until next time, happy building!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Discover the ins and outs of &lt;a href="https://www.lambdatest.com/learning-hub/ux-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_19&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;UX testing&lt;/a&gt; with this comprehensive guide. Explore various testing methods, tools, and best practices for measuring success.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are the logical properties of CSS?
&lt;/h3&gt;

&lt;p&gt;Logical properties define direction‐relative equivalents of their corresponding physical properties.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why use CSS logical properties?
&lt;/h3&gt;

&lt;p&gt;Code can be made more legible and understandable using CSS logical properties. For instance, based on the direction of the content, we can utilize logical values like inline-size and block size to establish the size of elements rather than using physical properties like width and height.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are CSS properties with examples?
&lt;/h3&gt;

&lt;p&gt;A CSS property assigns a style or behavior to an HTML element. Examples include color, border, margin, font-style, and transform.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Complete Guide To CSS Cascade Layers</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Tue, 04 Jul 2023 07:24:45 +0000</pubDate>
      <link>https://forem.com/lambdatest/a-complete-guide-to-css-cascade-layers-50o4</link>
      <guid>https://forem.com/lambdatest/a-complete-guide-to-css-cascade-layers-50o4</guid>
      <description>&lt;p&gt;&lt;em&gt;“Design is not just what it looks like and feels like. Design is how it works,” — Steve Jobs.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;These words perfectly capture the essence of creating captivating websites that not only appear visually appealing but also function seamlessly. When it comes to designing complex websites with multiple sources of style, CSS Cascade Layers play a vital role in creating a balance between how things look and how they work.&lt;/p&gt;

&lt;p&gt;When designing websites with multiple sources of style, the complexity of managing styles can escalate rapidly. As the number of stylesheets increases, it becomes increasingly challenging to ensure consistency and avoid conflicts in the styling rules applied to various elements. This is where CSS Cascade Layers come in, providing an elegant solution to the problem of conflicting style rules by establishing a clear order of priority.&lt;/p&gt;

&lt;p&gt;In this blog on CSS Cascade Layers, we will cover the concept of CSS Cascade, the key steps in the Cascade process, and delve into creating CSS Cascade Layers. We’ll explore named and anonymous layers, Nested Cascade Layers and use media and feature queries for conditional styling. By the end of this blog, you’ll gain a thorough understanding of CSS Cascade Layers and how they can improve your stylesheet organization and maintenance.&lt;/p&gt;

&lt;p&gt;Are you new to CSS? Here is our ultimate &lt;a href="https://www.lambdatest.com/learning-hub/css-cheat-sheet?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;CSS Cheat Sheet.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, let’s get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CSS Cascade?
&lt;/h2&gt;

&lt;p&gt;Before we dive into the CSS Cascade Layers, let’s take a moment to grasp the concept of CSS Cascade. Understanding Cascade before CSS Cascade Layers is crucial because layers are built upon the concept of the Cascade.&lt;/p&gt;

&lt;p&gt;The CSS Cascade refers to the process of determining how conflicting styles are resolved and applied to elements on a web page. To determine the values assigned to each property for every element, the user agent follows a series of defined steps. Let’s briefly go over these steps.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Run your &lt;a href="https://www.lambdatest.com/playwright?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Playwright&lt;/a&gt; test scripts instantly on 50+ browser and OS combinations using the LambdaTest cloud. Read more.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Key steps of the CSS Cascade Process
&lt;/h2&gt;

&lt;p&gt;The Cascade process is an important part of CSS because it determines how styles are applied to different elements on a webpage. Understanding the key steps of the CSS Cascade process is essential for creating effective and efficient stylesheets.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Relevance:&lt;/strong&gt; The CSS Cascade process begins by gathering all the applicable style rules from various sources, including user-defined styles, author stylesheets, and browser defaults. In this step, the user agent (browser) identifies all the style declarations that match the selectors for each element. For example, if we have an &lt;em&gt;h1&lt;/em&gt; tag on our page, the user agent will find all style declarations that match the &lt;em&gt;h1&lt;/em&gt; selector.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Importance:&lt;/strong&gt; In this step, the CSS Cascade prioritizes rules based on whether they are normal or important, with the latter having the &lt;em&gt;!important&lt;/em&gt; flag set. Important styles take precedence over normal styles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Origin:&lt;/strong&gt; In this step, the CSS Cascade sorts the style rules based on their source — author, user, or user-agent(browser).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Layers:&lt;/strong&gt; After sorting the styles based on origin, the CSS Cascade organizes the styles within each origin based on the CSS Cascade Layer. There are six layers for normal declarations ordered from the first layer created to the last, followed by normal unlayered styles. For important styles, the layer order is inverted, with important unlayered styles having the lowest precedence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Specificity:&lt;/strong&gt; Sorts declarations by specificity for conflicting styles in the origin layer that have precedence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Order of appearance:&lt;/strong&gt; Finally, if multiple selectors within a single origin layer have the same specificity, the property value from the last declared selector with the highest specificity takes precedence. It’s important to note that order of appearance becomes relevant only when competing declarations in the origin of precedence have the same specificity. Let’s look at an example:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="card"&amp;gt;
      &amp;lt;h1 class="title"&amp;gt;FREE ONLINE CONFERENCE&amp;lt;/h1&amp;gt;
      &amp;lt;h2 class="subtitle"&amp;gt;Testμ Conference&amp;lt;/h2&amp;gt;
      &amp;lt;p class="description"&amp;gt;
        Join the free online conference to decode the future of testing!
      &amp;lt;/p&amp;gt;
      &amp;lt;p class="date"&amp;gt;22 - 24 August, 2023&amp;lt;/p&amp;gt;
      &amp;lt;a href="#" class="button"&amp;gt;Register for Free&amp;lt;/a&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* targets &amp;lt;div&amp;gt; element with the class "card" that is a descendent of &amp;lt;body&amp;gt; */
body .card {
  background-color: lightgreen;
}
/*targets the &amp;lt;div&amp;gt; element with the class "card"*/
div.card {
  background-color: #f5f5f5;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/VwEEVOz?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;A comprehensive end-to-end Testing tutorial that covers what &lt;a href="https://www.lambdatest.com/learning-hub/end-to-end-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;e2e Testing&lt;/a&gt; is, its importance, benefits, and how to perform it with real-time examples.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At each step, only the declarations that are still relevant proceed to the next step. If there is only one declaration remaining, it becomes the final style, and the subsequent steps become irrelevant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Origin and Cascade
&lt;/h2&gt;

&lt;p&gt;In CSS, there are three types of origins for styles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;user-agent stylesheets (styles provided by the browser by default)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;user stylesheets (additional styles the user may have set)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;author stylesheets (styles written by the developer)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These origins determine the source of the styles and their importance. The Cascade organizes these styles into six buckets based on origin and importance.&lt;/p&gt;

&lt;p&gt;There are eight levels of precedence in the CSS Cascade. They start with the lowest precedence, which includes normal user-agent styles, and go up to the highest precedence, which includes styles being transitioned. The order of precedence is as follows:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;User-agent normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Author normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Styles being animated&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Author important styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User important styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User-agent important styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Styles being transitioned&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The user-agent refers to the browser itself, the user is the visitor to the website, and the author is the developer. User-agent normal styles have the lowest precedence, while user-agent important styles have the highest precedence.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cY31XM5A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3000/0%2ABOzMCUkA2ZUPty8o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cY31XM5A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3000/0%2ABOzMCUkA2ZUPty8o.png" alt="" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this &lt;a href="https://www.lambdatest.com/appium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Appium Automation&lt;/a&gt; tutorial, learn about Appium and its benefits for mobile automation testing. Take a look at how Appium works and see how to perform Appium testing of your mobile applications.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Origin and Specificity
&lt;/h2&gt;

&lt;p&gt;Multiple origins provide style declarations for the same element. So for each property, the declaration that wins is the one from the origin with the highest precedence. Precedence is determined by the weight assigned to each origin, which can be either normal or important. Declarations with important weight have higher precedence than those with normal weight. So, the value that gets applied is the one from the origin with the highest precedence.&lt;/p&gt;

&lt;p&gt;We now know that the value from the origin with the highest precedence gets applied. And if that winning origin has more than one property declaration for the same element, this is where specificity comes into play. For those competing property values, the selector’s specificity is compared, and since every selector has a specificity value associated with it, the one with the highest value wins. Note that specificity weight is never compared between selectors from different origins.&lt;/p&gt;

&lt;p&gt;Let’s take a look at an example to understand this better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
      &amp;lt;button&amp;gt;This button has the user agent styles applied.&amp;lt;/button&amp;gt;
      &amp;lt;button classname="btn"&amp;gt;
        This button has the author styles applied.
      &amp;lt;/button&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;button:nth-of-type(2) {
  background-color: #007bff;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.lambdatest.com/learning-hub/black-box-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;**Black Box testing&lt;/a&gt;? Don’t worry; we will be covering what is Black box testing, merits, demerits, types &amp;amp; techniques. **&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/ExdpQEq?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In the above example, we have two buttons. The first button doesn’t have any styles applied by the author, so only the user-agent styles (styles provided by the browser) are applied. Additionally, if you have any personal user styles set, they would be applied as well.&lt;/p&gt;

&lt;p&gt;The second button, despite having a selector in the author stylesheet with a specificity of 0–0–0 (indicating lowest specificity), applies some styles from the author stylesheet. This seems surprising because we know that styles with higher specificity override styles with lower specificity.&lt;/p&gt;

&lt;p&gt;The author styles “win” in this case because when there are conflicting styles from different origins, the CSS Cascade gives precedence to the origin with higher precedence, regardless of the specificity of the styles within that origin.&lt;/p&gt;

&lt;p&gt;In our case, the author styles have higher precedence over the user-agent styles. So, even though the specificity of the selector in the author stylesheet is low, the author styles still take precedence over the user-agent styles because of their origin and the CSS Cascade’s priority rules. Origin precedence always wins over selector specificity.&lt;/p&gt;

&lt;p&gt;Now that we have a solid grasp of the CSS Cascade process and its steps, let’s dive into the concept of cascade layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are CSS Cascade Layers?
&lt;/h2&gt;

&lt;p&gt;Cascade Layers in CSS provide a means of establishing a hierarchical structure for applying styles to elements on a web page. Similar to how we have six levels of priority based on origin and importance, CSS Cascade Layers allow us to create sub-origin levels of priority within any of those origins. To provide a quick recap, those six levels of priority are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;User-agent normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;User normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Author normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Styles being animated&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Author important styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;User important styles&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this &lt;a href="https://www.lambdatest.com/learning-hub/system-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;System testing&lt;/a&gt; tutorial, learn why System testing is important and all the intricacies of the System testing process.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With CSS Cascade Layers, we can define sub-levels of priority within any of these origin buckets.&lt;/p&gt;

&lt;p&gt;Within each of these origin buckets, multiple CSS Cascade Layers can exist. The order in which these layers are created is crucial because it determines their precedence within their respective origin. This precedence order determines styles that will be prioritized over others during the styling process.&lt;/p&gt;

&lt;p&gt;As the order in which layers are created holds great significance, let’s take a moment to understand the precedence order for different origins before we dive into the creation of CSS Cascade Layers.&lt;/p&gt;

&lt;p&gt;In normal origin buckets, the sorting of layers follows a simple rule: the styles in the first layer created have the highest precedence, followed by the styles in subsequent layers. On the other hand, unlayered normal styles, which are not assigned to any specific layer, find themselves at the bottom of the priority list, having the lowest precedence.&lt;/p&gt;

&lt;p&gt;However, things work differently when it comes to important styles. Unlayered important styles are grouped into a special layer that takes precedence over all non-transitioning normal styles. While these unlayered important styles have less precedence than important styles in specific layers, they still take precedence over normal styles.&lt;/p&gt;

&lt;p&gt;Additionally, the order in which layers are declared also plays a role. Important styles in earlier declared layers have higher precedence than important styles in later declared layers within the same origin. This ensures that the most recently declared important styles will be able to follow earlier ones.&lt;/p&gt;

&lt;p&gt;Below is a demonstration of the layer order with &lt;em&gt;!important&lt;/em&gt; styles:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J293Acy5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3000/0%2AGSFyO4YLCIlhUp4i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J293Acy5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3000/0%2AGSFyO4YLCIlhUp4i.png" alt="" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above illustration, we have two layers, namely &lt;em&gt;@theme&lt;/em&gt;, and &lt;em&gt;@utilities&lt;/em&gt;, followed by an unlayered style block. In this case, the &lt;em&gt;!important&lt;/em&gt; style in the &lt;em&gt;@theme&lt;/em&gt; layer has the highest precedence, followed by &lt;em&gt;!important&lt;/em&gt; styles in the &lt;em&gt;@utilities&lt;/em&gt; layer. Next is the &lt;em&gt;!important *unlayered styles which get higher precedence than normal unlayered styles. Lastly, we have the normal *@layer&lt;/em&gt; style followed by the normal &lt;em&gt;@theme&lt;/em&gt; style, which gets the lowest precedence.&lt;/p&gt;

&lt;p&gt;For the rest of this tutorial, we will mainly discuss CSS Cascade Layers in the author stylesheet, but it’s important to remember that cascade layers can also exist in user and user-agent stylesheets.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this &lt;a href="https://www.lambdatest.com/learning-hub/ad-hoc-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;Ad hoc testing&lt;/a&gt; tutorial, let’s deep dive into what Ad hoc testing is, its advantages, disadvantages, types, characteristics, and their best practices.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  How to create CSS Cascade Layers?
&lt;/h2&gt;

&lt;p&gt;There are different ways to create layers in CSS. Let’s first take a look at the different methods briefly and then we will elaborate on each of them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;The *@layer statement&lt;/em&gt;: *&lt;em&gt;By using the *@layer at-rule&lt;/em&gt; followed by one or more layer names, you can create named layers without assigning any styles to them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The &lt;em&gt;@layer block&lt;/em&gt;:&lt;/strong&gt; With this approach, you can enclose a block of styles within the &lt;em&gt;@layer at-rule&lt;/em&gt;. All the styles within the block will be added to a specific named or unnamed layer. This allows you to group related styles within a layer, enhancing code readability and organization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The &lt;em&gt;@import rule&lt;/em&gt;:&lt;/strong&gt; By utilizing the &lt;em&gt;@import at-rule&lt;/em&gt; with the layer keyword or the &lt;em&gt;layer()&lt;/em&gt; function, you can import the contents of an external file into a designated layer.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each method creates a layer, but only if a layer with the specified name hasn’t been created yet. If you don’t provide a layer name in the &lt;em&gt;@layer at-rule or @import with layer()&lt;/em&gt;, a new unnamed layer is automatically created.&lt;/p&gt;

&lt;h2&gt;
  
  
  The @layer statement rule for named layers
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;@layer&lt;/em&gt; statement rule allows you to create named layers and establish the order of precedence when multiple CSS Cascade Layers are present.&lt;/p&gt;

&lt;p&gt;The order of layers is defined by the sequence in which they are declared. One way to establish a layer order is by using &lt;em&gt;@layer&lt;/em&gt; followed by the names of one or more layers without assigning any styles initially. For instance, using the &lt;em&gt;@layer&lt;/em&gt; statement with the following syntax declares three layers in the order specified:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;theme&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;layout and&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;utilities&lt;/p&gt;

&lt;p&gt;@layer theme, layout, utilities;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s common practice to place the &lt;em&gt;@layer&lt;/em&gt; declaration as the first line of your CSS. For instance, if the above declaration is the first line of your CSS, then the layer order will be theme, layout, and utilities. This means the theme layer will take precedence over the layout layer, and both the theme and layout layers will take precedence over the utility layer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BbT0nlfm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3000/0%2AbXyDAZ93ILyEa1oG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BbT0nlfm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3000/0%2AbXyDAZ93ILyEa1oG.png" alt="" width="800" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If some layers already exist before this declaration, the new layers will be added to the end of the existing layer list as long as there are no conflicting layer names. However, if a layer with the same name already exists, the &lt;em&gt;@layer&lt;/em&gt; statement will create only the remaining new layers. For instance, if “&lt;em&gt;layout&lt;/em&gt;” is an existing layer, only “&lt;em&gt;theme&lt;/em&gt;” and “&lt;em&gt;utilities&lt;/em&gt;” will be created. In this case, the final layer order will be layout, theme, and utilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  The @layer block at-rule for named and anonymous layers
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;@layer&lt;/em&gt; block at-rule is a powerful feature for creating both named and anonymous layers in CSS. With this rule, we can group and organize our styles within a block and assign them to specific layers.&lt;/p&gt;

&lt;p&gt;Before we learn how to create named and anonymous layers with &lt;em&gt;@layer&lt;/em&gt; block, let’s look at some great cases where we can utilize the &lt;em&gt;@layer&lt;/em&gt; block:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Component-based styling:&lt;/strong&gt; When building a complex web application with reusable components, the &lt;em&gt;@layer&lt;/em&gt; rule can be used to define a layer for each component. This allows for clear separation and encapsulation of styles, making it easier to maintain and modify individual components without affecting the rest of the styles.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Theming:&lt;/strong&gt; &lt;em&gt;@layer&lt;/em&gt; can be used to define layers for different themes or variations of a website or application. By assigning styles to specific layers, you can easily switch between themes or apply styles selectively based on the active theme.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Performance optimization:&lt;/strong&gt; By grouping related styles together in &lt;em&gt;@layer&lt;/em&gt; blocks, you can leverage &lt;a href="https://www.lambdatest.com/blog/css-preprocessors-sass-vs-less-vs-stylus-with-examples/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;CSS preprocessors&lt;/a&gt; or build tools to include only the required styles selectively. This can reduce the size of the CSS output and improve performance by minimizing unused styles.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s explore how to create named and anonymous types of layers with some examples.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This article on the Best &lt;a href="https://www.lambdatest.com/blog/top-ui-automated-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;UI Automation Testing Tools &lt;/a&gt;cover what is UI automated testing, challenges while performing UI testing, and top tools that can help you perform UI testing.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Creating Named Layers
&lt;/h3&gt;

&lt;p&gt;To create a named layer, simply enclose your styles within a &lt;em&gt;@layer&lt;/em&gt; block, followed by the desired layer name. For example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer myLayer {
  /* Styles specific to the 'myLayer' named layer */
  /* ... */
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The identifier after the &lt;em&gt;@layer&lt;/em&gt; acts as the layer name, and the styles within the at-rule are added to that layer. If the specified layer name doesn’t exist, a new layer will be created. However, if a layer with the same name already exists, the styles will be added to that existing layer. Here’s another example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Creating a named layer: 'header' */
@layer header {
  h1 {
    font-size: 24px;
    color: #333;
  }
}


/* Adding styles to the existing 'header' layer */
@layer header {
  h2 {
    font-size: 18px;
    color: #666;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above example, we first create a named layer called “header” and assign styles to it. Then, we append additional styles to the same header layer. Reusing the layer name doesn’t create a new layer; it adds styles to the existing layer.&lt;/p&gt;

&lt;p&gt;Named layers are useful when you want to categorize and organize styles that are specifically related to a certain section or component of your website. They provide a structured approach to managing styles and make it easier to understand and maintain your codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  Creating Anonymous Layers
&lt;/h3&gt;

&lt;p&gt;If you want to create an anonymous layer, simply use the &lt;em&gt;@layer&lt;/em&gt; block &lt;em&gt;at-rule&lt;/em&gt; without specifying a name. You can only add styles to an unnamed layer during its creation.&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Creating an unnamed, anonymous layer */
@layer {
  p {
    margin: 0;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above example, we create an unnamed, anonymous layer and add styles to it. Please note that anonymous layers cannot be referenced or have additional styles added to them once created.&lt;/p&gt;

&lt;p&gt;Anonymous layers provide flexibility when you want to group styles without assigning them to a specific name. They can be useful for organizing styles that don’t necessarily belong to a named layer but still need to be grouped together.&lt;/p&gt;

&lt;h3&gt;
  
  
  An Implicit Layer of unlayered styles
&lt;/h3&gt;

&lt;p&gt;As mentioned earlier, this concept refers to the combination of all unlayered styles.&lt;br&gt;
This is not an explicitly created layer but a layer that CSS Cascade creates automatically, combining all the unlayered styles.&lt;/p&gt;

&lt;p&gt;Styles declared outside of any layer are combined into an implicit layer. This implicit layer contains unlayered styles and takes precedence over normal layered declarations. It’s always positioned at the end of the layer stack. Let’s take a look at an example.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Unlayered styles */
body {
  background-color: #f5f5f5;
  color: #333;
}
/* Creating an unnamed, anonymous layer */
@layer {
  p {
    margin: 0;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example above, we have unlayered styles (body styles) declared outside of any &lt;em&gt;@layer&lt;/em&gt; block. These styles form an implicit layer, which will take precedence over normal layered declarations, even if they have a lower specificity or appear earlier in the code.&lt;/p&gt;
&lt;h3&gt;
  
  
  Additional considerations
&lt;/h3&gt;

&lt;p&gt;It’s important to note that the order in which layers are created determines their stacking order. Once layers are declared, their order cannot be changed. Additionally, subsequent use of &lt;em&gt;@layer&lt;/em&gt; with no layer name creates additional unnamed layers; it does not append styles to a previously existing unnamed layer.&lt;/p&gt;

&lt;p&gt;Let’s look at an example to demonstrate how layer order affects the styles:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="testimonial-card"&amp;gt;
      &amp;lt;p class="testimonial-text"&amp;gt;
        &amp;lt;a href="https://www.lambdatest.com/"&amp;gt;@lambdatesting&amp;lt;/a&amp;gt; is fantastic.
        Cross browser and device testing frustration is minimized. You can't get
        rid of clients that need ie11 nor can you own every device but
        LambdaTest bridges that gap.
      &amp;lt;/p&amp;gt;
      &amp;lt;p class="testimonial-author"&amp;gt;- Mat Gargano&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer page {
  .testimonial-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    width: 400px;
    margin: 0 auto;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.24);
    line-height: 24px;
  }
  .testimonial-text {
    font-size: 18px;
    margin-bottom: 15px;
  }
  .testimonial-author {
    font-size: 16px;
    font-weight: bold;
    color: #333333;
  }
}


@layer site {
  .testimonial-card {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    width: 400px;
    margin: 0 auto;
    box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.24);
    line-height: 24px;
  }


  .testimonial-text {
    font-size: 18px;
    margin-bottom: 15px;
  }


  .testimonial-author {
 font-size: 16px;
    font-weight: bold;
    color: #333333;
  }
}
/* This has no effect */
@layer site, page;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/XWxBGbJ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;This article on the Best &lt;a href="https://www.lambdatest.com/blog/top-ui-automated-testing-tools/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;UI Automation Testing&lt;/a&gt; tools cover what is UI automated testing, challenges while performing UI testing, and top tools that can help you perform UI testing.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the above example, we created two layers and defined the styles for the page layer and the site layer using the &lt;em&gt;@layer rule&lt;/em&gt;. The styles for the page layer are defined first, followed by the styles for the site layer.&lt;/p&gt;

&lt;p&gt;Notice the &lt;em&gt;background-color&lt;/em&gt; property of the card in both layers; it is the only property that is different in both layers. In the page layer, we set it to &lt;em&gt;#ffffff&lt;/em&gt;, and in the site layer, we set it to &lt;em&gt;#f5f5f5&lt;/em&gt;. The last line, &lt;strong&gt;&lt;em&gt;@layer site, page&lt;/em&gt;&lt;/strong&gt;; doesn’t do anything in this context. Since the layers &lt;em&gt;site *and *page *were already created and named in the previous *@layer&lt;/em&gt; rules, declaring them again on the last line doesn’t have any effect. This line is redundant because the layers are already defined.&lt;/p&gt;

&lt;p&gt;Now, if you were to move the last line, &lt;strong&gt;&lt;em&gt;@layer site, page&lt;/em&gt;&lt;/strong&gt;; to the first line of the code, the background color of the card changes from &lt;em&gt;#f5f5f5&lt;/em&gt; to &lt;em&gt;#ffffff&lt;/em&gt;. This is because when you move the line to the beginning, you are declaring the layers’ site and page before defining the styles for each layer. This change in order affects the cascading behavior of the styles.&lt;/p&gt;

&lt;p&gt;The cascading behavior of styles follows a “last-declared, first-applied” order. So, when you move the &lt;strong&gt;&lt;em&gt;@layer site, page&lt;/em&gt;&lt;/strong&gt;; line to the beginning, the styles defined in the site layer will take precedence over the styles defined in the page layer. This means that the &lt;em&gt;h1&lt;/em&gt; heading will be underlined and have a green color because the styles from the site layer will take precedence over the styles from the page layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importing style sheets into named and anonymous layers with @import
&lt;/h2&gt;

&lt;p&gt;The &lt;em&gt;@import&lt;/em&gt; rule is a powerful feature that allows you to bring in external style sheets and incorporate them into both named and anonymous layers. This capability enhances your ability to organize and manage your styles effectively.&lt;/p&gt;

&lt;p&gt;To import style sheets using &lt;em&gt;@import&lt;/em&gt;, it’s important to note that the &lt;em&gt;@import&lt;/em&gt; statement should be placed before any CSS styles or &amp;lt;&lt;em&gt;style&lt;/em&gt;&amp;gt; blocks. However, it can be preceded by an &lt;em&gt;@layer at-rule,&lt;/em&gt; which allows you to create layers without immediately assigning styles to them.&lt;/p&gt;

&lt;p&gt;Let’s look at some simplified examples to understand better how &lt;em&gt;@import&lt;/em&gt; can be used with named and anonymous layers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importing into Named Layers
&lt;/h3&gt;

&lt;p&gt;We can import a style sheet into a named layer to group related styles together. Here’s an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url(“button-styles.css”) layer(buttons);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above example, we import the “button-styles.css” file into a named layer called “buttons.” By doing so, we bring in the styles defined in the imported file and associate them specifically with the “buttons” layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Importing into Anonymous Layers
&lt;/h3&gt;

&lt;p&gt;If you want to import styles without assigning them to a named layer, you can use an anonymous layer. Consider the following example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url(“common-styles.css”) layer();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;We can speed up the software validation process and boost testing coverage by adopting automated testing. However, there are a lot of challenges in applying test automation. In this article on the top 9 &lt;a href="https://www.lambdatest.com/blog/challenges-in-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;challenges in automation testing&lt;/a&gt;, we look at the various obstacles and how to deal with them.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this example, we import the styles from “common-styles.css” into an anonymous layer. This allows the imported styles to be accessible and applied throughout your CSS codebase without being tied to a specific named layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Combining Imports in a Single Layer
&lt;/h3&gt;

&lt;p&gt;You can import multiple CSS files into a single layer, making it convenient to manage related styles together. Let’s say we have separate style sheets for comments and social media icons. By importing both files into the “social” layer, we keep the styles for comments and social media icons organized and easily maintainable within a single layer.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url("comments.css") layer(social);
@import url("sm-icons.css") layer(social);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Conditional imports with media and feature queries
&lt;/h3&gt;

&lt;p&gt;The &lt;em&gt;@import&lt;/em&gt; rule can be a powerful tool when combined with &lt;a href="https://www.lambdatest.com/blog/responsive-css-media-queries-for-responsive-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;CSS media queries &lt;/a&gt;and feature queries, allowing us to import styles based on specific conditions. Media queries are a fundamental component of &lt;a href="https://www.lambdatest.com/learning-hub/responsive-design?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;responsive web design&lt;/a&gt;. According to a survey, in the first quarter of 2021, mobile devices alone generated 54.8 percent of global website traffic. This report clearly highlights the importance of a responsive website.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Learn why Python is the top choice for automation testing. This comprehensive tutorial provides a step-by-step guide to &lt;a href="https://www.lambdatest.com/blog/python-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;automation testing using python&lt;/a&gt; to help you streamline your testing process.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;However, making a responsive website is not that straightforward. There are multiple involved in it and one such crucial step is &lt;a href="https://www.lambdatest.com/responsive-test-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;responsiveness test&lt;/a&gt; on multiple view ports. To test that, you can leverage &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;LT Browser 2.0 &lt;/a&gt;by LambdaTest that makes it easier to test a websites’ responsiveness by providing 50+ pre-installed viewports with multiple screen resolutions. Additionally, LT Browser 2.0 also offers a number of sophisticated developer tools that you can leverage.&lt;/p&gt;

&lt;p&gt;For further information on LT Browser 2.0, you can check out our tutorial. Feel free to go through the tutorial provided below for LT Browser 2.0.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/rqFeuaZ-wAY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Catch up on the latest testing tutorials around &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Selenium automation&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/cypress-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Cypress testing,&lt;/a&gt; and more. Subscribe to the &lt;a href="https://www.youtube.com/c/LambdaTest?sub_confirmation=1?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;LambdaTest YouTube Channel&lt;/a&gt; for quick updates.&lt;/p&gt;

&lt;p&gt;Now that we understand the importance of media queries, let’s see how we can use @import with media queries to import a style conditionally.&lt;/p&gt;

&lt;p&gt;Let’s take a look at an example:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url("mobile-styles.css") layer(responsive) screen and (max-width: 768px) and (hover: none);
@import url("desktop-styles.css") layer(responsive) screen and (min-width: 769px) and (hover: hover);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the above example, we are importing style sheets into a named layer called “responsive” based on different screen widths. The first line imports “mobile-styles.css” into the “responsive” layer when the screen width is 768 pixels or less, and the device does not support hover interactions, targeting mobile devices. The second line imports “desktop-styles.css” into the same “responsive” layer when the screen width is 769 pixels or more, and the device supports hover interactions.&lt;/p&gt;

&lt;p&gt;By utilizing media queries and feature queries within &lt;em&gt;@import&lt;/em&gt;, we can dynamically load stylesheets that respond to specific device conditions, such as different screen sizes, orientations, or supported features. This flexibility allows us to create styles optimized for the features and specifications of the user’s device.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Learn why Python is the top choice for automation testing. This comprehensive tutorial provides a step-by-step guide to &lt;a href="https://www.lambdatest.com/blog/python-automation-testing/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;python for automation testing&lt;/a&gt; to help you streamline your testing process.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What are Nested Cascade Layers?
&lt;/h2&gt;

&lt;p&gt;Nested CSS Cascade Layers allow you to create layers within a named or anonymous layer, providing a hierarchical structure for your styles. This concept is similar to nesting elements within HTML or nesting selectors in CSS, but with CSS Cascade Layers, you can nest entire layers.&lt;/p&gt;

&lt;p&gt;Each CSS Cascade Layer, including an anonymous one, can contain nested layers. When a layer is imported into another layer, the imported layer becomes a nested layer. Let’s take a look at the benefits of nested CSS Cascade Layers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of Nested Cascade Layers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Enhanced style organization:&lt;/strong&gt; Nested Cascade Layers bring an additional level of organization to our styles. By creating layers within layers, we can group related styles, making it easier to find and manage specific sets of styles. This hierarchical structure promotes a more intuitive and structured approach to CSS code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved style scope:&lt;/strong&gt; Nested CSS Cascade Layers provide a clear scoping mechanism for your styles. Styles defined within a nested layer have a narrower scope, limiting their impact to specific elements or components. This prevents unintended style conflicts and allows for more targeted styling, resulting in cleaner and more maintainable code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Reusability and modularity:&lt;/strong&gt; By nesting Cascade Layers, you can encapsulate styles within specific contexts or components. This promotes reusability, as you can easily reuse layers with their associated styles in different parts of your project. It also enhances modularity, allowing you to isolate and manage styles for individual components or sections of your application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this Appium tutorial, learn about Appium and its benefits for mobile automation testing. Take a look at how Appium works and see how to perform &lt;a href="https://www.lambdatest.com/appium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Appium automation testing&lt;/a&gt; of your mobile applications.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Creating Nested Cascade Layers
&lt;/h2&gt;

&lt;p&gt;We can create nested cascade layers using the same methods as regular layers. The &lt;em&gt;@layer&lt;/em&gt; at-rule is used, followed by the names of one or more layers, utilizing dot notation to indicate nesting. Multiple dots and layer names signify multiple levels of nesting. Let’s see how it works:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer page {
  /* Styles for the overall page layer */


  @layer header {
    /* Styles for the nested header layer within the page */
  }


  @layer main-content {
    /* Styles for the nested main-content layer within the page */
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this example, we have a named layer called “page,” and within it, we create two nested layers: “header” and “main-content.” Each nested layer can have its own specific set of styles, ensuring a logical separation and hierarchy within the overarching page layer.&lt;/p&gt;

&lt;p&gt;In addition to creating nested layers using the &lt;em&gt;@layer&lt;/em&gt; at-rule, we can also achieve nesting through the &lt;em&gt;@import&lt;/em&gt; rule. Let’s take a look at an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url("components.css") layer(components);
@import url("components-narrow.css") layer(components.narrow);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Run your &lt;a href="https://www.lambdatest.com/playwright?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Playwright browser testing&lt;/a&gt; scripts instantly on 50+ browser and OS combinations using the LambdaTest cloud.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this case, the first line imports the “components.css” file into the “components” layer. If the imported file contains any layers, they become nested layers within the “components” layer.&lt;/p&gt;

&lt;p&gt;The second line imports the “components-narrow.css” file into the “narrow” layer, which is a sub-layer of the “components” layer. This way, the nested “components.narrow” layer is created within the “components” layer, allowing you to further organize and customize your styles based on different contexts or screen sizes.&lt;/p&gt;

&lt;p&gt;Nested CSS Cascade Layers also offer the flexibility to target individual elements or components within these nested layers. Once you have established named nested layers within your cascade layers, you can apply styles exclusively to those layers using CSS’s dot notation. Let’s look at an example of how you can add styles to named nested layers:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer example.layout {
  main {
    width: 80vw;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Given an example, we have a named nested layer called “layout” within the parent layer “example.” By using the &lt;em&gt;@layer at-rule&lt;/em&gt; followed by the dot notation (example.layout), we create and target the specific nested layer.&lt;/p&gt;

&lt;p&gt;Within the nested layer, we further target elements using selectors, such as main, in this case. Here, we set the width of the main element to 80vw, indicating that it should occupy 80% of the viewport width. This level of customization allows you to tailor the appearance and layout of elements within the named nested layer to align with your design requirements seamlessly.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Inspect web elements to help developers and testers to debug UI flaws or make modifications in HTML or CSS files. Learn &lt;a href="https://www.lambdatest.com/software-testing-questions/how-to-inspect-on-macbook?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=stq"&gt;how to inspect on Mac.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Determining precedence based on the order of layers
&lt;/h2&gt;

&lt;p&gt;When dealing with cascading style sheets, it’s important to recognize that the order of layers directly affects the order of precedence. It is the primary factor in determining the order of precedence. In the previous sections, we briefly touched upon the significance of layer order and how it affects precedence, but let’s dive deeper into this topic to gain a better understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The precedence order of Regular Cascade Layers
&lt;/h2&gt;

&lt;p&gt;In the context of the regular CSS Cascade Layers, let’s consider the below example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url(A.css) layer(layerOne);
@import url(B.css) layer(layerTwo);
@import url(C.css);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here we create two named layers, “layerOne” and “layerTwo,” along with one unnamed layer. Let’s assume that the files A.css, B.css, and C.css do not contain additional layers. In that case, the following list shows how styles are sorted according to their precedence, from lowest (1) to highest (10):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Normal styles in “layerOne” (A.css)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normal styles in “layerTwo” (B.css)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normal styles in the unlayered sheet (C.css)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inline normal styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Animating styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Unlayered important styles (C.css)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Important styles in “layerTwo” (B.css)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Important styles in “layerOne” (A.css)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Inline important styles&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Transitioning styles&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Normal styles declared within layers get the lowest priority and are sorted based on the order of layer creation. That means normal styles within the first created layer have the lowest priority, while normal styles in the last created layer have the highest priority. So, in our case, normal styles declared within “layerOne” will be overridden by any subsequent stylings in the list if conflicts arise.&lt;/p&gt;

&lt;p&gt;Moving on, we have styles that are declared outside of any layers. These are the styles present in C.css, which were not imported into a specific layer. These unlayered styles take precedence over any conflicting styles from the “layerOne” and “layerTwo” named layers. It’s worth noting that normal styles declared outside of a layer always have higher precedence than normal-importance(styles that don’t have !&lt;em&gt;important&lt;/em&gt;) styles within named layers.&lt;/p&gt;

&lt;p&gt;Next, we have inline styles, declared using the style attribute, take precedence over normal styles found in both unlayered and layered style sheets (“layerOne” — A.css, “layerTwo” — B.css, and C.css).&lt;/p&gt;

&lt;p&gt;Animating styles hold higher precedence than all normal styles, including inline normal styles. Now, we have important styles, denoted by property values with the !&lt;em&gt;important flag&lt;/em&gt;, taking precedence over the previously mentioned styles. They are sorted in reverse order of normal styles. Important styles declared outside of a layer have less precedence than those declared within a layer.&lt;/p&gt;

&lt;p&gt;Within layers, important styles are also sorted based on the order of layer creation. For important styles, the last created layer possesses the lowest precedence, while the first created layer has the highest precedence among the declared layers.&lt;/p&gt;

&lt;p&gt;Inline important styles, once again, have higher precedence than important styles declared elsewhere.&lt;/p&gt;

&lt;p&gt;Lastly, we have transitioning styles which hold the highest precedence. When a normal property value is being transitioned, it takes precedence over all other property value declarations, even overriding inline important styles. However, it’s important to note that this precedence applies only during the transition process.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Perform manual or automated cross &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;browser test&lt;/a&gt; on 3000+ browsers online. Deploy and scale faster with the most powerful cross browser testing tool online.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The precedence order of Nested Cascade Layers
&lt;/h2&gt;

&lt;p&gt;The precedence order for nested CSS Cascade Layers is similar to that of regular CSS Cascade Layers; the only difference is that they are nested within layers. Let’s break down the precedence rules for nested layers:&lt;/p&gt;

&lt;h3&gt;
  
  
  Non-nested styles
&lt;/h3&gt;

&lt;p&gt;Styles defined outside of any nested layers take precedence over all other styles. These styles have the highest specificity and affect the entire document unless overridden by more specific styles. Let’s look at an example.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:root {
  --theme: red;
}


/* Later in the stylesheet */
:root {
  --theme: blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this example, the later rule overrides the earlier rule, and the value of the — *theme *will be blue because it is defined in the last non-nested layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Normal nested styles
&lt;/h3&gt;

&lt;p&gt;Within a parent layer, styles defined in nested layers follow the order in which they are created. If multiple nested layers define conflicting styles for the same element, the style defined in the last-created nested layer takes precedence. Here’s an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer components {
  :root {
    --theme: red;
    font-family: serif !important;
  }
}


/* Later in the stylesheet */
@layer components.narrow {
  :root {
    --theme: blue;
    font-family: sans-serif !important;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If the components.narrow layer is active, the value of the –theme will be blue, and the font-family will be sans-serif because the nested layer defined later takes precedence over the non-nested layer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Test native, hybrid, and web apps on any mobile OS with our free &lt;a href="https://www.lambdatest.com/android-emulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;android online emulator&lt;/a&gt;. Sign up to optimize app performance.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Important styles
&lt;/h3&gt;

&lt;p&gt;When an important style is applied within a nested layer, it takes precedence over non-nested styles. In this case, the specificity order is reversed, and the important style within the nested layer overrides non-nested styles. Let’s look at an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer components {
  :root {
    --theme: red;
    font-family: serif !important;
  }
}


/* Later in the stylesheet */
@layer components.narrow {
  :root {
    --theme: blue !important;
    font-family: sans-serif;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this example, even though the font-family is specified in the nested layer, the –theme variable will have the value of blue because it is marked as !&lt;em&gt;important&lt;/em&gt;. The important style within the nested layer takes precedence over the non-nested layer.&lt;/p&gt;

&lt;h3&gt;
  
  
  Specificity weight within nested layers
&lt;/h3&gt;

&lt;p&gt;The specificity weight between nested layers does not directly affect the precedence order. Instead, conflicting styles within a nested layer are resolved based on the normal specificity rules. The style with the highest specificity, including selector specificity and inline styles, takes precedence within that nested layer. Here’s an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@layer components {
  :root {
    --theme: red;
    font-family: serif !important;
  }
}


/* Later in the stylesheet */
@layer components.narrow {
  :root {
    --theme: blue;
    font-family: sans-serif !important;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Assuming the components.narrow layer is active, and both rules have the same specificity. In this case, the later rule defined within the nested layer takes precedence, so the value of the –theme will be blue.&lt;/p&gt;

&lt;p&gt;To summarize, non-nested styles have the highest precedence, followed by normal nested styles in the order of their creation. Important styles within nested layers override non-nested styles. The specificity weight between nested layers does not impact the precedence, but it matters for conflicting styles within a nested layer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;In this article, we take a look at some aspects of simulation and discuss some ways through which we can use &lt;a href="https://www.lambdatest.com/blog/iphone-simulators-for-windows/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=blog"&gt;ios emulator for pc.&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Browser support for CSS Cascade Layers
&lt;/h2&gt;

&lt;p&gt;The support for CSS Cascade Layers varies across different browsers. In Chrome, versions 4 to 95 do not have native support for CSS Cascade Layers. However, starting from version 96 to 98, you can enable support by using the — &lt;em&gt;enable-blink-features=CSSCascadeLayers&lt;/em&gt; runtime flag. It’s worth noting that Chrome provides full support for CSS Cascade Layers starting from version 99.&lt;/p&gt;

&lt;p&gt;In Firefox, CSS Cascade Layer support is not available in versions 2–93. However, starting from version 94, you can enable CSS Cascade Layer support by using the &lt;em&gt;layout.css.cascade-layers.enabled&lt;/em&gt; feature flag in about:config. From version 97 onwards, they are fully supported.&lt;/p&gt;

&lt;p&gt;The below illustration provides a detailed overview of the browser support for CSS Cascade Layers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GpB7_lbW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2Ai-js70H4FLWBUJyg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GpB7_lbW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn-images-1.medium.com/max/3200/0%2Ai-js70H4FLWBUJyg.png" alt="" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://caniuse.com/"&gt;Source&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ensuring consistent rendering and functionality across different web browsers is of utmost importance in web development. Similar to all CSS properties, when it comes to cascade layers, browser support, and fallbacks play a crucial role in achieving this goal. By testing &lt;a href="https://www.lambdatest.com/learning-hub/cross-browser-compatibility?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub"&gt;browser compatibility&lt;/a&gt; and providing appropriate fallback options, you can effectively address potential rendering and functionality issues, resulting in a robust and reliable web experience.&lt;/p&gt;

&lt;p&gt;To test browser compatibility, you can use a unified digital experience testing platform like LambdaTest that offers an &lt;a href="https://www.lambdatest.com/online-browser-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;online browser farm&lt;/a&gt; of numerous real browsers and operating systems combinations to test your websites and web apps. It lets you perform tests at scale to detect cross browser issues and fix them so that your website or web app works seamlessly across different browsers &amp;amp; OS combinations.&lt;/p&gt;

&lt;p&gt;Using LambdaTest’s Real Time Browser Testing feature, you can perform cross browser testing across different browser and OS combinations.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/WYbyLfLM2-E"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;You can also Subscribe to the &lt;a href="https://www.youtube.com/channel/UCCymWVaTozpEng_ep0mdUyw?sub_confirmation=1?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;LambdaTest YouTube Channel&lt;/a&gt; and stay updated with the latest tutorials around &lt;a href="https://www.lambdatest.com/automated-browser-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;automated browser testing,&lt;/a&gt; &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Selenium testing,&lt;/a&gt; &lt;a href="https://www.lambdatest.com/cypress-e2e-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Cypress E2E testing&lt;/a&gt;, CI/CD, and more.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://www.lambdatest.com/mobile-emulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=jul_04&amp;amp;utm_term=bh&amp;amp;utm_content=webpage"&gt;Emulater online &lt;/a&gt;from LambdaTest allows you to seamlessly test your mobile applications, websites,and web apps on mobile browsers and mobile devices.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;
&lt;/blockquote&gt;

&lt;p&gt;Congratulations on making it here!! You’re a great learner!&lt;/p&gt;

&lt;p&gt;In this blog on CSS Cascade Layers, we have covered the concept of cascade along with its steps. We then learned CSS Cascade Layers and the various methods of creating them. Additionally, we explored nested cascade layers and the advantages they provide, followed by a way of creating them. Finally, we learned how to determine the precedence of layers based on their order.&lt;/p&gt;

&lt;p&gt;CSS Cascade Layers are extremely important when working with large codebases with multiple stylesheets from different third parties. They allow us to keep things modular and maintainable by eliminating conflicts and establishing a clear order of priority. By understanding the key steps of the cascade process and learning how to create cascade layers effectively, you now possess a powerful set of tools to manage and easily control stylesheets.&lt;/p&gt;

&lt;p&gt;Remember, design is not just about appearance but also about how it works. Cascade Layers allow you to strike that balance, ensuring that your designs captivate and engage users while functioning flawlessly. I hope this guide has been helpful to you in understanding CSS Cascade Layers and how they help us manage stylesheets effectively.&lt;/p&gt;

&lt;p&gt;So, go forth and create websites that utilize the power of CSS Cascade Layers.&lt;/p&gt;

&lt;p&gt;Until next time, happy styling!&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What are cascade layers in CSS?
&lt;/h3&gt;

&lt;p&gt;Web developers can prioritize specific CSS sections by using CSS Cascade Layers, which are explicit specificity containers that offer easier and more control over the CSS declarations.&lt;/p&gt;

&lt;h3&gt;
  
  
  What are the four components of the cascade CSS?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Relevance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Origin and importance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Specificity.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Order of appearance&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>A Complete Guide To CSS Overflow</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Mon, 20 Mar 2023 08:40:54 +0000</pubDate>
      <link>https://forem.com/testmuai/a-complete-guide-to-css-overflow-4p3o</link>
      <guid>https://forem.com/testmuai/a-complete-guide-to-css-overflow-4p3o</guid>
      <description>&lt;p&gt;You know content positioning in web design is important, right? Centering a div is literally the most famous topic in the web developer community. Yes, I am not lying : (&lt;/p&gt;

&lt;p&gt;CSS has a concept named the “&lt;strong&gt;box model&lt;/strong&gt;,” which says every element has a box of its own. You might be wondering why we are talking about this box model concept.&lt;/p&gt;

&lt;p&gt;So here’s your answer — When &lt;a href="https://www.lambdatest.com/blog/20-elements-of-modern-web-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;designing a modern website,&lt;/a&gt; you’ll likely run into issues where your content won’t fit within an element as intended. For example, an element may be a div or a paragraph tag, and content may be the text within it. So when content doesn’t fit in the element’s box and spills out, that is known as &lt;strong&gt;CSS overflow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If we try putting it more simply, &lt;a href="https://www.lambdatest.com/web-technologies/css-overflow?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;CSS overflow &lt;/a&gt;is any content that is too large for an element’s box.&lt;/p&gt;

&lt;p&gt;Now comes the question of why you should know it? The short answer is &lt;a href="https://www.lambdatest.com/blog/responsive-web-design-all-you-need-to-know/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;responsive web design&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Your users could use any device to view your website, right? What if they come across usability or any &lt;a href="https://www.lambdatest.com/blog/10-responsive-web-design-challenges-and-their-solution/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;responsive web design challenges&lt;/a&gt; when accessing the website. Being a freelancer, I can vouch that usability issues can turn out to be a big turn-off for the users : (&lt;/p&gt;

&lt;p&gt;That is why it becomes important to design a website that is responsive on all devices.&lt;/p&gt;

&lt;p&gt;You need to know when to shrink the content and when to avoid doing so. When content overflows and doesn’t fit in a given area, it causes issues with page layout and interferes with the visibility of other elements.&lt;/p&gt;

&lt;p&gt;This is where CSS overflow comes in, with all of its abilities to help us fantastically manage content positioning.&lt;/p&gt;

&lt;p&gt;By the end of this blog on CSS overflow, you will understand everything you need to know to handle your content proficiently. So, let’s get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CSS Overflow?
&lt;/h2&gt;

&lt;p&gt;CSS overflow is when the content overflows from its specified container. This property controls what happens to the content that does not fit in a given area.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;overflow&lt;/strong&gt; property has the following values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;visible&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;hidden&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;scroll&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;auto&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s see overflow in action with the help of an example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow not set&amp;lt;/h1&amp;gt;
&amp;lt;p class=”box”&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived only five centuries.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; body {
    font: 15px Georgia, serif;
  }
   h1{
    font: 28px Georgia, Serif;
    text-align: center;
  }
  .box{
    width: 200px;
    height: 180px;
    padding: 8px;
    border: 1px solid #000;
    line-height:21px;
    background-color: #EEEEEE;
    margin: 0 auto;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/QWmjvdV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the above example, the box has a fixed width and height. However, the text that was placed inside the box is so long that it cannot fit within the box as intended. The extra text you see dropping past the black border is the overflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Need a great solution for cross browser testing on Safari? Forget about emulators or simulators - use real &lt;a href="https://www.lambdatest.com/test-on-safari-browsers?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;safari browser online&lt;/a&gt;.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  CSS overflow visible
&lt;/h2&gt;

&lt;p&gt;Visible is the default value of CSS overflow. It means that not setting the CSS overflow property is the same as setting it to “&lt;strong&gt;visible&lt;/strong&gt;”.&lt;/p&gt;

&lt;p&gt;When overflow is visible, the overflowing content will not be clipped. Instead, it will display outside the element’s box and might overlap other elements on the page.&lt;/p&gt;

&lt;p&gt;Let’s see a quick example of overflow visible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow:visible;&amp;lt;/h1&amp;gt; 
&amp;lt;p class=”box”&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived five centuries.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; body {
    font: 15px Georgia, serif;
  }
   h1{
    font: 28px Georgia, Serif;
    text-align: center;
  }
  .box{
    width: 200px;
    height: 180px;
    padding: 8px;
    border: 1px solid #000;
    line-height:21px;
    background-color: #EEEEEE;
    margin: 0 auto;
    overflow:visible;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/abYvWEv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the above example, the p element with the class name “box” has an overflow property set to visible.&lt;/p&gt;

&lt;p&gt;As you can notice, there is no difference between the box from the previous example, which doesn’t have any overflow property, and this box which has an overflow property. This is because the overflow property is set to visible by default.&lt;/p&gt;
&lt;h2&gt;
  
  
  CSS overflow hidden
&lt;/h2&gt;

&lt;p&gt;Overflow hidden means the overflowing content will be hidden and will not be displayed on the page.&lt;/p&gt;

&lt;p&gt;Once a web browser comes across the CSS overflow hidden property, it hides the extra content beyond the element’s box.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of overflow hidden.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow:hidden;&amp;lt;/h1&amp;gt;
&amp;lt;p class="box"&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived five centuries.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
font: 15px Georgia, serif;
}
h1{
font: 28px Georgia, Serif;
text-align: center;
}
.box{
width: 200px;
height: 180px;
padding: 8px;
border: 1px solid #000;
line-height:21px;
background-color: #EEEEEE;
margin: 0 auto;
overflow: hidden;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/GRxpmGQ?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
As you can see in the example above, the p element with the class name “box” has an overflow property set to hidden. Because of this value, overflowing content is not visible on the page.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;a href="https://www.lambdatest.com/mobile-emulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Emulators Online&lt;/a&gt; from LambdaTest allows you to seamlessly test your mobile applications, websites,and web apps on mobile browsers and mobile devices.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  CSS overflow scroll
&lt;/h2&gt;

&lt;p&gt;Setting the overflow value to scroll will hide the overflowing content from rendering outside the element’s box, along with providing scrollbars to view the content.&lt;/p&gt;

&lt;p&gt;Note that with setting overflow to scroll, you always get both the horizontal and vertical scrollbars even if the content only requires one or the other.&lt;/p&gt;

&lt;p&gt;&lt;iframe class="tweet-embed" id="tweet-1269415423595986944-708" src="https://platform.twitter.com/embed/Tweet.html?id=1269415423595986944"&gt;
&lt;/iframe&gt;

  // Detect dark theme
  var iframe = document.getElementById('tweet-1269415423595986944-708');
  if (document.body.className.includes('dark-theme')) {
    iframe.src = "https://platform.twitter.com/embed/Tweet.html?id=1269415423595986944&amp;amp;theme=dark"
  }



&lt;/p&gt;

&lt;p&gt;Let’s look at an example of overflow scroll.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow:scroll;&amp;lt;/h1&amp;gt;
&amp;lt;p class="box"&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived five centuries.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
font: 15px Georgia, serif;
}
h1{
font: 28px Georgia, Serif;
text-align: center;
}
.box{
width: 200px;
height: 180px;
padding: 8px;
border: 1px solid #000;
line-height:21px;
background-color: #EEEEEE;
margin: 0 auto;
overflow: scroll;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/rNdOmQV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
As you can see in the example above, the box has the overflow property set to scroll which gives us the scrollbar in the output.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS overflow auto
&lt;/h2&gt;

&lt;p&gt;The overflow auto value is almost similar to overflow scroll, in addition it also solves the problem of getting scrollbars even when we don’t need them.&lt;/p&gt;

&lt;p&gt;As discussed above, with overflow scroll we get both the horizontal and vertical scrollbar even if we don’t need them. But in case of overflow auto, we get the scrollbar only when the content actually goes outside the element’s box.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of overflow auto.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow:auto;&amp;lt;/h1&amp;gt;
&amp;lt;p class="box"&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived five centuries.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
font: 15px Georgia, serif;
}
h1{
font: 28px Georgia, Serif;
text-align: center;
}
.box{
width: 200px;
height: 180px;
padding: 8px;
border: 1px solid #000;
line-height:21px;
background-color: #EEEEEE;
margin: 0 auto;
overflow: auto;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/XWEmRQX?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
As we can see in the example above, the p element with the class name “box” has the overflow attribute set to auto. Because of that, we only get the horizontal scrollbar since our content only overflows horizontally.&lt;/p&gt;

&lt;h2&gt;
  
  
  X and Y property of CSS overflow
&lt;/h2&gt;

&lt;p&gt;Till this point, we used the overflow shorthand property to set overflow. Instead, we can also use overflow-x and overflow-y to control the overflow horizontally or vertically.&lt;/p&gt;

&lt;p&gt;Overflow-x is used to control the horizontal overflow of an element. In simple terms, it specifies what to do with the right or left edges of the content.&lt;/p&gt;

&lt;p&gt;Overflow-y is used to control the vertical overflow of an element. In simple terms, it specifies what to do with the top or bottom edges of the content.&lt;/p&gt;

&lt;p&gt;Below is an example of overflow-x and overflow-y properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow x and y&amp;lt;/h1&amp;gt;
&amp;lt;p class=”box”&amp;gt;Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.It has survived five centuries.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
font: 15px Georgia, serif;
}
h1{
font: 28px Georgia, Serif;
text-align: center;
}
.box{
width: 200px;
height: 180px;
padding: 8px;
border: 1px solid #000;
line-height:21px;
background-color: #EEEEEE;
margin: 0 auto;
overflow-x:scroll;
/*add horizontal scrollbar*/
overflow-y: hidden;
/*hide vertical scrollbar */
white-space: nowrap;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/yLKYXBL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the example above, we set overflow-x to scroll, because of which, we can scroll right and left. Next, we also set overflow-y to hidden, because of which we can not scroll up and down.&lt;/p&gt;

&lt;p&gt;We used a property named “&lt;strong&gt;white-space&lt;/strong&gt; with the value “&lt;strong&gt;no-wrap&lt;/strong&gt;”. This is used to specify how whitespace inside elements is handled. White-space set to no-wrap means the element’s content will not be wrapped to a new line.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS overflow wrap
&lt;/h2&gt;

&lt;p&gt;With the use of the overflow-wrap property in CSS, we can tell the browser to break lines of long words in case the content overflows from the element’s box. This helps prevent layout issues caused by overflow from an unusually long string of text.&lt;/p&gt;

&lt;p&gt;This property has three values which are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;normal&lt;/strong&gt;: this is the default value where the browser will break lines according to its line-breaking rules. Long strings will not break even if they overflow the element’s box.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;break-word&lt;/strong&gt;: with this value, words or strings of characters too long to fit inside their container will split at random points, causing a line break.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;inherit&lt;/strong&gt;: this will inherit the value of the overflow-wrap attribute, which was set on the targeted element’s immediate parent.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is an example of overflow-wrap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;overflow-wrap&amp;lt;/h1&amp;gt;
&amp;lt;p class="box"&amp;gt;This element contains a very long word: thisisaveryveryveryveryveryverylongword. By default, the long word will not break and wrap to the next line. With break-word, the long word will break.&amp;lt;/p&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
font: 15px Georgia, serif;
}
h1{
font: 28px Georgia, Serif;
text-align: center;
}
.box{
width: 200px;
height: 180px;
padding: 8px;
border: 1px solid #000;
line-height:21px;
margin: 0 auto;
background-color:yellow;
overflow-wrap: break-word;/*try removing the overflow-wrap to see the difference*/
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/WNzQObB?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the above example, we can see that the box has the overflow-property set to &lt;strong&gt;break-word&lt;/strong&gt;, which breaks the long string of characters and wraps them to the next line, ensuring that our content does not overflow from the container. However, if we do not specify the property, the long words will not break, and it will overflow the container.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS Overflow browser compatibility
&lt;/h2&gt;

&lt;p&gt;Now, let’s talk about &lt;a href="https://www.lambdatest.com/learning-hub/cross-browser-compatibility?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;cross browser compatibility.&lt;/a&gt; To be cross-browser compatible, an app must function across different browsers and degrade gracefully when certain browser features are unavailable or disabled.&lt;/p&gt;

&lt;p&gt;As web developers, we need to keep browser compatibility in mind because our end users can access our website from browsers of their choice. So, every website needs to function flawlessly across various OS platforms and browsers.&lt;/p&gt;

&lt;p&gt;However, while using CSS properties, you could get into a situation where the majority of browsers do not support a particular CSS feature.&lt;/p&gt;

&lt;p&gt;So you must perform &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;cross browser testing&lt;/a&gt; to ensure it works flawlessly across various browsers, devices, and operating systems.&lt;/p&gt;

&lt;p&gt;For doing that, you can use a cloud-based testing platform like LambdaTest that offers an &lt;a href="https://www.lambdatest.com/online-browser-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online browser farm&lt;/a&gt; of 3000+ real browsers and operating systems combinations to test your websites (and web apps). It lets you perform tests at scale for detecting &lt;a href="https://www.lambdatest.com/blog/finding-cross-browser-compatibility-issues-in-html-and-css/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;cross browser compatibility issues in HTML/CSS&lt;/a&gt; and fixing them so that your website (or web app) works seamlessly across different browsers &amp;amp; OS combinations.&lt;/p&gt;

&lt;p&gt;An example of testing browser support for CSS overflow is shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AXXG09pv2fC1j5wci.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AXXG09pv2fC1j5wci.png" width="743" height="1482"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CSS overflow property reports a browser compatibility score of 100. This collective score from 100 represents browser support of the CSS overflow property. The higher this score, the greater the browser support for this property.&lt;/p&gt;

&lt;h2&gt;
  
  
  Responsiveness test of a website
&lt;/h2&gt;

&lt;p&gt;A website must be designed to be responsive for a strong online presence. Since &lt;a href="https://www.lambdatest.com/blog/best-practices-for-responsive-websites/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;responsive websites&lt;/a&gt; tend to boost user satisfaction, Google prefers them for SEO. Therefore, &lt;a href="https://www.lambdatest.com/learning-hub/responsive-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;responsiveness testing&lt;/a&gt;of the website components is crucial.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ExPeFxpsdpY"&gt;
&lt;/iframe&gt;
&lt;br&gt;
However, performing tests to check responsiveness can be time-consuming. Moreover, it’s impossible to own devices of all sizes.&lt;/p&gt;

&lt;p&gt;There are multiple &lt;a href="https://www.lambdatest.com/blog/top-web-development-tools-for-2021/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;web development tools &lt;/a&gt;that make up a Front-End Developer’s essential toolchain. The usability of these tools allows flexibility while increasing the difficulty in the overall structure. However, there is a need for a tool like &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LT Browser&lt;/a&gt; to help a web developer analyze mistakes and view multiple devices from a real-time view.&lt;/p&gt;

&lt;p&gt;LambdaTest’s &lt;a href="https://www.lambdatest.com/mobile-friendly-test?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;mobile-friendly test&lt;/a&gt; tool, LT Browser, comes with 50+ pre-installed viewports with multiple standard resolutions. Additionally, LT Browser offers sophisticated developer tools for testing.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/K1dlmU3QWWk"&gt;
&lt;/iframe&gt;
&lt;br&gt;
You can also Subscribe to the &lt;a href="https://www.youtube.com/channel/UCCymWVaTozpEng_ep0mdUyw?sub_confirmation=1?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=youtube" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel&lt;/a&gt; and stay updated with the latest tutorials around &lt;a href="https://www.lambdatest.com/automated-browser-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;automated browser testing,&lt;/a&gt; &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium testing&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/cypress-e2e-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Cypress E2E testing&lt;/a&gt;, CI/CD, and more.&lt;/p&gt;

&lt;p&gt;Below are some of the top-notch features of LT Browser that any developer would love to have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Device sync feature to scroll on two devices simultaneously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.lambdatest.com/blog/test-mobile-websites-on-different-network-conditions/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Network throttling&lt;/a&gt; feature to test websites on different network conditions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.lambdatest.com/full-page-screen-capture?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Capture full-page screenshots&lt;/a&gt; of the web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generates &lt;a href="https://www.lambdatest.com/blog/google-lighthouse-lt-browser/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;performance reports powered by Google Lighthouse.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Video recording of a running test session, and much more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Need more reasons to love LT Browser? Here are more reasons &lt;a href="https://www.lambdatest.com/blog/11-reasons-to-use-lt-browser/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;why developers should use LT Browser&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;A comprehensive &lt;a href="https://www.lambdatest.com/learning-hub/end-to-end-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar20_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;end-to-end Testing&lt;/a&gt; tutorial that covers what E2E Testing is, its importance, benefits, and how to perform it with real-time examples.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Congratulations on reaching this far! You’re a fantastic reader!!&lt;/p&gt;

&lt;p&gt;So in this blog, we discussed CSS overflow in detail, including how we can use the CSS overflow, different values of CSS overflow, browser compatibility, its importance, and finally, responsive testing of our websites using tools like LT Browser.&lt;/p&gt;

&lt;p&gt;I hope this blog has given you a thorough understanding of CSS overflow. It’s time to apply CSS overflow to your website like a pro! Again, feel free to refer back to this anytime; it is solely for your use.&lt;/p&gt;

&lt;p&gt;Happy styling!&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. What is an overflow in CSS?
&lt;/h3&gt;

&lt;p&gt;Overflow is a property of the CSS box model used to control content wrapping in various parts of a web document, such as inside elements with a specified height but is too small to contain all their content.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. How do I fix overflowing in CSS?
&lt;/h3&gt;

&lt;p&gt;The text-overflow property does not permit the content of the flex element to shrink below its minimum content size. To fix this, you must set the overflow value to something other than visible. One solution is to override the default CSS with your own styles.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Why we use overflow hidden in CSS?
&lt;/h3&gt;

&lt;p&gt;Margin automatically centers an element, and overflow: hidden prevents scrollbars from showing up.&lt;/p&gt;

</description>
      <category>css</category>
      <category>beginners</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Guide To Newly Supported CSS Pseudo-Class Selectors</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Fri, 10 Mar 2023 13:51:18 +0000</pubDate>
      <link>https://forem.com/testmuai/a-guide-to-newly-supported-css-pseudo-class-selectors-3h75</link>
      <guid>https://forem.com/testmuai/a-guide-to-newly-supported-css-pseudo-class-selectors-3h75</guid>
      <description>&lt;p&gt;Have you ever wondered how websites add that extra layer of style to certain buttons when they’re hovered over, or change the color of visited links? The secret lies in the power of CSS pseudo-class selectors!&lt;/p&gt;

&lt;p&gt;But, before you dismiss this as just another mundane guide on &lt;a href="https://www.lambdatest.com/blog/how-pro-testers-use-css-selectors-in-selenium-automation-scripts/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Selectors&lt;/a&gt;, let me tell you: we are not doing that here.&lt;/p&gt;

&lt;p&gt;Pseudo-classes like hover have been around for a long time. I promise not to bore you by discussing them for the 1000th time. We will instead discuss the powerful modern pseudo-class selectors that you may not be familiar with yet.&lt;/p&gt;

&lt;p&gt;Before we deep dive into CSS pseudo-class selectors, if you are unfamiliar with the hover pseudo-class or even what a pseudo-class is, let’s do a quick recap.&lt;/p&gt;

&lt;p&gt;Pseudo-class selectors in CSS are selectors that define a special state of an element. They start with the colon character(:) and allow you to apply styles based on the interaction or behavior of the element. For example, you can use CSS pseudo-class selectors to style an element when users hover their mouse over it.&lt;/p&gt;

&lt;p&gt;Here’s an example of the &lt;strong&gt;:hover&lt;/strong&gt; pseudo-class:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;button:hover{
 background-color: blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Wondering what’s different about the modern CSS pseudo-class selectors? They play a crucial role in user experience and accessibility. Their ability to target specific elements based on their state allows us to create interactive user interfaces that are inclusive and accessible to all users, including those with impairments.&lt;/p&gt;

&lt;p&gt;While they offer immense power, they also come with their drawbacks. It’s critical to consider &lt;a href="https://www.lambdatest.com/learning-hub/cross-browser-compatibility?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;cross browser compatibility &lt;/a&gt;while using them. For example, some selectors may not be fully supported by specific browsers, so it’s crucial to have fallback options in place to ensure that all users have a consistent experience, regardless of their device or browser.&lt;/p&gt;

&lt;p&gt;In this guide, I’ll dive into the modern CSS pseudo-class selectors, providing the knowledge you need to use them in your next project and make your website stand out. In addition, it will give you the knowledge you need to take your CSS skills to the next level.&lt;/p&gt;

&lt;p&gt;So, let’s get started!&lt;/p&gt;

&lt;h2&gt;
  
  
  What are Modern CSS pseudo-class selectors?
&lt;/h2&gt;

&lt;p&gt;Modern pseudo-class selectors are a set of new selectors that have been added to the CSS specification in recent years. They offer a range of new and advanced features compared to the older pseudo-class selectors.&lt;/p&gt;

&lt;p&gt;Some features include targeting elements based on their relationship to others or selecting elements based on more complex conditions.&lt;/p&gt;

&lt;p&gt;These modern CSS pseudo-class selectors bring a level of advanced styling to the table that was not possible earlier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;A complete tutorial on retesting that sheds light on its features, importance, pros and cons, and how to perform it:&lt;a href="https://www.lambdatest.com/learning-hub/retesting?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;https://www.lambdatest.com/learning-hub/retesting&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Deep dive into CSS pseudo-class selectors
&lt;/h2&gt;

&lt;p&gt;In this guide section, we will explore the different CSS pseudo-class selectors. Let’s look at them one by one.&lt;/p&gt;

&lt;h2&gt;
  
  
  :any-link pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:any-link&lt;/strong&gt; pseudo-class is a way to simultaneously select both link and &lt;strong&gt;:visited *&lt;em&gt;states of an element. Typically, the *&lt;/em&gt;:link&lt;/strong&gt; is used to style unvisited links, while &lt;strong&gt;:visited&lt;/strong&gt; is used to style links the user has visited.&lt;/p&gt;

&lt;p&gt;By using &lt;strong&gt;:any&lt;/strong&gt;-link instead of &lt;strong&gt;:link&lt;/strong&gt; and &lt;strong&gt;:visited&lt;/strong&gt;, you can apply the same styles to both links without repeating the styles. It will match an anchor hyperlink as long as it has the href attribute.&lt;/p&gt;

&lt;p&gt;It is handy when applying a particular style to all links regardless of their visited status.&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:any-link {
  color: #2a9d8f;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/PoBaZpK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the example, we selected all the links using the &lt;strong&gt;:any-link&lt;/strong&gt; pseudo-class and applied the blue color(#2a9d8f) to them.&lt;/p&gt;

&lt;p&gt;An important thing to note is that &lt;strong&gt;:any-link&lt;/strong&gt; selector has a higher specificity than the &lt;strong&gt;‘a’&lt;/strong&gt; selector. This means that if an anchor element style is defined using both &lt;strong&gt;:any-link&lt;/strong&gt; and &lt;strong&gt;‘a’&lt;/strong&gt;, the style for **:any-link **will be applied to the element.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:any-link {
  color: #2a9d8f;
}
a {
  color: red;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Here, the bluish color (#2a9d8f ) is being applied to our anchor tags instead of red because the &lt;strong&gt;:any-link&lt;/strong&gt; selector has higher specificity than the &lt;strong&gt;‘a’&lt;/strong&gt; selector.&lt;/p&gt;

&lt;p&gt;In addition, here’s an example showcasing the implementation of &lt;strong&gt;:any-link&lt;/strong&gt; selector using LambdaTest’s Real Time Testing feature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AyzS33PA8W-nPRiIn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AyzS33PA8W-nPRiIn.png" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LambdaTest is a continuous quality &lt;a href="https://www.lambdatest.com/blog/cloud-testing-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;cloud testing &lt;/a&gt;platform that allows you to test web and mobile applications for cross browser compatibility across on-demand real browsers, devices, and operating systems combinations. With its Real Time Testing, you can perform manual live-interactive testing across different desktop and mobile browsers with instant access to the latest and legacy web browsers, browser versions, and screen resolutions.&lt;/p&gt;

&lt;p&gt;Learn more about LambdaTest’s Real Time Testing from the below tutorial.&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/hJ-eP8TcGuY"&gt;
&lt;/iframe&gt;
&lt;br&gt;
You can also Subscribe to the &lt;a href="https://www.youtube.com/channel/UCCymWVaTozpEng_ep0mdUyw?sub_confirmation=1?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=youtube" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel&lt;/a&gt; and stay updated with the latest tutorials around &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/appium-mobile-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Appium&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/playwright?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt;, and more.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Discover the top 70+ essential Snowflake testing test cases to ensure your data’s integrity, accuracy, and consistency. Download our comprehensive template now: &lt;a href="https://www.lambdatest.com/learning-hub/snowflake-test-case-template?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;https://www.lambdatest.com/learning-hub/snowflake-test-case-template&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  :focus-visible pseudo-class
&lt;/h2&gt;

&lt;p&gt;Before we talk about &lt;strong&gt;:focus-visible&lt;/strong&gt;, I will discuss a common accessibility violation. I am sure you’re aware that it’s a common practice among developers to remove the outlines of interactive elements such as form inputs, buttons, and links during their focus state.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input:focus {
  outline: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Now, the issue is that the visible focus state is critically important for users who use the keyboard to navigate.&lt;/p&gt;

&lt;p&gt;When a user navigates an interface using the keyboard (e.g., by pressing the tab key), a visible focus state can act as a way-finding tool, helping the user understand which element currently has keyboard focus. This can be especially important for users with difficulty using a mouse or other pointing device and those with cognitive or visual impairments. To know the importance of web accessibility, read our tutorial on &lt;a href="https://www.lambdatest.com/learning-hub/accessibility-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;accessibility testing&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;When we set outline none, it significantly degrades the interface’s usability, which we don’t want. That’s where &lt;strong&gt;:focus-visible&lt;/strong&gt; comes in.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;:focus-visible&lt;/strong&gt; pseudo-class is used to ensure that the focus ring (outline) is only visible when it is needed. It was designed to distinguish between “implicit,” and “explicit” focus, where mouse clicks are considered “implicit” focus, and keyboard navigation is considered “explicit” focus. It uses heuristics, a set of rules and procedures the browser uses to determine when to show the focus ring.&lt;/p&gt;

&lt;p&gt;For example, when you tab into an interactive element using a keyboard, the browser will apply the &lt;strong&gt;:focus-visible&lt;/strong&gt; styles. But, if you click the element with a mouse, the browser will not apply the &lt;strong&gt;:focus-visible&lt;/strong&gt; styles.&lt;/p&gt;

&lt;p&gt;However, there are some exceptions, like text inputs and text areas, which should show the &lt;strong&gt;:focus-visible&lt;/strong&gt; styles for all focus input types. This makes the focus ring consistent with the user’s expectation and helps reduce the visual noise and improve accessibility.&lt;/p&gt;

&lt;p&gt;Enough explanation, right? Let’s look at an example to understand this better.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="links"&amp;gt;
      &amp;lt;a href="#"&amp;gt;LambdaTest&amp;lt;/a&amp;gt;
      &amp;lt;a href="#"&amp;gt;Features&amp;lt;/a&amp;gt;
      &amp;lt;a href="#"&amp;gt;Blogs&amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a:focus-visible {
  background-color:#ddd;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/poZZZGw?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we have three links, and we asked the browser to apply a background color (in this case #ddd) when any of the links are in focus. Notice if you click them using a mouse pointer, the style doesn’t get applied because the element does not receive the focus-visible status since it’s an implicit click.&lt;/p&gt;

&lt;p&gt;But, if you click them using the tab, the background color does get applied because the element receives the focus-visible status since the click is explicit.&lt;/p&gt;

&lt;p&gt;Let’s see how our example would function with LambdaTest’s Real Time Testing.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AkoGYSVRWbRPXvmw4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AkoGYSVRWbRPXvmw4.png" width="800" height="354"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  :focus-within pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:focus-within&lt;/strong&gt; pseudo-class in CSS allows you to apply styles to a parent element when one of its child elements is in focus. Imagine you have a form with multiple input fields, the &lt;strong&gt;:focus-within&lt;/strong&gt; pseudo-class allows you to highlight the entire form container (the parent element) when one of the input fields (child element) is selected and in focus.&lt;/p&gt;

&lt;p&gt;A practical application of the &lt;strong&gt;:focus-within&lt;/strong&gt; pseudo-class is to style a form label when its associated input field has focus. To achieve this, you can wrap the label and input in a container element, then apply the &lt;strong&gt;:focus-within&lt;/strong&gt; pseudo-class to that container. This allows you to select the label and apply styles when the associated input field is in focus.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="form-group"&amp;gt;
      &amp;lt;label for="name"&amp;gt;Name:&amp;lt;/label&amp;gt;
      &amp;lt;input type="text" id="name" /&amp;gt;
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.form-group:focus-within label {
  color: #2196f3;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, we have a form with a single input field for the user’s name. The label and input are wrapped in a container element with a class of &lt;strong&gt;.form-group&lt;/strong&gt;. We then use &lt;strong&gt;:focus-within&lt;/strong&gt; on the &lt;strong&gt;.form-group&lt;/strong&gt; container to tell the browser that when the input of that container is in focus, change the color of the label to blue.&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/jOppQar?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  :is() pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:is()&lt;/strong&gt; CSS pseudo-class function (formerly called &lt;strong&gt;:matches() :any()&lt;/strong&gt;) takes a list of selectors as its argument and selects any element that can be selected by one of the selectors in that list. This allows for more concise writing when selecting multiple elements and helps make your code more readable.&lt;/p&gt;

&lt;p&gt;For example, instead of targeting each heading element individually, you can target a group of headings using &lt;strong&gt;:is(h1, h2, h3)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;:is()&lt;/strong&gt; selector list has unique features that set it apart from other selectors.&lt;br&gt;
One of its coolest features is that even if one selector in the list is invalid, the rule will still apply to the valid selectors. This means you can group multiple selectors without worrying about the whole rule breaking just because of one small mistake.&lt;/p&gt;

&lt;p&gt;Another important thing to note is that the rule’s specificity will match that of the selector with the highest specificity in the list. For example, a rule using &lt;strong&gt;:is(#id, p)&lt;/strong&gt; will have the same specificity as the #id selector, while a rule using &lt;strong&gt;:is(p, a)&lt;/strong&gt; will have the same specificity as the selector.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;LambdaTest&amp;lt;/h1&amp;gt;
 &amp;lt;h2&amp;gt;Cross-browser testing platform&amp;lt;/h2&amp;gt;
 &amp;lt;h3&amp;gt;Automated testing solution&amp;lt;/h3&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/* Apply styles to h1, h2, and h3 elements */
:is(h1, h2, h3) {
  font-weight: bold;
  color: purple;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/VwBBNyL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, the &lt;strong&gt;:is(h1, h2, h3)&lt;/strong&gt; selector matches all h1, h2, and h3 elements and applies the styles of &lt;strong&gt;font-weight: bold&lt;/strong&gt; and &lt;strong&gt;color: purple&lt;/strong&gt; to them.&lt;/p&gt;
&lt;h2&gt;
  
  
  :where() pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:where()&lt;/strong&gt; pseudo-class function takes a list of selectors as an argument and selects elements that can be selected by any of the selectors in that list.&lt;/p&gt;

&lt;p&gt;It is almost similar to &lt;strong&gt;:is()&lt;/strong&gt; except for one difference. The difference between :where() and &lt;strong&gt;:is()&lt;/strong&gt; lies in their specificity. &lt;strong&gt;:where()&lt;/strong&gt; always has a specificity of 0, whereas &lt;strong&gt;:is()&lt;/strong&gt; gets the specificity of the most specific selector in its argument list.&lt;/p&gt;

&lt;p&gt;Let’s look at an example to see how &lt;strong&gt;:where()&lt;/strong&gt; works.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;img   src="https://images.unsplash.com/photo-1674530493752-719b5514a7f2?ixlib=rb-4.0.3&amp;amp;ixid=MnwxMjA3fDB8MHx0b3BpYy1mZWVkfDQ2fGJvOGpRS1RhRTBZfHxlbnwwfHx8fA%3D%3D&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=600&amp;amp;q=60
"alt=""/&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:where(img) {
  border: 10px solid blue;
}
img {
  border: 10px solid orange;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/gOjdyGa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we select the image using &lt;strong&gt;:where()&lt;/strong&gt; pseudo-class and add a blue border to it. Then, we again select the image using the img selector and set an orange border. Since &lt;strong&gt;:where()&lt;/strong&gt; has 0 specificity, the second style wins, resulting in the orange border of the image.&lt;/p&gt;

&lt;p&gt;The following is an example of implementing &lt;strong&gt;:where()&lt;/strong&gt; using LambdaTest’s Real Time Testing feature.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AizNKR4yKP4MpVAyV.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AizNKR4yKP4MpVAyV.png" width="800" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Get a head start on your CI/CD pipeline with our pre-built test case template. Explore this comprehensive list of test cases and scenarios:&lt;a href="https://www.lambdatest.com/learning-hub/cicd-test-case-template?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;https://www.lambdatest.com/learning-hub/cicd-test-case-template&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  :not() pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:not()&lt;/strong&gt; CSS pseudo-class selector matches elements that do not match a given selector. It means you can exclude specific elements from a selection of elements. The syntax is &lt;strong&gt;:not(selector)&lt;/strong&gt;, where the (selector) is the selector to be excluded.&lt;/p&gt;

&lt;p&gt;For instance, &lt;strong&gt;p:not(.main)&lt;/strong&gt; matches all &amp;lt; p &amp;gt; elements that don’t have the class &lt;strong&gt;main&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;h1&amp;gt;LambdaTest&amp;lt;/h1&amp;gt;
        &amp;lt;p&amp;gt;
          The ultimate cloud-based cross-browser testing platform. Test on over
          3000 browsers, devices, and OS.
        &amp;lt;/p&amp;gt;
        &amp;lt;p&amp;gt;Accelerate your GTM with powerful cloud testing.&amp;lt;/p&amp;gt;
        &amp;lt;p class="main"&amp;gt;
          Integrate &amp;lt;a href="https://www.lambdatest.com/"&amp;gt;LambdaTest&amp;lt;/a&amp;gt; with
          your favorite tools for seamless testing.
        &amp;lt;/p&amp;gt;
      &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;p {
  font-weight: bold;
  color: blue;
}
/* Select all elements except the ones with .main class */
p:not(.main) {
  font-weight: normal;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/LYBJoNV?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we have three paragraph tags: first, we apply blue color and bold font-weight to all paragraphs with the p selector. Then, we use the &lt;strong&gt;:not()&lt;/strong&gt; pseudo-class to exclude the last p element that has the &lt;strong&gt;.main&lt;/strong&gt; class from receiving normal font-weight and keep its bold font-weight as set by the p selector.&lt;/p&gt;
&lt;h2&gt;
  
  
  :has() pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:has()&lt;/strong&gt; pseudo-class is unique and something we never had in CSS. It’s like a detective on a mission to find specific elements based on the clues of their descendants.&lt;/p&gt;

&lt;p&gt;Imagine you have an HTML document with a list of items, and you want to give a unique style to those items that have an extra emphasis, represented by a span element. How can you achieve that? Yes, the answer is &lt;strong&gt;:has()&lt;/strong&gt; pseudo-class.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;:has()&lt;/strong&gt; pseudo-class allows you to select elements based on whether they have a certain descendant element. Isn’t it fascinating? Let’s take a closer look with an example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ul&amp;gt;
   &amp;lt;li&amp;gt;Item 1&amp;lt;/li&amp;gt;
   &amp;lt;li&amp;gt;Item 2 &amp;lt;span&amp;gt;with emphasis&amp;lt;/span&amp;gt;&amp;lt;/li&amp;gt;
   &amp;lt;li&amp;gt;Item 3&amp;lt;/li&amp;gt;
 &amp;lt;/ul&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;li:has(span) {
  font-weight: bold;
  background-color: yellow;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/qByMzrP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, the &lt;strong&gt;:has()&lt;/strong&gt; pseudo-class selects the li elements that have a span descendant. When it finds a match, it applies the styles of font-weight and background-color, making the text bold and the background yellow.&lt;/p&gt;

&lt;p&gt;Note that this example may not work for you on a Firefox browser. However, we have an interesting workaround just for you in the browser compatibility section.&lt;/p&gt;
&lt;h2&gt;
  
  
  :empty pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:empty&lt;/strong&gt; pseudo-class in CSS selects elements that have no children, including text nodes. This means that an element that has only white space will also be selected by the &lt;strong&gt;:empty&lt;/strong&gt; pseudo-class.&lt;/p&gt;

&lt;p&gt;This comes in handy in certain scenarios. For example, you have a div in which you dynamically add content using JavaScript. When content gets appended, you want the div to have some padding and background, but if there’s no content, you don’t want it to take any space on the page. You can very simply hide that div using the &lt;strong&gt;:empty&lt;/strong&gt; pseudo-class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div&amp;gt;Since the below div element is empty, :empty() pseudo-class selects and hides it.&amp;lt;/div&amp;gt;
&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div {
  background-color: orange;
  padding: 10px;
  text-align: center;
}
/* Select the empty div element */
div:empty {
  display: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/BaPOgXy?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  :placeholder-shown pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:placeholder-shown&lt;/strong&gt; pseudo-class in CSS is used to select and style an &amp;lt; input &amp;gt; or &amp;lt; textarea &amp;gt; element that is currently displaying placeholder text.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;:placeholder-shown&lt;/strong&gt; pseudo-class provides a convenient way to style the placeholder text in a specific way, separate from the other styles of the input element. This allows us to create more intuitive and user-friendly forms by improving the visual cues for placeholder text.&lt;/p&gt;

&lt;p&gt;Let’s look at an example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
      &amp;lt;label for="name"&amp;gt;Name:&amp;lt;/label&amp;gt;
      &amp;lt;input name="name" type="text"placeholder="Your name"&amp;gt;

      &amp;lt;label for="email"&amp;gt;Email Address:&amp;lt;/label&amp;gt;
      &amp;lt;input name="email" type="email" placeholder="john@example.com"&amp;gt;

   &amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input:placeholder-shown {
  background-color: #ddd;
  border: 2px solid orange;
  border-radius: 4px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/LYBXagL?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we have a form with three input fields for name, email, and age. Each input has a placeholder text. We used &lt;strong&gt;input:placeholder-shown&lt;/strong&gt; CSS pseudo-class to style the input fields that are currently displaying placeholder text. When a user begins to type into an input field, the placeholder text will be replaced by the user’s input, and the styles will no longer apply.&lt;/p&gt;

&lt;h2&gt;
  
  
  :read-only pseudo-class
&lt;/h2&gt;

&lt;p&gt;As the name suggests, the &lt;strong&gt;:read-only&lt;/strong&gt; CSS pseudo-class represents an element that is not editable by the user, meaning its value cannot be changed. This selector can be used to apply styles to elements that have the readonly attribute or have been dynamically set to be read-only through JavaScript.&lt;/p&gt;

&lt;p&gt;Following is an example of the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
      &amp;lt;label for="name"&amp;gt;Name:&amp;lt;/label&amp;gt;
      &amp;lt;input name="name" type="text"placeholder="Your name"readonly&amp;gt;

      &amp;lt;label for="email"&amp;gt;Email Address:&amp;lt;/label&amp;gt;
      &amp;lt;input name="email" type="email" placeholder="john@example.com"&amp;gt;

   &amp;lt;/form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input:read-only {
  background-color: #ddd;
  border: 1px solid gray;
  pointer-events: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/vYaQMWb?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the example, the first input that has the &lt;strong&gt;readonly&lt;/strong&gt; attribute is selected by the &lt;strong&gt;:read-only&lt;/strong&gt; pseudo-class selector and the specified styles only gets applied to that element.&lt;/p&gt;

&lt;p&gt;The :read-only CSS pseudo-class removes all the styling that makes the inputs look like clickable fields, making them look like read-only paragraphs.&lt;/p&gt;

&lt;h2&gt;
  
  
  read-write pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:read-write&lt;/strong&gt; pseudo-class matches elements that are either editable or have the &lt;strong&gt;contenteditable&lt;/strong&gt; attribute set to &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Some HTML elements, such as input and textarea, are editable by default, but others, such as div and p, are not. The &lt;strong&gt;contenteditable&lt;/strong&gt; attribute can be added to any element to make it editable. The &lt;strong&gt;:read-write&lt;/strong&gt; pseudo-class allows us to specify styles specifically for editable elements, whether they are editable by default or made editable with the &lt;strong&gt;contenteditable&lt;/strong&gt; attribute.&lt;/p&gt;

&lt;p&gt;Below is an example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div contenteditable="true"&amp;gt;This is an editable div.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div[contenteditable="true"]:read-write {
  background-color: lightgreen;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/gOjQyZO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, the &lt;strong&gt;:read-write&lt;/strong&gt; pseudo-class will match the div element with the &lt;strong&gt;contenteditable&lt;/strong&gt; attribute set to true, and the background-color gets applied. It also works for elements that are editable by default, such as inputs and textareas.&lt;/p&gt;

&lt;h2&gt;
  
  
  :indeterminate pseudo-class
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:indeterminate&lt;/strong&gt; pseudo-class targets specific form elements, such as checkboxes and radio buttons, as well as progress elements, that are in an intermediate or indeterminate state.&lt;/p&gt;

&lt;p&gt;For example, an &amp;lt; input type="checkbox" &amp;gt; can be set to an indeterminate state through JavaScript by setting its &lt;strong&gt;indeterminate&lt;/strong&gt; property to &lt;strong&gt;true&lt;/strong&gt;. Similarly, radio buttons can be considered indeterminate when all buttons with the same name value in the form are unchecked. And &amp;lt; progress &amp;gt; element can be set to an indeterminate state if it doesn’t have a defined value or progress status.&lt;/p&gt;

&lt;p&gt;Below is an example for each of them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;:indeterminate CSS pseudo-class with a checkbox&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;input type="checkbox" id="checkbox" /&amp;gt;
 &amp;lt;label for="checkbox"&amp;gt;Check me&amp;lt;/label&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input[type="checkbox"]:indeterminate + label {
  color: red;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/ZEjmdXz?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, we created a checkbox input with an id of checkbox and a label that says “&lt;strong&gt;Check me&lt;/strong&gt;.” The JavaScript code sets the indeterminate property of the checkbox to true, which makes the checkbox appear in an indeterminate state. In CSS, we used the &lt;strong&gt;:indeterminate&lt;/strong&gt; pseudo-class to select the checkbox and its adjacent label and set the color of the label to red.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;:indeterminate CSS pseudo-class with a radio button&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;form&amp;gt;
      &amp;lt;input type="radio" name="LambdaTestFeatures" id="LambdaTestFeatures" /&amp;gt;
      &amp;lt;label for="webTesting"&amp;gt;Web testing&amp;lt;/label&amp;gt;
      &amp;lt;input type="radio" name="webTesting" id="webTesting" /&amp;gt;
      &amp;lt;label for="cypressTesting"&amp;gt;Cypress testing&amp;lt;/label&amp;gt;
      &amp;lt;input type="radio" name="seleniumTesting" id="seleniumTesting" /&amp;gt;
      &amp;lt;label for="selen
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;input[type="radio"]:indeterminate + label {
  color: red;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/VwBVJEr?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, all the radio buttons are in an indeterminate state because none of them have been selected yet. We use the &lt;strong&gt;:indeterminate&lt;/strong&gt; pseudo-class to target the label for each radio button and change its color to red. When a radio button is selected, it no longer matches the &lt;strong&gt;:indeterminate&lt;/strong&gt; selector, and the label returns to its default color.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;:indeterminate CSS pseudo-class with a progress element&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;progress&amp;gt;&amp;lt;/progress&amp;gt;
1
 &amp;lt;progress&amp;gt;&amp;lt;/progress&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;progress:indeterminate {
  width: 50vw;
  height: 30px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/KKBrjjK?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In this example, the &lt;strong&gt;:indeterminate&lt;/strong&gt; CSS pseudo-class selects the progress element and applies specified styles to it because it has no value and is in an indeterminate state.&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser compatibility of CSS pseudo-class selectors
&lt;/h2&gt;

&lt;p&gt;Let’s talk about one of the most important aspects of &lt;a href="https://www.lambdatest.com/blog/20-elements-of-modern-web-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;modern web design,&lt;/a&gt; i.e., browser compatibility. All your fancy and shiny CSS features are useless if the user’s browser doesn’t support them. That’s why you need to keep browser compatibility in mind.&lt;/p&gt;

&lt;p&gt;In this section, we will look at the browser support of all the CSS pseudo-class selectors discussed.&lt;/p&gt;

&lt;p&gt;Additionally, to run &lt;a href="https://www.lambdatest.com/feature?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;browser compatibility tests&lt;/a&gt; of the CSS features, you can use a cloud-based &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;cross browser testing&lt;/a&gt; platform like LambdaTest that offers an online browser farm of numerous real browsers and operating systems combinations to test your websites (and web apps). It lets you perform tests at scale to detect &lt;a href="https://www.lambdatest.com/blog/finding-cross-browser-compatibility-issues-in-html-and-css/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;cross browser compatibility issues in HTML/CSS&lt;/a&gt; and fix them so that your website or web app works seamlessly across different browsers &amp;amp; OS combinations.&lt;/p&gt;

&lt;h2&gt;
  
  
  :any-link()
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:any-link()&lt;/strong&gt; CSS pseudo-class selector has varying levels of support across different browser versions. In Chrome, it is supported with the prefix &lt;strong&gt;-webkit&lt;/strong&gt;– from version 15 to 64 and is fully supported without the prefix from version 50.&lt;/p&gt;

&lt;p&gt;Similarly, in Safari, support is available from version 6.1 to 8 with the prefix -webkit-and is fully supported in later versions.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:-webkit-any-link {
  color: blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In Firefox, it is supported from version 3 to 49 using the prefix &lt;strong&gt;-moz-&lt;/strong&gt; and fully supported from version 50.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;:-moz-any-link {
  color: blue;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Browser Compatibility:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2046%2F0%2AsYrYLud8gVxYjkwr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2046%2F0%2AsYrYLud8gVxYjkwr.png" width="800" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Discover the top 50+ essential Flutter testing test cases to ensure your mobile applications are bug free prior to their release. Download our comprehensive template now: &lt;a href="https://www.lambdatest.com/learning-hub/flutter-testing-test-case-template?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;https://www.lambdatest.com/learning-hub/flutter-testing-test-case-template&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :focus-visible
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:focus-visible&lt;/strong&gt; CSS pseudo-class is supported in Chrome from version 86. In Firefox, it is supported from version 4 to 84 using the prefix &lt;strong&gt;-moz-&lt;/strong&gt; and fully supported from version 85.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2054%2F0%2A2kHyChcEWA_Xt4ie.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2054%2F0%2A2kHyChcEWA_Xt4ie.png" width="800" height="284"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :focus-within
&lt;/h2&gt;

&lt;p&gt;Here’s an image illustrating the support for the &lt;strong&gt;focus-within&lt;/strong&gt; pseudo-class across different browser versions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2060%2F0%2AZw1SVzw8CLm-H0jS.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2060%2F0%2AZw1SVzw8CLm-H0jS.png" width="800" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :is()
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:is()&lt;/strong&gt; CSS pseudo-class is supported in Chrome from version 88, and Firefox supports it from version 78.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2054%2F0%2Ay3aRwI8JXN7BpTeZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2054%2F0%2Ay3aRwI8JXN7BpTeZ.png" width="800" height="351"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :where()
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:where()&lt;/strong&gt; pseudo-class is supported in Chrome from version 88 and in Firefox from version 78.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2056%2F0%2Ar5T_WWPi_DIAsq8J.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2056%2F0%2Ar5T_WWPi_DIAsq8J.png" width="800" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :not()
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:not()&lt;/strong&gt; CSS pseudo-class is supported in Chrome from version 88. Firefox has support for it from version 84 and Opera from version 75.&lt;/p&gt;

&lt;p&gt;Here’s an image that showcases the browser support for this property.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2050%2F0%2AtcNKSUckmm6DYhiR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2050%2F0%2AtcNKSUckmm6DYhiR.png" width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :has()
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:has()&lt;/strong&gt; CSS pseudo-class selector is supported in some modern browsers, with Chrome offering support from version 105 and Safari from version 15.4.&lt;/p&gt;

&lt;p&gt;Note that earlier versions of Firefox (2–102) do not support the :has CSS pseudo-class. However, you can enable this powerful feature as an experimental option in version 103 and later by simply flipping the &lt;strong&gt;layout.css.has-selector.enabled&lt;/strong&gt; flag to &lt;strong&gt;true&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here is an excellent demo inspired from this CodePen example to demonstrate the implementation of &lt;strong&gt;:has&lt;/strong&gt; pseudo-class in Firefox 103 and later:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;figure:has(figcaption) img {
  outline: 10px dashed red;As we know, the :has pseudo-class isn’t supported in Firefox by default. So, you need to enable it to see the demo in action. 


}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/alam_tahera/embed/gOjqpoa?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
In the given example, the &lt;strong&gt;:has()&lt;/strong&gt; CSS pseudo-class targets any figure element that has a figcaption within it. In the HTML document, we have a figure element with a figcaption, so the browser correctly identifies the matching figure element and applies the red border.&lt;/p&gt;

&lt;p&gt;To enable it, search for &lt;strong&gt;about:config&lt;/strong&gt; in your Firefox address bar and hit Enter.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2172%2F0%2AEhlYi-nWF5X5-Msr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2172%2F0%2AEhlYi-nWF5X5-Msr.png" width="800" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Finally, search for &lt;strong&gt;layout.css.has-selector.enabled&lt;/strong&gt; and turn it to true.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2732%2F0%2ApDhFLTjrS_8oIi8Y.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2732%2F0%2ApDhFLTjrS_8oIi8Y.jpg" width="800" height="141"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! You just enabled the powerful &lt;strong&gt;:has&lt;/strong&gt; selector support in your Firefox browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2052%2F0%2ALhi6zA3wCUwv4KTU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2052%2F0%2ALhi6zA3wCUwv4KTU.png" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :empty()
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:empty()&lt;/strong&gt; CSS pseudo-class selector is widely supported in modern browsers, with Chrome offering support from version 4, Safari from version 3.1, and Firefox from version 2.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2052%2F0%2AmESyo5Izhdgqf05Q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2052%2F0%2AmESyo5Izhdgqf05Q.png" width="800" height="206"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Learn 43 excellent test cases for salesforce testing by reading this guide. Every significant test case will be covered in detail in this guide, along with how to set up your Salesforce testing: &lt;a href="https://www.lambdatest.com/learning-hub/salesforce-test-cases?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;https://www.lambdatest.com/learning-hub/salesforce-test-cases&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :placeholder-shown
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:placeholder-shown&lt;/strong&gt; CSS pseudo-class is supported in Chrome from version 47. In Firefox, it is partially supported from version 4 to 50 using the prefix &lt;strong&gt;-moz-placeholder&lt;/strong&gt; (instead of placeholder-shown) and fully supported from version 51.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2052%2F0%2A3uV1w_mMPB3fkdE5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2052%2F0%2A3uV1w_mMPB3fkdE5.png" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :read-only and read-write
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;read-only&lt;/strong&gt; and &lt;strong&gt;read-write&lt;/strong&gt; pseudo-classes are partially supported in Chrome from version 15 to 35, with support limited only to inputs and textarea fields and not elements with **contenteditable **attribute. But from version 36, these selectors are fully supported. Similarly, Safari has support from versions 4 to 8 only for inputs and textarea fields and supports fully from version 9.&lt;/p&gt;

&lt;p&gt;Firefox supports them from version 3 to 77 using the prefix &lt;strong&gt;-moz&lt;/strong&gt; and fully supports from version 78.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2058%2F0%2AFahla55gxlP-51cT.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2058%2F0%2AFahla55gxlP-51cT.png" width="800" height="248"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  :indeterminate
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;:indeterminate&lt;/strong&gt; CSS pseudo-class has partial support in Chrome from version 15–38 with limitations in selecting radio buttons. It won’t select radio buttons if the group of radio buttons doesn’t have a checked option.&lt;/p&gt;

&lt;p&gt;Similarly, Firefox version 4–50 doesn’t support radio buttons. Additionally, version 4–5 doesn’t support the &amp;lt; progress &amp;gt; element.&lt;/p&gt;

&lt;p&gt;Chrome has full support from version 39 and Firefox from version 51.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2044%2F0%2AdQAMQHVNUiC16Up5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2044%2F0%2AdQAMQHVNUiC16Up5.png" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Read this tutorial about ServiceNow Testing, to know what it is, it’s benefits, types and test cases: &lt;a href="https://www.lambdatest.com/learning-hub/servicenow-test-case-template?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar10_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;https://www.lambdatest.com/learning-hub/servicenow-test-case-template&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;As a web designer or developer, you understand the value of constantly learning and exploring new techniques. The introduction of newly supported CSS pseudo-class selectors opens up a world of possibilities to create stunning, interactive, and engaging web experiences. In this guide, we’ve taken a closer look at selectors such as &lt;strong&gt;:has(),:any-link()&lt;/strong&gt;, and &lt;strong&gt;:focus-visible&lt;/strong&gt;, etc., which are at the forefront of modern CSS design.&lt;/p&gt;

&lt;p&gt;It’s important to stay updated about the latest browser support for these selectors and to experiment with different ways to incorporate them into your work. Whether you’re building a simple website or a complex web application, these selectors can add an extra layer of style and interactivity to your web projects.&lt;/p&gt;

&lt;p&gt;I hope this guide has been helpful to you and has inspired you to use CSS pseudo-class selectors in your designs. So, go ahead, dive in, and let your creativity run wild!&lt;/p&gt;

&lt;p&gt;Until then, Happy Styling!&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions (FAQs)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. How do you create pseudo-classes in CSS?
&lt;/h3&gt;

&lt;p&gt;A CSS pseudo-class specifies a special state of the selected element(s). In CSS, pseudo-classes are defined with a colon (:) and their names. For example :hover.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. What are pseudo-class and pseudo-element in CSS?
&lt;/h3&gt;

&lt;p&gt;The CSS pseudo-class defines a special state for an element. For example, it can be used when the user hovers over an element. Alternatively, CSS pseudo-elements are used to style specific parts of elements.&lt;/p&gt;

</description>
      <category>css</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Different Ways To Style CSS Box Shadow Effects</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Fri, 30 Dec 2022 09:54:27 +0000</pubDate>
      <link>https://forem.com/testmuai/different-ways-to-style-css-box-shadow-effects-312g</link>
      <guid>https://forem.com/testmuai/different-ways-to-style-css-box-shadow-effects-312g</guid>
      <description>&lt;p&gt;Have you ever visited a website with plain text and images? Most probably, no. It’s because such websites do not exist now. But there was a time when websites only had plain text and images with almost no styling. For the longest time, websites did not focus on user experience. For instance, this is how eBay’s homepage looked in 1999.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2400%2F0%2AgHC86nHf0PRJZjoE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2400%2F0%2AgHC86nHf0PRJZjoE.png" width="800" height="650"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Looking at the picture, we can say that the Internet has evolved, and so has the website needs. In modern-day websites, you need hues, animations, shadows, and other effects to take the user on an aesthetically pleasing journey. This keeps the visitors hooked to the website, which helps improve the website’s key KPIs (i.e., bounce rate, average session duration, etc.).&lt;/p&gt;

&lt;p&gt;As per a report, 75% of website credibility comes from design. That means people would prefer reading something beautifully designed than something that leaves minimal (to no) appeal to their eyes. So, websites have to look and feel good. Best websites are often the ones that have a visible “real” quality to them. Box shadow plays an integral role in making a website look realistic. They have become an absolute necessity in &lt;a href="https://www.lambdatest.com/blog/20-elements-of-modern-web-design/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;designing modern websites&lt;/a&gt;. Now, you might be wondering how. So, let’s get to that.&lt;/p&gt;

&lt;p&gt;Sometimes, I find myself staring at a website, wondering how to make the website feel realistic. CSS box-shadow comes in as a crucial answer to this question. It provides depth to the content and makes it appear like the shadow is coming from the content itself, just like the shadows we see in the real world. This illusion brings realism into the user’s online experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AtJDTexCwmPjveIlF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AtJDTexCwmPjveIlF.png" width="800" height="671"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Look at the cards in the first and second rows. Could you notice any difference between them? The cards in the first row are bland and boring. They have no shadow around them.&lt;/p&gt;

&lt;p&gt;But notice the second row that has a subtle shadow around each card. This simple effect makes the cards look more realistic. This is exactly how CSS box-shadow helps you make your web content appealing.&lt;/p&gt;

&lt;p&gt;There are different ways to style CSS box-shadow effects. Each style is better suited for a particular type of design than others. So, it is critical to understand which type of shadow to implement for which design. For example, a neon shadow would be more suitable if the website has a dark theme.&lt;/p&gt;

&lt;p&gt;In this blog on CSS box-shadow effects, we dive deep into the CSS box-shadow property and the different ways to style the CSS box-shadow effects. This will help you design your web content to stand out, providing the users with a more appealing experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why even use shadows?
&lt;/h2&gt;

&lt;p&gt;In my experience, we understand something better when we know the problem it attempts to solve. So, before we get to the fun part of creating shadows, let’s take a step back to understand why shadows exist in CSS. Knowing the why will help you decide when to use shadows and when to avoid using them.&lt;/p&gt;

&lt;p&gt;Shadows provide elevation. So, larger shadows mean extensive elevation. Using shadows properly creates a sense of depth, as if the objects are floating above the background at different levels. You want your websites to feel tangible and genuine. Shadows will help achieve exactly that.&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     &amp;lt;nav&amp;gt;&amp;lt;h3&amp;gt;LambdaTest&amp;lt;/h3&amp;gt;&amp;lt;/nav&amp;gt;
      &amp;lt;main&amp;gt;
        &amp;lt;section class="container"&amp;gt;
          &amp;lt;div&amp;gt;Are you sure?&amp;lt;/div&amp;gt;
          &amp;lt;p&amp;gt;This action can not be undone.&amp;lt;/p&amp;gt;
        &amp;lt;/section&amp;gt;
    &amp;lt;/main&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@600&amp;amp;display=swap');
    *{
      box-sizing:border-box;
      padding:0;
      margin:0;
      font-family: 'Roboto', sans-serif;
    }
    body{ 
      background:hsla(340deg,95%,43%,0.1);
    }
    nav{
      background:#FFFFFF;
      padding:20px;
      box-shadow: 0px 5px 4px -7px rgba(0, 0, 0, 0.75);
    }
    main{
      display:flex;
      justify-content:center;
      align-items:center;
    }
    section{
      background:#FFFFFF;
      color:#0A0C10;
      width:30em;
      height:250px;
      padding: 1em;
      margin: 1.5em;
      line-height:25px;
      box-shadow:0 6px 6px hsl(0deg 0% 0% / 0.3);
    }
    div{
      font-weight:600;
    } 
    @media only screen and (min-width:400px){
      section{
        margin:4em;
        padding: 2em;
      }
      div{
        font-size:1.5rem;
      }
      section{
        line-height:34px;
      }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might want to use shadows in either of the two cases.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When you want your web content to feel realistic.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When you want to draw the user’s attention to something specific.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Our attention is naturally drawn to the objects that are closest to us. In this blog on styling CSS box-shadow effects, we applied different shadows on the navbar and the modal box, and by elevating the modal box, we give the idea that the modal box is closer to us than the header. As a result, the user is more likely to focus on the modal box first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Get started with this complete &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar14_bh&amp;amp;utm_term=bh&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; automation testing tutorial. Learn what Selenium is, its architecture, advantages and more for automated cross browser testing&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AtaQexekTNYP5lBT2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AtaQexekTNYP5lBT2.png" width="800" height="154"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is CSS box-shadow property?
&lt;/h2&gt;

&lt;p&gt;The CSS box-shadow property allows you to add a shadow to an element. You can add multiple shadow effects to an element by separating them with commas.&lt;/p&gt;

&lt;p&gt;Here’s another example of how it looks:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3198%2F0%2AQthbAuKA2BllhlXJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3198%2F0%2AQthbAuKA2BllhlXJ.png" width="800" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that you know what a CSS box shadow looks like on an element, let’s move to the next part to understand how you can apply that.&lt;/p&gt;

&lt;h2&gt;
  
  
  Values of the CSS box-shadow property
&lt;/h2&gt;

&lt;p&gt;The CSS box shadow of an element is defined by X and Y offsets relative to the element, blur radius, spread radius, and color. Too complicated to understand? Don’t worry! Let’s understand this very simply.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;x-offset&lt;/strong&gt;: The x-offset represents the horizontal shadow of the element. This value is required and can either be positive or negative. A positive value puts the shadow on the right side of the element, while a negative value puts the shadow on the left side.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;y-offset&lt;/strong&gt;: The y-offset represents the vertical shadow of the element. The y-offset value is also required. It can be defined using a positive or negative value. A positive value puts the shadow below the element, while a negative value puts the shadow above the element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;blur-radius&lt;/strong&gt;: The blur-radius sets the blur. The larger this value, the bigger the blur, so the shadow becomes bigger and lighter. Negative values are not allowed. If the value is not specified, it will be 0, making the shadow’s edge sharp.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;spread-radius&lt;/strong&gt;: The spread-radius specifies the spread of the shadow. This value is optional and can either be positive or negative. A positive value will cause the shadow to grow bigger, and a negative value will cause the shadow to shrink. If the value is not specified, it will be 0, i.e., the size of the shadow will be the same as that of the element.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;color&lt;/strong&gt;: The color sets the color of the shadow. The values can be the same as color values in CSS. Look at &lt;a href="https://www.lambdatest.com/blog/modern-css-color-functions/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Color Values &lt;/a&gt;for a list of possible values. If the value is not specified, it will be the same as the text color.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There’s another optional value, i.e., &lt;strong&gt;inset.&lt;/strong&gt; We specify it as the first value of the CSS box-shadow property. This value is not specified by default, so the shadow is considered a drop shadow. Specifying this value moves the shadow inside the element’s frame, resulting in an inner shadow.&lt;/p&gt;

&lt;p&gt;Now that we understand the values required to make a CSS box shadow of an element, let’s concrete this knowledge with a few quick examples.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Through this &lt;a href="https://www.lambdatest.com/learning-hub/usability-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar14_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;usability testing&lt;/a&gt; tutorial, you will learn how usability testing is a great way to discover unexpected bugs, find what is unnecessary or unused before going any further, and have unbiased opinions from an outsider&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Test your websites on real desktop &amp;amp; mobile browsers. &lt;a href="https://accounts.lambdatest.com/register?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=register" rel="noopener noreferrer"&gt;Try LambdaTest Now!&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Examples of the CSS box-shadow property
&lt;/h2&gt;

&lt;p&gt;CSS box shadow effects can be created in many different ways. You can create a typical CSS box shadow using just three values or create a smoother shadow effect by combining multiple shadows separated by a comma.&lt;/p&gt;

&lt;h2&gt;
  
  
  A bottom-right box shadow using XY offset, blur radius, and color:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    div{        
        /* offset-x | offset-y | blur-radius | color */
        box-shadow:  8px 6px 10px rgba(0, 0, 0, 0.3);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;div&amp;gt;LambdaTest is a Browser &amp;amp; app testing cloud to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');
    body{
      margin:2em 1em;
      font-family: 'Roboto', sans-serif;
    }
    div{
      line-height:28px;
      margin:auto;
      padding:1em;
      width:250px;
      height:250px;
      border:1px solid #aaa;
      border-radius:5px;
      box-shadow:  8px 6px 10px rgba(0, 0, 0, 0.3);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we set offset-x to &lt;strong&gt;8px&lt;/strong&gt; and offset-y to &lt;strong&gt;6px&lt;/strong&gt;, resulting in a shadow on the right and bottom sides of the box. The third value sets the blur radius to &lt;strong&gt;10px&lt;/strong&gt;, and the fourth value specifies the color of the shadow. You can also use spread radius, but we are not using it in this example.&lt;/p&gt;

&lt;h2&gt;
  
  
  An inner box shadow using inset, XY offset, blur, spread, and color:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    div{        
     /*inset | offset-x | offset-y | blur-radius | spread-radius | color */
       box-shadow:  inset 0px 10px 20px 2px #3a86ff;

    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   &amp;lt;div&amp;gt;LambdaTest is a Browser &amp;amp; app testing cloud to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems. Integrate LambdaTest with your favorite tool and save yourself from manually managing bugs and tasks.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');

    body{
      margin:2em 1em;
      font-family: 'Roboto', sans-serif;
    }
    div{
      line-height:28px; 
      margin:auto;
      padding:2em;
      width:250px;
      height:250px;
      border:1px solid #aaa;
      border-radius:5px;
      box-shadow:  inset 0px 10px 20px 2px #3a86ff;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here we set inset as the first value that makes the shadow inner. Then we set the vertical offset to 10px, blur radius to 20px, and spread to 2px, resulting in an inner shadow from the top direction. Finally, the last value sets the color.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In this &lt;a href="https://www.lambdatest.com/learning-hub/system-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar14_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;System testing&lt;/a&gt; tutorial, learn why System testing is important and all the intricacies of the System testing process.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Test On &lt;a href="https://www.lambdatest.com/android-emulator-online?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Online Emulator Android&lt;/a&gt;- Test your web and mobile apps on Android Emulators online.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A smooth box shadow combining multiple shadows separated by a comma:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    div{        
      /* offset-x | offset-y | blur-radius | color, offset-x | offset-y | blur-radius | color, */
     box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16), 0px 3px 6px rgba(0, 0, 0, 0.23);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;div&amp;gt;LambdaTest is a Browser &amp;amp; app testing cloud to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;      @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');

    body{
      margin:2em 1em;
      font-family: 'Roboto', sans-serif;
    }
    div{
      line-height:28px;
      margin:auto;
      padding:2em;
      width:250px;
      height:200px;
      border-radius:3px; 
      box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16), 0px 3px 6px rgba(0, 0, 0, 0.23); 
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we create a smooth shadow effect by adding two shadows separated by a comma. We specify x and y-offsets to be consistent in both the shadows and the blur radius to be sharper by defining a value of &lt;strong&gt;6px&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: How To Use &lt;a href="https://www.lambdatest.com/blog/iphone-simulators-on-windows/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;ios emulator for PC&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Different ways to style CSS box-shadow effects
&lt;/h2&gt;

&lt;p&gt;You can style CSS box-shadow effects in various ways. We will look into three different ways of styling it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layered Shadows
&lt;/h2&gt;

&lt;p&gt;This shadow will be the one you notice more frequently than others. This is created by combining multiple shadows separated by a comma and increasing the offset and blur for every shadow. Using this method, you can produce eye-catching shadows seamlessly integrating into the page.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of how a layered shadow is created:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;div class="box-one"&amp;gt;This is a box with a default box shadow.&amp;lt;/div&amp;gt;
    &amp;lt;div class="box-two"&amp;gt;This is a box with a layered box shadow.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .box-one{
        box-shadow:0 5px 5px rgba(0,0,0,0.2);
      }

    .box-two{
       box-shadow: 0px 1px 2px rgba(0,0,0,0.2),
                   0px 2px 4px rgba(0,0,0,0.2),
                   0px 4px 8px rgba(0,0,0,0.2),
                   0px 8px 16px rgba(0,0,0,0.2)
      }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;section class="container"&amp;gt;
      &amp;lt;div class="box-one"&amp;gt;This is a box with a default box-shadow.&amp;lt;/div&amp;gt;
      &amp;lt;div class="box-two"&amp;gt;This is a box with layered box-shadow.&amp;lt;/div&amp;gt;
      &amp;lt;/section&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');
    body{
      margin:2em 1em;
      font-family: 'Roboto', sans-serif;
    }
    .container{
      display:flex;
      justify-content:center;
    }
    div{
      padding:2em;
      margin:1em;
      width:200px;
      height:150px;
      border-radius:5px;
    }
    .box-one{
      box-shadow:0 5px 5px rgba(0,0,0,0.2);
    }
    .box-two{
     box-shadow: 0px 1px 2px rgba(0,0,0,0.2), 
    0px 2px 4px rgba(0,0,0,0.2), 
    0px 4px 8px rgba(0,0,0,0.2), 
    0px 8px 16px rgba(0,0,0,0.2)
    }
    @media only screen and (max-width:400px){
      .container{
        flex-direction:column;
      }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we have two boxes. Notice how the layered shadow on the right box differs from the default shadow on the left. Layered shadow creates a smooth, subtle effect that the default shadow does not.&lt;/p&gt;

&lt;p&gt;This layering method allows you to have more control over how shadows are rendered on the page and adjust the shadows’ spread, distance, and sharpness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Neon Shadows
&lt;/h2&gt;

&lt;p&gt;Up until now, we have only seen gray or black shadows. However, shadows can also have colors. Neon shadows are just those shadows that have a glowing effect on them. This type of shadow is best suited for a dark-themed website. Since dark-themed websites are gaining popularity, the usage of neon shadows is also increasing.&lt;/p&gt;

&lt;p&gt;You can create a neon shadow by changing the &lt;strong&gt;color&lt;/strong&gt; value of the CSS &lt;strong&gt;box-shadow&lt;/strong&gt; property.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of a neon shadow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;div&amp;gt;This is a box with neon shadow&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   div{
        box-shadow: 0px 2px 14px 2px #64ffda;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     &amp;lt;div&amp;gt;This is a box with neon shadow&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');
    body{
      font-family: 'Roboto', sans-serif;
      min-height: 100vh;
      display:flex;
      justify-content:center;
      align-items:center;
      background-color:#111111;
    }
    div{
      padding:2em;
      height:150px;
      border-radius:10px;
      width: 150px;
      color:#64ffda;
      box-shadow: 0px 2px 14px 2px #64ffda;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we set the color value to a bluish shade and the y offset to &lt;strong&gt;2px&lt;/strong&gt;, &lt;em&gt;blur radius&lt;/em&gt; to &lt;strong&gt;14px&lt;/strong&gt;, and &lt;em&gt;spread radius&lt;/em&gt; to &lt;strong&gt;2px&lt;/strong&gt;. As a result, the card has a glowing neon effect.&lt;/p&gt;

&lt;p&gt;You can apply multi-layer shadows for a more vibrant and smooth neon effect, much like we did in the previous example.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;A complete &lt;a href="https://www.lambdatest.com/learning-hub/manual-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar14_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Manual testing&lt;/a&gt; tutorial covering all aspects of Manual testing, including strategies and best practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Neumorphic Shadows
&lt;/h2&gt;

&lt;p&gt;The concept of neumorphic shadows comes from neumorphism, an adaptation of skeuomorphic design combined with flat design. It is a visual effect that attempts to replicate user interface elements exactly as they would appear in real life.&lt;/p&gt;

&lt;p&gt;Neumorphic UI elements appear to be placed inside the background or directly on the background, in contrast to other &lt;a href="https://www.lambdatest.com/blog/web-design-trends-2020/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;web design trends&lt;/a&gt; that make items appear above the background. They are also called soft UI because soft shadows create the effect.&lt;/p&gt;

&lt;p&gt;To better understand the nuemorphic UI, let’s compare it to a material design card component.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AKrw940VcVJiSd-Dy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AKrw940VcVJiSd-Dy.png" width="537" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice how the material design card on the left looks like it floats above the background, while the neumorphic card on the right appears inside the background.&lt;/p&gt;

&lt;p&gt;Now let’s see an example of how CSS implements it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
    &amp;lt;div&amp;gt;This is a card with neumorphic shadow on the top-left.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    div{
       box-shadow: -6px -6px 10px rgba(255,255,255,0.45), 6px 6px 10px rgba(94,104,121,0.3);

    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;div&amp;gt;This is a card with neumorphic shadow on top-left.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');
    body{
      font-family: 'Roboto', sans-serif;
      min-height: 100vh;
      display:flex;
      justify-content:center;
      align-items:center;
      background: #dde1e7;
    }
    div{
      padding:2em;
      height:200px;
      width: 200px;
      border-radius: 30px;
      box-shadow: -6px -6px 10px rgba(255,255,255,0.45), 6px 6px 10px rgba(94,104,121,0.3);

    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We created two shadows separated by a comma. The most important thing to note is that using two shadows — a light shadow and a dark shadow is the fundamental component of creating neumorphic elements, as we did in this example. One serves as a highlight, and the other serves as the direction of the light source to create the neomorphic effect.&lt;/p&gt;

&lt;p&gt;In the previous section of this blog on CSS box-shadow effects, we looked at how to use the inset keyword to make an inner shadow. Unlike drop shadows that make an element appear raised from beneath the background, an inset shadow gives the impression that the element is being pressed into it.&lt;/p&gt;

&lt;p&gt;Let’s look at an example by just toggling the &lt;strong&gt;inset&lt;/strong&gt; option to see the difference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   &amp;lt;div class=first-card&amp;gt;This is a card with a drop shadow.&amp;lt;/div&amp;gt;
    &amp;lt;div class=second-card&amp;gt;This is a card with an inset shadow.&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    .first-card{
        box-shadow: -6px -6px 10px rgba(255,255,255,0.45), 6px 6px 10px rgba(94,104,121,0.3);
        }

    .second-card{
          box-shadow: inset 6px 6px 10px rgba(255,255,255,0.45), inset -6px -6px 10px rgba(94,104,121,0.3);
      }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    &amp;lt;div class=first-card&amp;gt;This is a card with drop shadow.&amp;lt;/div&amp;gt;
    &amp;lt;div class=second-card&amp;gt;This is a card with inset shadow.&amp;lt;/div&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400&amp;amp;display=swap');
    body{
      font-family: 'Roboto', sans-serif;
      min-height: 100vh;
      display:flex;
      justify-content:center;
      align-items:center;
      background: #dde1e7;
    }
    .container{
      display:flex;
      justify-content:center;
    }
    div{
      padding:2em;
      width:200px;
      height:150px;
      margin:1em;
      border-radius: 30px;
    }
    .first-card{
    box-shadow: -6px -6px 10px rgba(255,255,255,0.45), 6px 6px 10px rgba(94,104,121,0.3);
    }
    .second-card{
      box-shadow: inset 6px 6px 10px rgba(255,255,255,0.45), inset -6px -6px 10px rgba(94,104,121,0.3);
    }

    @media only screen and (max-width:400px){
      .container{
        flex-direction:column;
      }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;A comprehensive User &lt;a href="https://www.lambdatest.com/learning-hub/user-acceptance-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar14_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Acceptance Testing&lt;/a&gt; (UAT) tutorial that covers what User Acceptance Testing is, its importance, benefits, and how to perform it with real-time examples&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Important points to note for neomorphic shadows:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The background color of the neomorphic elements must be the same (or very close) as the parent element’s background color.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Elements need to have two types of shadows: one light and one dark.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rounded edges are a distinguishing feature of neomorphic elements.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; Tutorial: A Complete Guide on Selenium Automation Testing&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips for applying styling CSS box-shadow
&lt;/h2&gt;

&lt;p&gt;Box shadow is a great way to make your web content look appealing, but we can easily overdo it, which can ruin the look of our website. That’s why keeping a few points in mind while working with shadows is important.&lt;/p&gt;

&lt;p&gt;Let’s look at them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Create consistent shadows&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Make them consistent. If our goal is to create the illusion of depth, we need every shadow to match. Otherwise, it will look like a bunch of blurry borders.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use animations only when necessary&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use animations only when necessary. Performance decreases when we animate CSS box shadow. So, it’s best to avoid complex animations. However, you can use simple &lt;a href="https://www.lambdatest.com/css-animation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;CSS animations&lt;/a&gt; like hover to transition.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;**Use a shadow layering tool&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;Use a shadow layering tool. If you don’t feel like writing multiple lines of code to apply box shadow, don’t worry. You can leverage third-party tools like &lt;a href="https://shadows.brumm.af/" rel="noopener noreferrer"&gt;https://shadows.brumm.af/&lt;/a&gt;, which helps you create layered shadows quickly.&lt;/p&gt;

&lt;p&gt;It allows you to add as many as ten layers of shadow to your object. With this tool, there is no need to enter multiple values to get the ideal shadow manually. Set the properties, preview the box shadow, and copy-paste the code into your project. Voila! You have your layered CSS box shadow!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Run Automated &lt;a href="https://www.lambdatest.com/playwright-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt; Tests Online- Run your Playwright test scripts instantly on 50+ browser and OS combinations using the LambdaTest cloud.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Browser compatibility for CSS box-shadow property
&lt;/h2&gt;

&lt;p&gt;While most browsers support the box-shadow property; there are very few that do not fully support it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AVwToyeLJoXl0NCb0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AVwToyeLJoXl0NCb0.png" width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This property is supported in Chrome from version 4 to 9 using the prefix -webkit- and fully supported from version 10.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   -webkit-box-shadow: 8px 6px 10px rgba(0, 0, 0, 0.3);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mozilla Firefox versions 2 and 3 do not support CSS box-shadow. Version 3.5 and 3.6 support the box shadow with the prefix -moz-. And from version 4, this property is fully supported.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   -moz-box-shadow: 8px 6px 10px rgba(0, 0, 0, 0.3);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For the Safari browser, versions 3.1 and 4 partially support this feature with the prefix &lt;strong&gt;-webkit-&lt;/strong&gt; but version 5 completely supports it.&lt;/p&gt;

&lt;p&gt;Opera browser also supports the box-shadow property except for version 10.1.&lt;/p&gt;

&lt;p&gt;The CSS properties you use in your website must be cross-browser compatible. This is why you must check the browser compatibility of your features.&lt;/p&gt;

&lt;p&gt;To check that, you can use a cloud-based testing platform like LambdaTest that offers an &lt;a href="https://www.lambdatest.com/online-browser-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online browser farm&lt;/a&gt; of 3000+ real browsers and operating systems combinations to test your websites (and web apps). It lets you perform tests at scale to detect &lt;a href="https://www.lambdatest.com/blog/finding-cross-browser-compatibility-issues-in-html-and-css/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;cross browser compatibility issues in HTML/CSS&lt;/a&gt; and fix them so that your website (or web app) works seamlessly across different browsers &amp;amp; OS combinations.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/hJ-eP8TcGuY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: A Complete End to End &lt;a href="https://www.lambdatest.com/learning-hub/end-to-end-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;(E2E) Testing&lt;/a&gt; Tutorial: Comprehensive Guide With Examples and Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Subscribe to &lt;a href="https://www.youtube.com/c/LambdaTest?sub_confirmation=1" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel&lt;/a&gt; and get detailed tutorials around &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium automation testing&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/cypress-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Cypress testing&lt;/a&gt;, and more.&lt;/p&gt;

&lt;p&gt;The following is an example of testing browser support for CSS box-shadow:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AlUHGsl_d1k1a1q_e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AlUHGsl_d1k1a1q_e.png" width="800" height="337"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: A Complete &lt;a href="https://www.lambdatest.com/learning-hub/end-to-end-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec30_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;End to End Testing&lt;/a&gt; Tutorial: Comprehensive Guide With Examples and Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;In this &lt;a href="https://www.lambdatest.com/learning-hub/ad-hoc-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=mar14_bh&amp;amp;utm_term=bh&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Ad hoc testing&lt;/a&gt; tutorial, let's deep dive into what Ad hoc testing is, its advantages, disadvantages, types, characteristics, and their best practices.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping it Up
&lt;/h2&gt;

&lt;p&gt;As the quest for improving user experience is increasing rapidly in the developer and designer community, features such as CSS box shadows have started to play a mainstream role in website design. They help us to bring realism to the user’s online experience.&lt;/p&gt;

&lt;p&gt;In this blog on CSS box shadow, we have discussed why to use CSS box shadow, what is CSS box shadow, and how to implement CSS box shadow. Moreover, we have also discussed the different ways of styling CSS box shadow effects that include layered, neon, and neomorphic shadows.&lt;/p&gt;

&lt;p&gt;With this summary, I hope you have gained a firm grasp of CSS box shadow. Practice is the key to mastering a skill. So go and use box shadows on your website. Remember to experiment with different colors and key values to see what works and what does not.&lt;/p&gt;

&lt;p&gt;Happy styling!!&lt;/p&gt;

</description>
      <category>css</category>
      <category>testing</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>A Complete Guide To CSS Grid</title>
      <dc:creator> Tahera Alam</dc:creator>
      <pubDate>Fri, 09 Dec 2022 11:14:45 +0000</pubDate>
      <link>https://forem.com/testmuai/a-complete-guide-to-css-grid-3cpl</link>
      <guid>https://forem.com/testmuai/a-complete-guide-to-css-grid-3cpl</guid>
      <description>&lt;p&gt;Ever since the Internet was invented, web developers have searched for the most efficient ways to display content on web browsers.&lt;/p&gt;

&lt;p&gt;They made workarounds with CSS concepts like floats and table-based layouts that have been used for a long time. The downside is that neither is ideal since they were never designed to be used as layout tools.&lt;/p&gt;

&lt;p&gt;The use of the HTML5 table element for laying out web pages has been deprecated. It means using this element for styling purposes is not only harmful to the architecture of your website, but it might also negatively impact your SEO score.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.lambdatest.com/blog/css-flexbox-tutorial/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Flexbox&lt;/a&gt; is also a great tool for layout creation, but it was designed for layout in one dimension — either a row or a column. Because of its one-dimensional flow, the Flexbox is also not very suitable for creating complex layouts.&lt;/p&gt;

&lt;p&gt;In a later section of the article on CSS Grid, you will see how Flexbox and CSS Grid vary from one another.&lt;/p&gt;

&lt;p&gt;Layouts are important because they determine how your website looks across different devices. For example, &lt;a href="https://www.lambdatest.com/software-testing-questions/how-to-create-a-responsive-website?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;creating responsive websites&lt;/a&gt; for different devices is integral to web design. To achieve such layouts, web developers had to rely on CSS hacks like floats, tables, positioning, etc. You can refer to this &lt;a href="https://www.lambdatest.com/learning-hub/css-cheat-sheet?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;CSS cheat sheet&lt;/a&gt; to learn more about CSS tricks.&lt;/p&gt;

&lt;p&gt;According to Statista, in the second quarter of 2022, &lt;strong&gt;mobile phones alone generated 58.99 percent of all website traffic&lt;/strong&gt;. So we need a more flexible and ideal solution to lay out web pages. Thankfully, &lt;a href="https://www.lambdatest.com/css-grid-layout?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;CSS Grid Layout&lt;/a&gt; is there for our rescue.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2400%2F0%2AUt31LQKrBBkdOSih.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2400%2F0%2AUt31LQKrBBkdOSih.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Grid is the first CSS module built to solve all the &lt;a href="https://www.lambdatest.com/blog/10-responsive-web-design-challenges-and-their-solution/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;layout challenges&lt;/a&gt; web developers have faced. Because of its flexibility, CSS Grid allows you to create almost any type of layout that you might need.&lt;/p&gt;

&lt;p&gt;CSS Grid lets you create two-dimensional flexible layouts with rows and columns.&lt;/p&gt;

&lt;p&gt;With its different properties and layout concepts, CSS Grid may appear a little intimidating, but it is simple to implement. This blog on CSS Grid breaks down the &lt;strong&gt;CSS Grid&lt;/strong&gt; into a few simple and powerful concepts that will change how you design layouts for the web forever.&lt;/p&gt;

&lt;p&gt;Let’s dive right in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Terminology
&lt;/h2&gt;

&lt;p&gt;Before we go deeper into CSS Grid, let’s look at a few key grid terms you would come across throughout the blog. You can skip this section in case you already have a good grasp of these concepts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Container
&lt;/h2&gt;

&lt;p&gt;An HTML element becomes a &lt;strong&gt;grid container&lt;/strong&gt; when its display property is set to &lt;strong&gt;grid&lt;/strong&gt; or &lt;strong&gt;inline grid&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
     &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
     &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
     &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    display: grid;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Here, the element with the &lt;strong&gt;&lt;em&gt;container&lt;/em&gt;&lt;/strong&gt; class is a grid container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Al3gf5ZR7WVlFhakf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Al3gf5ZR7WVlFhakf.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Items
&lt;/h2&gt;

&lt;p&gt;A grid layout comprises a parent element called a grid container and one or more child elements. Child elements that are direct descendants of the grid container are called &lt;strong&gt;grid items&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
   &amp;lt;div class="item"&amp;gt;&amp;lt;/div&amp;gt;
   &amp;lt;div class="item"&amp;gt;&amp;lt;/div&amp;gt;
   &amp;lt;div class="item"&amp;gt;
       &amp;lt;p class="sub-item"&amp;gt;&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
    &amp;lt;div class="item"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In this example, &lt;strong&gt;grid items&lt;/strong&gt; are those elements which have the class &lt;strong&gt;&lt;em&gt;item&lt;/em&gt;&lt;/strong&gt; in them. But the element with the class &lt;em&gt;**sub-item *&lt;/em&gt;*is not a grid item because it is not the direct descendent of the grid container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AljGmoOAhA59SAfpf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AljGmoOAhA59SAfpf.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Grid Lines
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Grid lines&lt;/strong&gt; are the horizontal and vertical lines that make up the grid.&lt;br&gt;
Starting at the grid container’s outermost edge, each grid line has a reference number that increments by 1 in the direction of the grid.&lt;/p&gt;

&lt;p&gt;The lines between columns are called column lines, and the lines between rows are called row lines. You refer to line numbers when placing an item in a grid.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A6fScZgnn1xpA_K2W.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A6fScZgnn1xpA_K2W.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The highlighted blue line in this image is column line 3.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Grid Track
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;grid track&lt;/strong&gt; is a horizontal or vertical space between two grid lines. It is a term for columns or rows of the grid.&lt;/p&gt;

&lt;p&gt;Here’s an example of the grid track between the third and fourth-row grid lines:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Au62_6fsU1MI2cm5M.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Au62_6fsU1MI2cm5M.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Grid Cell
&lt;/h2&gt;

&lt;p&gt;A &lt;strong&gt;grid cell&lt;/strong&gt; is a space between four grid lines — two adjacent rows and two adjacent column grid lines. It’s the smallest possible unit on the grid where you can place an item.&lt;/p&gt;

&lt;p&gt;Here is an example of the grid cell between row grid lines &lt;em&gt;2&lt;/em&gt; and &lt;em&gt;3&lt;/em&gt; and column grid lines &lt;em&gt;1&lt;/em&gt; and &lt;em&gt;2&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AKmoGhx93Prfhj9Mt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AKmoGhx93Prfhj9Mt.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Grid Area
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;grid area&lt;/strong&gt; is the area on the grid surrounded by four grid lines. There could be several grid cells in it.&lt;/p&gt;

&lt;p&gt;Here’s an example of a grid area between row grid lines &lt;em&gt;2&lt;/em&gt; and &lt;em&gt;4&lt;/em&gt;, and column grid lines &lt;em&gt;2&lt;/em&gt; and &lt;em&gt;5&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AFjGr5yMDmyRAUdUZ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AFjGr5yMDmyRAUdUZ.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Grid Container
&lt;/h2&gt;

&lt;p&gt;An HTML element becomes a grid container when its display property is set to &lt;strong&gt;grid&lt;/strong&gt; or &lt;strong&gt;inline grid&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    display: grid;
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;  
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17,0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Test CSS Grid compatibility across 3000+ browser environments. &lt;a href="https://accounts.lambdatest.com/register?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=register" rel="noopener noreferrer"&gt;Try LambdaTest Now!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Complete &lt;a href="https://www.lambdatest.com/learning-hub/webdriver?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;WebDriver&lt;/a&gt; Tutorial: A Guide on Selenium WebDriver Automation&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Properties for Grid Container
&lt;/h2&gt;

&lt;p&gt;Grid container is the element where you define how you want your grid layout to look. CSS provides several properties for grid containers that allow you to define the layout.&lt;/p&gt;

&lt;p&gt;Below we walk through each of these properties in simple terms:&lt;/p&gt;
&lt;h3&gt;
  
  
  display
&lt;/h3&gt;

&lt;p&gt;The display property sets the element as a grid container. It has two values:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;display: grid&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;display:inline-grid&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;em&gt;grid&lt;/em&gt; property makes the grid items block level, taking the entire width of the grid container.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A0pYh8R_HO4mnHhXX.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A0pYh8R_HO4mnHhXX.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;inline-grid&lt;/em&gt; makes grid items inline, while the grid makes the grid-items block level.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A6OCX73mI5BegIwIF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A6OCX73mI5BegIwIF.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-template-columns
&lt;/h3&gt;

&lt;p&gt;The grid-template-columns property defines the line name and column sizes of the grid container.&lt;/p&gt;

&lt;p&gt;This property creates column tracks in the grid container for each specified value. The value of this property is a list separated by space where each value represents the column track width, and the space between them represents the grid line.&lt;/p&gt;

&lt;p&gt;If you want your grid container to have 6 columns, specify the width of 6 columns. Or set the value to &lt;strong&gt;auto&lt;/strong&gt; if you want all the columns to be the same width.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;track size:&lt;/strong&gt; can be length (a non-negative length, giving the width of the column), percentage, or fraction of the available space in the grid container( using fr unit)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;line name:&lt;/strong&gt; the name may be any valid string other than the reserved words &lt;strong&gt;span&lt;/strong&gt; and &lt;strong&gt;auto&lt;/strong&gt;. Lines may have multiple names separated by a space inside the square brackets. For example, [line-name-a line-name-b]&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;fr&lt;/strong&gt; unit lets you create flexible grid tracks. It means a fraction of the available space in the grid container.&lt;/p&gt;

&lt;p&gt;For example, this will set the first item to one-third and the second item to two-third of the container’s width.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
      grid-template-columns: 1fr 2fr;
   }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The available space is calculated after all the non-flexible items if any. In the example below, the &lt;em&gt;100px&lt;/em&gt; is not included in the total free space available to the fr units.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
      grid-template-columns: 100px 1fr 2fr;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;An example of the grid-template-columns property is shown below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;container{
  display:grid;
  grid-template-columns: [first] 1fr [line2] 2fr  [line3] 3fr;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  }
  .grid-item {
    background-color: #fefae0;
    text-align: center;
    font-size: 30px;
    padding: 15px;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid; 
    grid-template-columns: [first] 1fr [line2] 2fr  [line3] 3fr;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17,0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the above example, items &lt;em&gt;4&lt;/em&gt;, &lt;em&gt;5&lt;/em&gt;, and &lt;em&gt;6&lt;/em&gt; are placed on a new row track because only 3 column track sizes were defined. Additionally, because they were positioned in column tracks &lt;em&gt;1&lt;/em&gt;, &lt;em&gt;2&lt;/em&gt;, and &lt;em&gt;3&lt;/em&gt;, their columns’ sizes are equal to &lt;em&gt;1&lt;/em&gt;, &lt;em&gt;2&lt;/em&gt;, and &lt;em&gt;3&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/learning-hub/manual-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Manual Testing&lt;/a&gt; Tutorial: A Comprehensive Guide, with Examples &amp;amp; Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-template-rows
&lt;/h3&gt;

&lt;p&gt;The grid-template-rows property creates row tracks in the grid container for each specified value. Like the grid-template-columns property, the value of grid-template-rows is also a space-separated list where each value defines the height of the specific row.&lt;/p&gt;

&lt;p&gt;An example of the grid-template-rows property is shown below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
      display:grid;
      grid-template-rows: 100px 200px;
      background-color: #a2d2ff;
      padding: 30px;
      gap:10px;
      }
      .grid-item {
      text-align:center;
      border: 1px solid rgba(17, 17, 17, 0.8);
      padding: 18px;
      font-size: 28px;
      background-color: rgba(255, 255, 255, 0.8);
      }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;  
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-rows: 100px 200px;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17, 0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the above example, we set row height to be &lt;em&gt;100px&lt;/em&gt; and &lt;em&gt;200px&lt;/em&gt;. So, the first and second-row tracks have a height of &lt;em&gt;100px&lt;/em&gt; and &lt;em&gt;200px&lt;/em&gt;. Because only 2-row tracks were defined, the heights of the 3rd and 4th-row tracks are defined by the contents of each.&lt;/p&gt;
&lt;h3&gt;
  
  
  minmax() function
&lt;/h3&gt;

&lt;p&gt;The minmax() function defines the minimum and maximum size range of a grid row or a grid column. This function takes 2 parameters: the first is the minimum size, and the second is the maximum size of the track.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of minmax() function:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;LambdaTest is a cross browser testing cloud platform. It is a browser &amp;amp; app testing cloud to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems&amp;lt;/div&amp;gt;  
        &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-rows:minmax(80px,auto);
  grid-template-columns: minmax(auto,50%) 1fr 2fr;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
   }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;LambdaTest is a cross browser testing cloud platform. It is a browser &amp;amp; app testing cloud to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems. &amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;  
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-rows:minmax(80px,auto);
  grid-template-columns: minmax(auto,     50%) 1fr 2fr;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  height:400px;
  }
  .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 15px;
    font-size: 18px;
    font-family: Arial;
    background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Let’s analyze the above case:&lt;/p&gt;

&lt;p&gt;The first row has a minimum height of &lt;em&gt;80px&lt;/em&gt;, but its maximum size is set to auto, which will allow the row track to increase its height based on the size of the content.&lt;/p&gt;

&lt;p&gt;Similarly, the first column track is set to have a minimum height of auto and a maximum height of &lt;em&gt;50%&lt;/em&gt;, which ensures that the column track doesn’t go beyond &lt;em&gt;50%&lt;/em&gt; of the grid container. The second and third column track has a height of &lt;em&gt;1fr&lt;/em&gt; and &lt;em&gt;2fr&lt;/em&gt;, respectively.&lt;/p&gt;

&lt;p&gt;This function is super useful when you want a strict minimum value and an open, flexible one.&lt;/p&gt;
&lt;h3&gt;
  
  
  repeat() function
&lt;/h3&gt;

&lt;p&gt;The repeat() function sets the grid tracks to repeat according to the specified value. This allows many columns or rows with the same pattern to be written in a more compact form.&lt;/p&gt;

&lt;p&gt;This is useful for a grid with many items of the same value.&lt;/p&gt;

&lt;p&gt;The repeat()function takes two arguments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first argument specifies the number of times tracks should repeat. It is defined with an integer value of 1 or more.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The second argument specifies the size of the tracks.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s look at an example of the repeat() function:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;  
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
      text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, we repeat &lt;em&gt;1fr&lt;/em&gt; 3 times for column tracks which create 3 column tracks of &lt;em&gt;1fr&lt;/em&gt; each.&lt;/p&gt;
&lt;h3&gt;
  
  
  fit-content() function
&lt;/h3&gt;

&lt;p&gt;The fit-content() function takes just one parameter — the maximum value. When this property is set, a grid column or row will still take up as little space as necessary according to its content, but not more than the maximum value provided.&lt;/p&gt;

&lt;p&gt;Let’s look at an example of the fit-content() function:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;LambdaTest is a cross browser testing cloud platform.It is a browser &amp;amp; app testing cloud to perform both exploratory and automated testing.&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
      display: grid;  
      grid-template-columns: auto fit-content(600px) auto;
      background-color: #a2d2ff;
      padding: 10px;
      gap:10px;
      height:500px;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;LambdaTest is a cross browser testing cloud platform.It is a browser &amp;amp; app testing cloud to perform both exploratory and automated testing.&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display: grid;  
  grid-template-columns: auto fit-content(600px) auto;
  background-color: #a2d2ff;
   padding: 10px;
   gap:10px;
   height:500px;

}
 .grid-item {
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 18px;
    font-family: Arial;
    background-color: rgba(255, 255, 255, 0.8);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, we have three columns, the first and third columns are set to auto. But the second column is set to fit the content to a max value of &lt;em&gt;600px&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The second column will take up the space based on its content, but it will not go beyond the max size of &lt;em&gt;600px&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  min-content and max-content
&lt;/h3&gt;

&lt;p&gt;The min-content and max-content are two special values that can be used in both CSS Grid and CSS in general.&lt;/p&gt;

&lt;p&gt;The min-content specifies the element to take the minimum space needed for the content. Suppose for a line of text, this value will shrink the element to the minimum it could be without letting any of the words go beyond that shrunk size. This implies that text content would soft-wrap itself whenever possible, shrinking to the size of the longest word.&lt;/p&gt;

&lt;p&gt;Let’s look at an example to better understand this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;This is a line  of text to demonstrate  min-content.Notice how it's taking the length of the longest word.&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/div
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display: grid;  
    grid-template-columns:auto min-content auto;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
 &amp;lt;div class="grid-item"id="item2"&amp;gt;This is a line  of text to demonstrate min-content. 
Notice how it's taking the length of the longest word.&amp;lt;/div&amp;gt;
 &amp;lt;div class="grid-item"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
      display: grid;  
      grid-template-columns:auto min-content auto;
      padding: 10px;
      gap:15px;
      font-family:Arial;
    }
.grid-item{
  background-color:#ddd;
  font-size:18px;
}
#item2{
  background-color:yellow;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, there are three columns. The second one is set to &lt;em&gt;min-content&lt;/em&gt;, and the other two are set to auto. Because of this value, the second element takes the width of the longest word, making sure to take as little space as possible.&lt;/p&gt;

&lt;p&gt;The max-content values take the maximum space needed for its content without adjusting any content.&lt;/p&gt;

&lt;p&gt;Here’s an example of max-content:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="grid-item"id="item2"&amp;gt;This is a line  of text to demonstrate max-content.&amp;lt;/div&amp;gt;
  &amp;lt;/div
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display: grid;  
    grid-template-columns:max-content;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
 &amp;lt;div class="grid-item"id="item2"&amp;gt;This is a line  of text to demonstrate max-content.&amp;lt;/div&amp;gt;
&amp;lt;/div
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
      display: grid;  
      grid-template-columns:max-content;
      padding: 10px;
      gap:15px;
      font-family:Arial;
    }
.grid-item{
  background-color:#ddd;
  font-size:18px;
}
#item2{
  background-color:yellow;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  auto-fill and auto-fit
&lt;/h3&gt;

&lt;p&gt;The auto-fill property fills the row with as many columns as it can fit. Whenever a new column can fit, auto-fill creates implicit columns and fills it in the row because it’s trying to fill as many columns as it can fit in the row. If the new column is empty, it will still be allocated a space in the row.&lt;/p&gt;

&lt;p&gt;The auto-fit expands the available columns to fit them into the entire available space of the container.&lt;/p&gt;

&lt;p&gt;Consider this demo to understand the auto-fill and auto-fit properties:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AhepLISXeiplknLiO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AhepLISXeiplknLiO.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this example, the columns are defined using the repeat function. They have a minimum width of &lt;em&gt;150px&lt;/em&gt; and a max width of &lt;em&gt;1fr&lt;/em&gt;, which will share the total space equally between elements if available.&lt;/p&gt;

&lt;p&gt;For the number of columns per row, we set it to &lt;em&gt;auto-fit&lt;/em&gt; in the &lt;em&gt;first grid&lt;/em&gt;, and in the second one, we set it to &lt;em&gt;auto-fill&lt;/em&gt;.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#first-container{
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
 }
 #second-container{
   grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Notice how both the properties are behaving exactly the same in the above image.&lt;br&gt;
Here’s an important point for you to note: up to a certain width, auto-fill and auto-fit show the same result. But they are not behaving the same under the hood.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"id="first-container"&amp;gt;
  &amp;lt;h2&amp;gt;Autofill&amp;lt;/h2&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class="container"id="second-container"&amp;gt;
  &amp;lt;h2&amp;gt;Autofit&amp;lt;/h2&amp;gt;
  &amp;lt;div class="grid-item one"&amp;gt;1&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item two"&amp;gt;2&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item three"&amp;gt;3&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item four"&amp;gt;4&amp;lt;/div&amp;gt;
   &amp;lt;div class="grid-item five"&amp;gt;5&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{ 
      display:grid;
      padding: 10px;
      gap:15px;
      font-family:Arial;
    }
#first-container{ 
   grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
#second-container{
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.grid-item{
  background-color:#ffafcc;
  font-size:18px;
  padding:3em;
  text-align:center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;When extra space becomes available to the first container, which is set to &lt;em&gt;auto-fill&lt;/em&gt;, it will add as many columns as it can and fill the row even if the columns are empty.&lt;br&gt;
But in the case of the second container with an &lt;em&gt;auto-fit&lt;/em&gt; set, it will fill the extra space with the existing columns by expanding them.&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-template-areas
&lt;/h3&gt;

&lt;p&gt;The grid-template-areas property defines the grid template by referencing the names of the grid areas specified with the grid-area property.&lt;/p&gt;

&lt;p&gt;First, you name the items of the grid by the grid-area property, and then you reference those names in the grid-template-areas property.&lt;/p&gt;

&lt;p&gt;In the grid-template-areas property, you repeat the grid area names, which causes that cell to span according to the repeated times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;grid-area-name:&lt;/strong&gt; the name of a grid area specified with the grid-area property.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;*&lt;em&gt;none *&lt;/em&gt;— no grid areas are defined.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this sounds confusing, do not worry. This is a very powerful property; the example below will clarify the concept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;header&amp;gt;Header&amp;lt;/header&amp;gt;
         &amp;lt;main&amp;gt;main&amp;lt;/main&amp;gt;
         &amp;lt;nav&amp;gt;nav&amp;lt;/nav&amp;gt;
         &amp;lt;aside&amp;gt;aside&amp;lt;/aside&amp;gt;
         &amp;lt;footer&amp;gt;footer&amp;lt;/footer&amp;gt;
        &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;header{
  grid-area: header;
}
 nav{
  grid-area: nav;
}
 main{
  grid-area: main;
}
 aside{
  grid-area: sidebar;
}
 footer{
  grid-area: footer;
}
 header,footer,main,aside,nav{
  background-color:#3a86ff;
  color:#fff;
  border: 1px solid #fff;
  padding:20px;
}
.container{
 display: grid;
 grid-template-areas:
  'header header header
  'nav main sidebar'
  'nav footer footer';
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 70px 2fr 50px;
  height: 100vh;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
&amp;lt;header&amp;gt;Header&amp;lt;/header&amp;gt;
 &amp;lt;main&amp;gt;main&amp;lt;/main&amp;gt;
 &amp;lt;nav&amp;gt;nav&amp;lt;/nav&amp;gt;
 &amp;lt;aside&amp;gt;aside&amp;lt;/aside&amp;gt;
 &amp;lt;footer&amp;gt;footer&amp;lt;/footer&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
header{
    grid-area: header;
}
nav{
    grid-area: nav;
}
main{
    grid-area: main;
}
aside{
    grid-area: sidebar;
}
footer{
    grid-area: footer;
}
header,footer,main,aside,nav{
    background-color:#3a86ff;
    color:#fff;
    border: 1px solid #fff;
    padding:20px;
}
.container{
  display: grid;
  grid-template-areas: 
    'header header header'
    'nav main sidebar'
    'nav footer footer';
    grid-template-columns: 1fr 3fr 1fr;
    grid-template-rows: 70px 2fr 50px;
    height: 100vh;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, we create a grid layout that has &lt;em&gt;3-column tracks&lt;/em&gt; and &lt;em&gt;3-row tracks&lt;/em&gt;. The entire top row will consist of the header area. The middle row will consist of &lt;em&gt;1 nav area&lt;/em&gt;, &lt;em&gt;1 main area&lt;/em&gt;, and &lt;em&gt;1 sidebar area&lt;/em&gt;. The bottom row will consist of &lt;em&gt;1 nav area&lt;/em&gt; and &lt;em&gt;2 footer areas&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-gap(gutters)
&lt;/h3&gt;

&lt;p&gt;The grid-gap property defines the gap size between the rows &lt;em&gt;and&lt;/em&gt; columns in a grid layout. It is a shorthand property for the row-gap and column-gap.&lt;/p&gt;

&lt;p&gt;If two values are specified, the first represents grid-row-gap, and the second represents grid-column-gap. If only one value is specified, both row-gap and column-gap get the same specified gap.&lt;/p&gt;

&lt;p&gt;An example of a grid-gap property is shown below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  /*grid-gap:10px 40px;*/ /*old*/
  gap:10px 40px; /*standard*/
  grid-template-columns:repeat(3,1fr);
  background-color: #a2d2ff;
  padding: 30px;
  }
  .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
     }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
       &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;/div&amp;gt;  
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    /*grid-gap:10px 40px;*/ /*old*/
    gap:10px 40px; /*standard*/
    grid-template-columns:repeat(3,1fr);
    background-color: #a2d2ff;
    padding: 30px;
    }
    .grid-item {
      text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example, we set the row gap to &lt;em&gt;10px&lt;/em&gt; and column gap to &lt;em&gt;40px&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  justify-items
&lt;/h3&gt;

&lt;p&gt;The justify-items property is used to align the grid items along the row axis or inline axis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;start:&lt;/strong&gt; position grid items at the start of the row axis (row line number 1).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;end:&lt;/strong&gt; position grid items at the end of the row axis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;center:&lt;/strong&gt; position grid items in the center of the row axis.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;stretch:&lt;/strong&gt; stretch the grid items across the entire row axis. This is the default value.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below are the examples of each value:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-items: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AGIX0OXhe9Ti_yGPn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AGIX0OXhe9Ti_yGPn.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Boxes(grid items) are aligned to the start of the row axis.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;container {
  justify-items: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AQuI0rbt0HDxRqCUu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AQuI0rbt0HDxRqCUu.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Boxes(grid items) aligned to the end of the row axis&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-items: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A6aTPqNYnpRMfZTC-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A6aTPqNYnpRMfZTC-.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: Boxes are aligned to the center of the row axis&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-items: stretch;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ALHT_0d-SNqYlRhpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ALHT_0d-SNqYlRhpq.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: Boxes stretched across the entire row axis&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Automated &lt;a href="https://www.lambdatest.com/blog/automated-functional-testing-what-it-is-how-it-helps/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Functional Testing&lt;/a&gt;: What it is &amp;amp; How it Helps?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  align-items
&lt;/h3&gt;

&lt;p&gt;The align-items property is used to align the grid items along the column axis or block axis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;start:&lt;/strong&gt; aligns grid items vertically to the start of the column cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**end: **aligns grid items vertically to the end of the column cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;center:&lt;/strong&gt; aligns grid items vertically at the center of the column cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;stretch:&lt;/strong&gt; stretch the grid items across the entire column filling the whole cell’s height. This is the default value.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below are the examples of each value:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-items: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AocSsV9FktVHyHB1w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AocSsV9FktVHyHB1w.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: Boxes aligned to the top of the column axis&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-items: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AwB4FMEd-79FrQDNm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AwB4FMEd-79FrQDNm.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: Boxes aligned to the bottom of the column axis&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-items: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AXMahZQv473VudxUs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AXMahZQv473VudxUs.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: Boxes are aligned at the center of the column axis.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-items: stretch;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AMk5Aeiv_aGaRi59N.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AMk5Aeiv_aGaRi59N.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: Boxes are stretched across the column axis, filling the entire column height.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  place-items
&lt;/h3&gt;

&lt;p&gt;The place-items property is a shorthand for justify-items and align-items properties. It means you can set both the justify-items and align-items properties in a single declaration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first value sets justify-items, and the second value sets align-items. If there’s only one value, it is set as the value of both properties.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;container{
  display:grid;
  place-items:center;
  background-color: #a2d2ff;
  padding: 60px;
  }
  .grid-item {
    background-color: #fefae0;
    font-size: 20px;
    padding: 15px;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  place-items:center;
  background-color: #a2d2ff;
  padding: 60px;
  }
  .grid-item {
    background-color: #fefae0;
    font-size: 20px;
    padding: 15px;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, the grid item is centered horizontally and vertically.&lt;/p&gt;
&lt;h3&gt;
  
  
  Justify-content
&lt;/h3&gt;

&lt;p&gt;The justify-content property aligns the entire grid inside the container along the row(inline) axis.&lt;/p&gt;

&lt;p&gt;It is important to note that for justify-content to work, the grid’s total width has to be less than the container’s width.&lt;/p&gt;

&lt;p&gt;Suppose there is a box named box &lt;strong&gt;A&lt;/strong&gt;, and you put another box named box &lt;strong&gt;B&lt;/strong&gt; into it. To move box &lt;strong&gt;B&lt;/strong&gt; inside box &lt;strong&gt;A&lt;/strong&gt;, box &lt;strong&gt;B&lt;/strong&gt; must be smaller than box &lt;strong&gt;A&lt;/strong&gt;, right?&lt;/p&gt;

&lt;p&gt;If it is not smaller, it will fill the box, and you can’t move it. It’s the same concept behind this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;start:&lt;/strong&gt; aligns the grid at the beginning of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;end:&lt;/strong&gt; aligns the grid at the end of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;center:&lt;/strong&gt; aligns the grid in the middle of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;stretch:&lt;/strong&gt; resizes the grid items to make the grid fill the entire width of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;space — around:&lt;/strong&gt; gives inner grid items equal space between them. The first and last items will be allocated half the space.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;space — between:&lt;/strong&gt; gives grid items equal space between them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;space — evenly:&lt;/strong&gt; gives grid items equal space between and around them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s look at the examples of each value to understand them better:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AVVfeK85Le2O2vorJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AVVfeK85Le2O2vorJ.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: The grid is aligned at the start of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ARXndn4dqQm-KZpjE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ARXndn4dqQm-KZpjE.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: The grid is aligned at the end of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Av2GEwKo5g4MvzhYO.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Av2GEwKo5g4MvzhYO.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: The grid is aligned in the middle of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: stretch;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AoAcaEH1h6M81veL-.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AoAcaEH1h6M81veL-.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: The grid items are resized, making the grid take the full width of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: space-around;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AyqwOKUNkQkvVW61x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AyqwOKUNkQkvVW61x.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 5: The inner grid columns have equal space between them. The first and last column is allocated half the space around them.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: space-between;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AVeGzDPQR9Fsd4X3x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AVeGzDPQR9Fsd4X3x.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 6: The grid items have an equal amount of space between them.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  justify-content: space-evenly;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AR8kjfKThreJF8W20.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AR8kjfKThreJF8W20.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 7: The grid items have equal space between and around them.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  align-content
&lt;/h3&gt;

&lt;p&gt;The align-content property is used to align the entire grid inside the container along the column(block) axis. This property is used to align the whole grid inside the container vertically.&lt;/p&gt;

&lt;p&gt;Note that the grid’s total height has to be less than the height of the container for the align-content property to have any effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;start:&lt;/strong&gt; aligns the rows at the beginning of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**end: **aligns the rows at the end of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;center:&lt;/strong&gt; aligns the rows in the middle of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;stretch:&lt;/strong&gt; resizes the grid items to make the grid fill the entire height of the grid container.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;space — around:&lt;/strong&gt; gives rows an equal amount of space around them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;space — between:&lt;/strong&gt; gives rows equal space between them.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;space — evenly:&lt;/strong&gt; gives rows equal space between and around them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s look at the examples of each value:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-content: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ABNB2o57gYNODB8-N.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ABNB2o57gYNODB8-N.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: The grid is aligned at the top of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-content: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ALmagxByq6DZ_VfTb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2ALmagxByq6DZ_VfTb.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: The grid is aligned at the bottom of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-content: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AlmcUzgNXkQpScPaA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AlmcUzgNXkQpScPaA.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: The grid is aligned in the middle of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-content: stretch;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AievKGPkzW0QNuwjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AievKGPkzW0QNuwjg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: The grid items are resized, making the grid take the entire height of the grid container.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-content: space-around;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Ay1eR-wZ2MK5g_rrW.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Ay1eR-wZ2MK5g_rrW.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 5: The rows have an equal amount of space around them. First and second row have half the space around them.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  align-content: space-evenly;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A4hENPmhb9g9GMbPG.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A4hENPmhb9g9GMbPG.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 6: The rows have an equal amount of space between and around them.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`.container {
  align-content: space-between;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AgE-ofALTs9qFkdEr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AgE-ofALTs9qFkdEr.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 7: The rows have an even amount of space between them.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  place-content
&lt;/h3&gt;

&lt;p&gt;The place-content property is a shorthand for align-content and justify-content properties. It takes two values and sets both align-content and justify-content properties in a single declaration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first value sets align-content, and the second value sets justify-content. If there’s only one value, it is set as the value of both properties.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
     &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    place-content: center end;
    grid-template-columns: repeat(3,150px);
    background-color: #a2d2ff;
    padding: 60px;
    gap:30px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
     &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
      &amp;lt;div class="grid-item"&amp;gt;Grid Item&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    place-content: center end;
    grid-template-columns: repeat(3,150px);
    background-color: #a2d2ff;
    padding: 60px;
    gap:30px;
    }
    .grid-item {
     text-align:center;
     border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 20px;
    background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example above, the place-content property has a value of center which positions grid items to the middle vertically and end positions grid items to the end of the grid container horizontally.&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-auto-* (*-columns/rows/flow)
&lt;/h3&gt;

&lt;p&gt;These properties let you define the implicit grid. Now, you might be wondering what an implicit grid track is.&lt;/p&gt;

&lt;p&gt;Generally, we create a grid explicitly by creating columns and rows with the grid-template-columns and grid-template-rows properties.&lt;/p&gt;

&lt;p&gt;When there is insufficient space for grid items in the explicit grid, an implicit grid is created to position those items outside the explicit grid. Those items are then automatically placed in the implicit grid.&lt;/p&gt;

&lt;p&gt;This auto-placement is done by an algorithm named auto-placement algorithm.&lt;br&gt;
The grid-auto-flow property controls how the algorithm places the items in the grid.&lt;/p&gt;

&lt;p&gt;The values of the grid-auto-flow property are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;row:&lt;/strong&gt; places items row by row. This is the default.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;column:&lt;/strong&gt; places items column by column.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;dense:&lt;/strong&gt; sets the auto-placement algorithm to attempt to fill in holes earlier in the grid if smaller items come up later.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is important to note that &lt;strong&gt;dense&lt;/strong&gt; only changes the visual order of grid items. In turn, it might cause them to appear out of order which is bad for accessibility.&lt;/p&gt;

&lt;p&gt;To specify the size of the implicit grid tracks, you use grid-auto-columns and grid-auto-rows properties.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-columns:80px 120px;
  grid-auto-flow:column;
  grid-auto-columns:1fr;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17,0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
      display:grid;
      grid-template-columns:80px 120px;
      grid-auto-flow:column;
      grid-auto-columns:1fr;
      background-color: #a2d2ff;
      padding: 30px;
      gap:10px;
      }

      .grid-item {
      text-align:center;
      border: 1px solid rgba(17, 17, 17,0.8);
      padding: 18px;
      font-size: 28px;
      background-color: rgba(255, 255, 255, 0.8);
      }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In this example, we have only defined the sizes of the first 2 column tracks as &lt;em&gt;80px&lt;/em&gt; and &lt;em&gt;120px&lt;/em&gt; wide. But we have 4 items. So an implicit grid gets created to place the &lt;em&gt;3rd&lt;/em&gt; and &lt;em&gt;4th&lt;/em&gt; items.&lt;/p&gt;

&lt;p&gt;The grid-auto-flow property places the items column by column, and the grid-auto-columns property specifies the size of the column tracks, which is 1fr in this case.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-rows:60px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows:120px;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17,0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;1&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
        &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-rows:60px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows:120px;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17,0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example, we defined only one row track to be 60px. So, items 1 and 2 have a height of &lt;em&gt;60px&lt;/em&gt;. The second-row track is then auto-created to make space for items 3 and 4 in the implicit grid. So, the grid-auto-rows property specifies the height of row tracks is *120px *in this case.&lt;/p&gt;
&lt;h3&gt;
  
  
  grid
&lt;/h3&gt;

&lt;p&gt;The grid property is a shorthand for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;grid-template-rows&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-template-columns&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-template-areas&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-auto-rows&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-auto-columns&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-auto-flow&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Note that you can only specify the implicit or explicit grid properties in a single declaration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;**none: **it is the default value. No specific size is mentioned for rows or columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;grid-template-rows / grid-template-columns:&lt;/strong&gt; it is used to specify the size of the rows and columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;grid-template-areas:&lt;/strong&gt; specifies the grid layout using named items.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;grid-template-rows / grid-auto-columns:&lt;/strong&gt; specifies the size (height) of the rows and the auto size of the columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;grid-auto-rows / grid-template-columns:&lt;/strong&gt; specifies the auto size of the rows and sets the grid-template-columns as specified.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;grid-template-rows / grid-auto-flow grid-auto-columns:&lt;/strong&gt; specifies how to place items and auto-size rows and columns.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**grid-auto-flow grid-auto-rows / grid-template-columns: **specifies how to place items and auto-size row and grid-template columns.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Examples:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
      display: grid;
      grid: 120px auto 200px / repeat(2, 1fr) 150px;
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The above example creates three explicit rows of &lt;em&gt;120px&lt;/em&gt;, auto, and &lt;em&gt;200px&lt;/em&gt;. Then using the repeat() function, it creates two columns of &lt;em&gt;1fr&lt;/em&gt; and one of &lt;em&gt;150px&lt;/em&gt;.&lt;br&gt;
It’s equivalent to this longer version:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    display: grid;
    grid-template-rows: 100px auto 300px;
    grid-template-columns: repeat(2, 1fr) 100px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The following two code blocks are same:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    grid: auto-flow / 100px 2fr;
  }
  .container {
    grid-auto-flow: row;
    grid-template-columns: 100px 2fr;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;The following two code blocks are also same:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
    grid: [row1-start] "header header header" 2fr [row1-end]
          [row2-start] "footer footer footer" 30px [row2-end]
          / auto 60px auto;
  }

.container {
    grid-template-areas:
      "header header header"
      "footer footer footer";
    grid-template-rows: [row1-start] 2fr [row1-end row2-start] 30px [row2-end];
   grid-template-columns: auto 60px auto;    
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Cross &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Browser&lt;br&gt;
Test&lt;/a&gt; Cloud- Browser &amp;amp; app testing cloud to perform both exploratory and automated testing across 3000+ different browsers, real devices and operating systems.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Properties for Grid Items
&lt;/h2&gt;

&lt;p&gt;Similar to grid containers, CSS also provides a number of properties to work with grid items, which allow you to have more control over them.&lt;/p&gt;

&lt;p&gt;Below we discuss these properties:&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-row-* and grid-column-*
&lt;/h3&gt;

&lt;p&gt;These properties determine the location of grid items by specifying where to start and where to end the item in grid lines. grid-row-start and grid-column-start specify the line where the item begins. Similarly, grid-row-end and grid-column-end specify the line where the item ends.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;line:&lt;/strong&gt; takes a number to refer to a grid line or a name to refer to a named grid line.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**span: **takes a number or a name. The item will span across the specified number of grid tracks when it takes a number. Whereas, in the case of name, the item will span across until it hits the line with the specified name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;auto:&lt;/strong&gt; specifies that the property does not do anything to the grid item’s placement, indicating auto-placement, an automatic span, or a default span of 1.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item-one {
  grid-column-start: 2;
  grid-column-end: five;
  grid-row-start: row2-start;
  grid-row-end: 4;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AHUlgding0DrrrJom.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AHUlgding0DrrrJom.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the column axis, the grid item starts from column line 2 and ends at column line 5. In the row axis, it starts from row line 2 and ends at row line 4.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item-two {
    grid-column-start: 1;
    grid-column-end: span col5-start;
    grid-row-start: 1;
    grid-row-end: span 3;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A2g4txfGeXPAGrb2Y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A2g4txfGeXPAGrb2Y.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In the column axis, the grid item starts from column line 1 and ends at column line 5. In the row axis, it starts from row line 1 and ends at row line 3.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If grid-column-end or grid-row-end is not declared, the item will span 1 track by default.&lt;/p&gt;
&lt;h3&gt;
  
  
  Grid-column and grid-row
&lt;/h3&gt;

&lt;p&gt;The grid-column property is a shorthand property for grid-column-start and grid-column-end.&lt;/p&gt;

&lt;p&gt;The grid-row property is a shorthand property for grid-row-start and grid-row-end.&lt;/p&gt;

&lt;p&gt;They accept all the values that longhand property accepts.&lt;/p&gt;

&lt;p&gt;An example of a grid-column property is shown below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
          &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt;    
       &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-columns: auto auto auto;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
  #item-one{
    grid-column:1/span 2;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
    &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
    &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt;    
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
  display:grid;
  grid-template-columns: auto auto auto;
  background-color: #a2d2ff;
  padding: 30px;
  gap:10px;
  }
  .grid-item {
  text-align:center;
  border: 1px solid rgba(17, 17, 17,0.8);
  padding: 18px;
  font-size: 28px;
  background-color: rgba(255, 255, 255, 0.8);
  }
#item-one{
  grid-column:1/span 2;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example, item one starts at column &lt;em&gt;1 and spans across column 2&lt;/em&gt;. As soon as it hits the &lt;em&gt;end of column 2&lt;/em&gt;, it stops.&lt;/p&gt;

&lt;p&gt;An example of the grid-row property is shown below:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
          &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt;    
       &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-columns: auto auto auto;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
  #item-one{
    grid-row:1/3;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt; 
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-columns: auto auto auto;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
  #item-one{
    grid-row:1/3;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example, item one starts at line 1, and as soon as it hits line 3, it ends.&lt;/p&gt;

&lt;p&gt;In both properties, if the end is not defined, the item spans 1 track by default.&lt;/p&gt;
&lt;h3&gt;
  
  
  grid-area
&lt;/h3&gt;

&lt;p&gt;The grid-area property assigns a name to a grid item which then can be referenced by the grid-template-areas property of the grid container.&lt;/p&gt;

&lt;p&gt;This property can also be used as a shorthand property for&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;grid-row-start&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-column-start&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-row-end&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;grid-row-end&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;name:&lt;/strong&gt; a name of your choice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;row-start / column-start / row-end / column-end:&lt;/strong&gt; same values as the longhand property of each.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An example of a grid-area to assign a &lt;strong&gt;name&lt;/strong&gt; is shown below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
        &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt;    
       &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-areas:
  'firstItem firstItem firstItem';
   grid-template-columns: 1fr 1fr 1fr;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
  #item-one{
  grid-area:firstItem;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;HTML:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
  &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
  &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt;  
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;CSS:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
   grid-template-columns:auto auto auto;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
  #item-one{
  grid-area: 2 / 1 / span 2 / span 2;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example, item one is assigned a name with grid-area property. grid-template-areas in the grid container, then reference to the name. Referencing the name &lt;em&gt;3 times&lt;/em&gt; makes the item take &lt;em&gt;3 columns&lt;/em&gt; filling the entire track.&lt;br&gt;
An example of a grid-area as the shorthand for grid-row-start, grid-column-start,grid-row-end, and grid-column-end is shown below:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTML:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="container"&amp;gt;
          &amp;lt;div class="grid-item"id="item-one"&amp;gt;1&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;2&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;3&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;4&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;5&amp;lt;/div&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;6&amp;lt;div&amp;gt;    
       &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;CSS:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container{
    display:grid;
    grid-template-columns: auto auto auto;
    background-color: #a2d2ff;
    padding: 30px;
    gap:10px;
    }
    .grid-item {
    text-align:center;
    border: 1px solid rgba(17, 17, 17,0.8);
    padding: 18px;
    font-size: 28px;
    background-color: rgba(255, 255, 255, 0.8);
    }
  #item-one{
    grid-area: 2 / 1 / span 2 / span 2;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;In the example, item one starts at &lt;em&gt;row 2&lt;/em&gt; and &lt;em&gt;column 1&lt;/em&gt;. Then, it spans to &lt;em&gt;row 2&lt;/em&gt; and &lt;em&gt;column 2&lt;/em&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  justify-self
&lt;/h3&gt;

&lt;p&gt;Each grid item has a cell of its own. By default, grid items get placed in their cell filling the entire width of the cell. The justify-self property aligns a grid item inside a cell along the row axis. A grid item located inside of a single cell is affected by this value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;start:&lt;/strong&gt; aligns the grid item at the start of the cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;end:&lt;/strong&gt; aligns the grid items at the end of the cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;center:&lt;/strong&gt; aligns the grid item in the center of the cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;stretch:&lt;/strong&gt; stretch the grid item across the entire cell filling the entire width of the cell. This is the default value.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below are the examples of each value:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  justify-self: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AsmXYF3KJRQQZM8My.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AsmXYF3KJRQQZM8My.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 1: The highlighted grid item is aligned to the start of the cell.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  justify-self: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AfpCiAB17fVzcssTE.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AfpCiAB17fVzcssTE.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 2: The highlighted grid item is aligned to the end of the cell.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  justify-self: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AYw77pIh76Z3dtLid.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AYw77pIh76Z3dtLid.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 3: The highlighted grid item is aligned in the middle of the cell.&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  justify-self: stretch;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AKCyRNmPvm-Lum41u.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AKCyRNmPvm-Lum41u.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Figure 4: The highlighted grid item is stretched across the entire cell width.&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  align-self
&lt;/h3&gt;

&lt;p&gt;The align-self property aligns a grid item inside a cell along the column axis. This value applies to the content inside a single grid item.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;start:&lt;/strong&gt; aligns the grid item at the start of the cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;end:&lt;/strong&gt; aligns the grid items at the end of the cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;**center: **aligns the grid item in the center of the cell.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;stretch:&lt;/strong&gt; stretch the grid item across the entire cell filling the entire height of the cell. This is the default value.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below are the examples of each value:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  align-self: start;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AgWFgI11Ub4lw4BVm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AgWFgI11Ub4lw4BVm.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 1: The highlighted grid item is aligned to the start of the cell vertically.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  align-self: end;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AaW8oRTeMuniBIoN4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AaW8oRTeMuniBIoN4.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 2: The highlighted grid item is vertically aligned to the end of the cell.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  align-self: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_v-Yf-m6IIhv1vDc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A_v-Yf-m6IIhv1vDc.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 3: The highlighted grid item is aligned vertically to the center of the cell.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  align-self: stretch;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AC2Xw0UflCkcSYX3L.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AC2Xw0UflCkcSYX3L.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Figure 4: The highlighted grid item is stretched across the cell filling the entire height of the cell.&lt;/p&gt;

&lt;p&gt;To apply this behavior to every single item in a grid, you can also use the align-items property on the grid container.&lt;/p&gt;
&lt;h3&gt;
  
  
  place-self
&lt;/h3&gt;

&lt;p&gt;The place-self property lets you align an individual item in both the block(column) and inline(row) directions at once. It is a shorthand property for align-self and justify-self.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Values:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The first value sets align-self, and the second value sets justify-self. If there’s only one value, it is set as the value of both properties.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;auto — sets the default alignment for the layout.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An example of this property is shown below:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.item {
  place-self: center stretch;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAY0lbj2OF4K-9Lze.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AAY0lbj2OF4K-9Lze.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Subgrid
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Subgrid&lt;/strong&gt; is an extremely important addition to CSS Grid that allows your grid items to have a grid of their own and it inherits grid lines from the parent grid.&lt;/p&gt;

&lt;p&gt;Below is an example of how to create a subgrid:&lt;/p&gt;

&lt;p&gt;First, create a grid as usual.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div class="main-grid-container"&amp;gt;
            &amp;lt;div class="grid-item"&amp;gt;
              &amp;lt;div class="subgrid-item"&amp;gt;&amp;lt;/div&amp;gt;
              &amp;lt;div class="subgrid-item"&amp;gt;&amp;lt;/div&amp;gt;
            &amp;lt;/div&amp;gt;
   &amp;lt;/div&amp;gt;

.main-grid-container {
    display: grid;
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Then, set a grid item to &lt;strong&gt;grid&lt;/strong&gt;.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.grid-item {
    display: grid;
    grid-template-columns: subgrid;
    grid-template-rows: subgrid;
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Although this is a handy feature, it is not widely supported by browsers yet.&lt;/p&gt;

&lt;p&gt;Again, browsers are constantly changing, so maybe all browsers will support the subgrid soon.&lt;/p&gt;

&lt;p&gt;The browser compatibility of &lt;a href="https://www.lambdatest.com/blog/what-is-css-subgrid/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;CSS Subgrid&lt;/a&gt; is shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2048%2F0%2A_rrCyFXBxQAlWxai.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2048%2F0%2A_rrCyFXBxQAlWxai.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/selenium?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; Tutorial: A Complete Guide on Selenium Automation Testing&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Browser support for CSS Grid
&lt;/h2&gt;

&lt;p&gt;Until March 2017, browser support for CSS Grid was almost non-existent. But in March of 2017, the first time, a major specification like CSS Grid was shipped into at least 6 major browsers simultaneously for the first time.&lt;/p&gt;

&lt;p&gt;Today, we have Grid Layout support in almost all major browsers. However, there are still very few outdated and non-supporting browsers. To support it in those browsers, refer to this resource.&lt;/p&gt;

&lt;p&gt;While CSS Grid has been adopted by all modern browsers, it’s still important to check cross browser compatibility to make sure your website works seamlessly across different browsers.&lt;/p&gt;

&lt;p&gt;Shown below is the &lt;a href="https://www.lambdatest.com/feature?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;cross browser compatibility&lt;/a&gt; of CSS Grid by LambdaTest Web technology compatibility generator. To know how your CSS grids are performing over different browsers and OS combinations, you can use LambdaTest &lt;a href="https://www.lambdatest.com/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;cross browser testing&lt;/a&gt; platform to test your CSS Grids for compatibility on an &lt;a href="https://www.lambdatest.com/online-browser-farm?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;online browser farm&lt;/a&gt; of 3000+ real browsers and OS combinations.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2048%2F0%2ATk8-WFYNzYTgh4qq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2048%2F0%2ATk8-WFYNzYTgh4qq.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Run Automated &lt;a href="https://www.lambdatest.com/playwright-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt; Tests Online- Run your Playwright test scripts instantly on 50+ browser and OS combinations using the LambdaTest cloud.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Is your CSS Grid responsive?
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://www.lambdatest.com/blog/best-practices-for-responsive-websites/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;responsive website&lt;/a&gt; is a website that adapts to different screen sizes and formats. This can be achieved in a number of ways, but one of the most popular is CSS Grid. It’s not just for mobile devices either; it can also be used for layouts on big screens like laptops and desktops.&lt;/p&gt;

&lt;p&gt;Performing tests to check responsiveness can be time-consuming. However, tools like &lt;a href="https://www.lambdatest.com/lt-browser?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;LT Browser&lt;/a&gt; makes it much easier. LT Browser by LambdaTest is a &lt;a href="https://www.lambdatest.com/mobile-friendly-test?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;mobile-friendly test&lt;/a&gt; tool that comes with 50+ pre-installed viewports with multiple standard resolutions. Additionally, LT Browser offers sophisticated developer tools for testing.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/K1dlmU3QWWk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: A Complete &lt;a href="https://www.lambdatest.com/learning-hub/end-to-end-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;End to End (E2E) Testing&lt;/a&gt; Tutorial: Comprehensive Guide With Examples and Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also Subscribe to the &lt;a href="https://www.youtube.com/channel/UCCymWVaTozpEng_ep0mdUyw?sub_confirmation=1" rel="noopener noreferrer"&gt;LambdaTest YouTube Channel&lt;/a&gt; and stay updated with the latest tutorials around &lt;a href="https://www.lambdatest.com/automated-browser-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;automated browser testing&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/selenium-automation?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Selenium testing&lt;/a&gt;, &lt;a href="https://www.lambdatest.com/cypress-e2e-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Cypress E2E testing&lt;/a&gt;, CI/CD, and more.&lt;/p&gt;

&lt;p&gt;Below are some of the top-notch features of LT Browser that, as a developer, I love to have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Device sync feature to scroll on two devices simultaneously.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.lambdatest.com/blog/test-mobile-websites-on-different-network-conditions/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Network throttling&lt;/a&gt; feature to test websites on different networks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://www.lambdatest.com/full-page-screen-capture?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=webpage" rel="noopener noreferrer"&gt;Capturing full-page screenshots&lt;/a&gt; of the web page.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generating &lt;a href="https://www.lambdatest.com/blog/google-lighthouse-lt-browser/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;performance reports powered by Google Lighthouse&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Video recording of a running test session, and much more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: Automated &lt;a href="https://www.lambdatest.com/blog/automated-functional-testing-what-it-is-how-it-helps/?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=blog" rel="noopener noreferrer"&gt;Functional Testing&lt;/a&gt;: What it is &amp;amp; How it Helps?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Differences between Flexbox and CSS Grid Layout
&lt;/h2&gt;

&lt;p&gt;Flexbox is designed for one-dimensional layouts. It means **Flexbox **can either work on rows or columns at a time. But **Grid **is made for two-dimensional layouts which means it can work on both rows and columns.&lt;/p&gt;

&lt;p&gt;Let’s look briefly at what &lt;strong&gt;CSS Grid&lt;/strong&gt; allows you to do that **Flexbox **does not.&lt;/p&gt;

&lt;p&gt;Below is an illustration of a possible &lt;strong&gt;CSS Grid&lt;/strong&gt; layout:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AIbUFuhxdvzBNSKNl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2AIbUFuhxdvzBNSKNl.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now look at another illustration of a possible &lt;strong&gt;flexbox&lt;/strong&gt; layout:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A3AzlEr-yUV0JwGpg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2A3AzlEr-yUV0JwGpg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Flexbox allows you to achieve a layout that is one-dimensional — either horizontal or vertical. But a grid allows you to create complex layouts which are multi-dimensional, involving both horizontal and vertical flow.&lt;/p&gt;

&lt;p&gt;In fact, flexbox is mostly used in combination with CSS Grid to create layouts.&lt;br&gt;
Here are two instances of well-known websites that use CSS Grids and flexboxes and in their layouts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Au4gLq7EAC-8SGfU1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2Au4gLq7EAC-8SGfU1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Codepen uses CSS Grid in the layout&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AnLqGDnAejXJHBLQ7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F3200%2F0%2AnLqGDnAejXJHBLQ7.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Amazon uses CSS Flexbox in its layout&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Aq4XaGgZ7dafKjXAM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F2000%2F0%2Aq4XaGgZ7dafKjXAM.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Check this out: &lt;a href="https://www.lambdatest.com/learning-hub/black-box-testing?utm_source=devto&amp;amp;utm_medium=organic&amp;amp;utm_campaign=dec09_sd&amp;amp;utm_term=sd&amp;amp;utm_content=learning_hub" rel="noopener noreferrer"&gt;Blackbox Testing&lt;/a&gt; Tutorial: A Comprehensive Guide With Examples and Best Practices&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping it up!
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CSS Grid&lt;/strong&gt; is the most important CSS module for creating modern web layouts. And now you know everything about it. Give yourself a pat on the back for making it to the end!&lt;/p&gt;

&lt;p&gt;It’s time for you to go and create some amazing web pages!&lt;/p&gt;

&lt;p&gt;Happy building!!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>css</category>
    </item>
  </channel>
</rss>
