Web Development Articles

Page 560 of 801

How to style scrollbar thumb for the webkit browsers and what are components of scrollbar?

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 947 Views

Scrollbars are essential UI components that allow users to navigate through content that extends beyond the visible area. Webkit-based browsers (Chrome, Safari, Edge) provide special CSS pseudo-elements to style scrollbar components, including the draggable thumb handle. Syntax ::-webkit-scrollbar { width: value; } ::-webkit-scrollbar-thumb { background: color; border-radius: value; } ::-webkit-scrollbar-track { background: color; } Scrollbar Components Up Arrow ...

Read More

How to style label associated with selected radio input and checked checkboxes using CSS?

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 4K+ Views

To style label associated with selected radio input and checked checkboxes using CSS, is important task in forms as it makes it easy to identify the option selected by user. In this article, we will understand how to style label associated with selected radio input and checked checkboxes using CSS using :checked pseudo class selector and CSS combinators. Syntax /* Style label next to checked radio button */ input[type="radio"]:checked + label { /* CSS styles */ } /* Style label next to checked checkbox */ input[type="checkbox"]:checked + label { ...

Read More

How to style icon color, size, and shadow by using CSS

Tarun Singh
Tarun Singh
Updated on 15-Mar-2026 3K+ Views

Icons are an essential part of any website or application, as they provide users a quick and easy way to understand and interact with content. Using CSS, we can style icon color, size, and shadow to create a unique and visually appealing user experience instead of relying on default styling. In this article, we will learn different methods to style icons using CSS properties to customize their appearance. Syntax /* For Font Icons */ .icon { color: value; font-size: value; text-shadow: horizontal vertical blur ...

Read More

What is CSS sprites and how to implement them on a page?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 267 Views

CSS sprites are a technique used to reduce the number of HTTP requests by combining multiple images into a single image file. Instead of loading several individual images, the browser downloads one sprite sheet and displays different portions using CSS background-position property. Syntax .element { background-image: url('sprite-sheet.png'); background-position: x-offset y-offset; width: image-width; height: image-height; } Benefits of CSS Sprites The main advantages of using CSS sprites include − Reduced HTTP requests: Multiple images are loaded with ...

Read More

What is CSS Flexbox?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 201 Views

CSS flexbox is a powerful layout model that makes it easier to design flexible and responsive layouts. It allows you to arrange child items efficiently within a container and automatically adjusts item dimensions when content overflows. Syntax selector { display: flex; } Terminology of CSS Flexbox Understanding these key terms is essential for working with flexbox − Flex container − An HTML element with display: flex applied to it. Flex items − Direct children of the flex container that are arranged using flexbox properties. Main axis − The ...

Read More

What are the real world usage of CSS with SVG?

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 181 Views

CSS with SVG provides powerful styling capabilities for scalable vector graphics. SVG (Scalable Vector Graphics) are vector-based images created using mathematical functions rather than pixel grids, making them infinitely scalable without quality loss. When combined with CSS, SVG becomes a versatile tool for creating interactive, animated, and responsive graphics. Syntax /* Target SVG elements directly */ svg element { property: value; } /* Target SVG elements by class */ .svg-class { property: value; } /* Target SVG elements by ID */ #svg-id { ...

Read More

Various tricks for :before pseudo elements using position property in CSS

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 912 Views

The CSS :before pseudo-element allows you to insert content before an HTML element. When combined with the position property, you can precisely control where this content appears relative to its parent element, creating effects like custom icons, tooltips, notification badges, and styled form elements. Syntax selector:before { content: "text or symbol"; position: absolute | relative | fixed | static; top: value; left: value; right: value; bottom: value; } Example 1: Custom ...

Read More

Targeting only Firefox with CSS

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 5K+ Views

While developing web applications, developers must make them look consistent across all browsers. Some CSS properties are not supported by Firefox but work in other browsers like Chrome, Opera, etc. In such cases, we need to write CSS code that targets only the Firefox browser. In this article, we will learn two different methods to write CSS that targets only Firefox browsers. Syntax /* Method 1: Mozilla-specific CSS Extension */ @-moz-document url-prefix() { /* CSS code for Firefox only */ } /* Method 2: @supports Rule */ @supports(-moz-appearance:none) { ...

Read More

Logical Properties in CSS

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 350 Views

In CSS, logical properties allow developers to define styles based on the logical structure of the web page rather than the physical layout. This means you can apply CSS according to text direction or content flow, making your designs more adaptable to different languages and writing modes. Logical properties are primarily used to set HTML element's margin, padding, and border. They provide different variants of traditional margin, padding, and border properties that adapt to content flow direction. Syntax selector { property-block-start: value; property-inline-end: value; ...

Read More

Loading Text Animation Effect using CSS

Mohit Panchasara
Mohit Panchasara
Updated on 15-Mar-2026 2K+ Views

Loading text animations are essential for providing visual feedback to users while content loads. They improve user experience by indicating that something is happening in the background and keep users engaged during wait times. In this tutorial, we will learn to create different types of loading text animations using HTML and CSS. These animations are lightweight, smooth, and don't require JavaScript libraries. Syntax @keyframes animationName { 0% { /* starting properties */ } 50% { /* mid-point properties */ } 100% { /* ending ...

Read More
Showing 5591–5600 of 8,010 articles
« Prev 1 558 559 560 561 562 801 Next »
Advertisements