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.
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.
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.
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.
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.
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.
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.
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.
If you want to use beautiful effects for texts and make your Website more eye-catching, read our snippet, try examples and learn to create fade out text effect.
On this page, you will find out how to add a fixed-width column with the help of CSS Flexbox. To achieve this, you need to use the flex or flex-basis property.
How to add border as a frame for images. Also add image borders to images. See also Circle and Round frames. All with examples.
If you want to make your website eye-catching and creative read this snippet and learn to create a glass background effect for your text step by step.
To add a print button to a web page using PHP, you can use the following steps:
In this snippet, we’ll show how to add a vertical line on the left and right sides, as well as how to center it and how to add a vertical line before a text.
If you have faced the problem of drawing a vertical text, you can use the transform property. Find out how to use this property to create a vertical text with CSS Cross-Browser.
Hover effects can create powerful effects when applied to the images. Learn how to make advanced image hover effects with CSS and see examples!
Know how to put an animated text over a faded image on hover using only CSS3. For that purpose, use the transition and the opacity properties. See examples!
In this snippet, we’ll demonstrate how to add an onclick event in CSS. The best way of creating an onclick effect is using the well-known checkbox hack.
A CSS comment is used to give explanatory information to the code or to prevent the browser from trying to interpret particular parts of the style sheet.
To add background image to your HTML document you should use CSS styles.
If you need to place a border inside a <div> element, you are in the right place. In this snippet, you can find out how to do it using some CSS properties.
Learn about how to add border to an image, how to add styling to it and how to specify each corner and have circle borders. Practice all with examples.
If you want to make your website more attractive, read this snippet and learn how to add both a background-image and CSS3 gradient to the same element.
Using icons is great for every website. If you face the difficulty of adding color to Bootstrap icons, add the CSS color property. Change also the font-size.