How-to articles, tricks, and solutions about CSS
Add class="active" to active page using PHP
You can add the "active" class to the active page using PHP by comparing the current URL to the URL of the page you want to mark as active.
The console.log() method outputs a message to the web console. Read the tutorial and learn the simplest method of putting a single or multiple styles to it.
How and When to Use !important Rule in CSS
Learn how and why to use the !important rule in your CSS styles. See what cases are recommended and where is the right place to use it.
How Not to Wrap the Contents of <p>, <div>, and <span> Elements
In this snippet, we want to demonstrate how you can make the contents of the <p>, <div>, and <span> elements not to wrap. Use the CSS white-space property.
How to Add a Background-Color for the Text Width Instead of the Entire Element Width
On this page, you will find how to set a background-color for the text width instead of the width of the entire element. Choose the appropriate method and try examples.
How to Add a Blur Filter to the Background Image
Learn How to Apply a Blur Filter to a Background Image with W3docs tutorial. Follow up the steps and create a blurred background image for your website.
How to Add a Border Inside the Table
Read this snippet if you have faced the difficulty of setting a border inside the table. In this tutorial, we suggest two methods of overcoming this problem.
How to Add a Border-Bottom to the Table Row
In this tutorial, we want to demonstrate how you can add a border only to the bottom of the table row. Read and find out what CSS property you need for this.
How to Add a Circle Around a Number in CSS
Adding a circle around a number can be easily done with CSS. This can be done using the border-radius property. Read our snippet and find the solution.