Articles on Trending Technologies

Technical articles with clear explanations and examples

How to create image magnifier using?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 1K+ Views

An image magnifier allows users to zoom in on pictures for a closer inspection, enhancing user experience and adding a professional touch to your website. Using HTML and CSS, you can create powerful image magnifiers that captivate users and improve visual engagement. Approach We will explore two different methods to create image magnifiers − Rollover/Follow zoom effect − Shows magnified content in a separate preview area Magnifying glass effect − Creates a lens-like zoom overlay on the image Method 1: Rollover/Follow Zoom Effect This technique magnifies a segment of the image in a ...

Read More

How to Create Image Lightbox Gallery using HTML CSS and JavaScript?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 4K+ Views

An image lightbox gallery is a web feature that displays images in an enlarged overlay format, allowing users to view images without navigating away from the main page. When a user clicks on a thumbnail image, it opens in a modal window with navigation controls and a close button. Syntax /* Gallery container */ .gallery { display: flex; flex-wrap: wrap; justify-content: center; } /* Lightbox overlay */ .lightbox { display: none; position: fixed; ...

Read More

How to Create Image Hovered Detail using HTML & CSS?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 1K+ Views

Creating image hover effects with detailed text overlays adds interactivity and visual appeal to your website. By combining HTML structure with CSS styling, you can create engaging hover animations that reveal additional information when users move their cursor over images. Syntax selector:hover { property: value; } The :hover Selector The CSS :hover selector is used to select and style an element when the user hovers their mouse over it. It works in combination with other selectors to target specific HTML elements and apply styles when the cursor is positioned over ...

Read More

How to create Image Folding Effect using HTML and CSS?

Aayush Mohan Sinha
Aayush Mohan Sinha
Updated on 15-Mar-2026 1K+ Views

The Image Folding Effect is a popular CSS technique that creates a visually appealing paper-folding animation on images. This effect divides an image into segments that skew when hovered, simulating the appearance of folded paper. It's achieved using CSS transforms and the :nth-child selector. Transform Property The CSS transform property applies 2D or 3D transformations to elements. It can move, rotate, scale, and skew elements without affecting the document flow. Syntax transform: function(value); Common transform functions: translate() − moves an element along the x and y axis. rotate() − rotates an ...

Read More

Add a row at top in pandas DataFrame

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 2K+ Views

Adding a row at the top of a Pandas DataFrame is a common operation when you need to insert headers, summary rows, or new data at the beginning. There are several methods to achieve this − using pd.concat(), loc[] with index manipulation, or iloc slicing. Create a Sample DataFrame import pandas as pd df = pd.DataFrame({ 'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35], 'City': ['Delhi', 'Mumbai', 'Pune'] }) print("Original DataFrame:") print(df) Original DataFrame: Name ...

Read More

How to select all children of an element except the last child using CSS?

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

To select all children of an element except the last child using CSS we will be understanding two different approaches. Each approach will be using CSS pseudo-class selectors to perform the required task. In this article, we'll see how to select all children of an element except the last child in CSS with different approaches. We will be discussing each approach in detail with examples that will help you understand how they work. Syntax /* Method 1: Using :not() pseudo-class */ parent > *:not(:last-child) { /* styles */ } /* Method ...

Read More

How to select all child elements recursively using CSS?

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

To select all child elements recursively using CSS, we use the universal selector (*) with a parent selector. This technique allows you to target all descendant elements, regardless of their nesting level. Syntax /* Select direct children only */ .parent > * { property: value; } /* Select all descendants recursively */ .parent * { property: value; } Example 1: Direct Child Elements Only This example selects only the direct children of the parent container using the child combinator (>) − ...

Read More

Absolute and Relative frequency in Pandas

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 1K+ Views

In statistics, frequency indicates how many times a value appears in a dataset. Absolute frequency is the raw count, while relative frequency is the proportion (count divided by total observations). Pandas provides built-in methods for calculating both. Absolute Frequency Using value_counts() The simplest way to count occurrences of each value ? import pandas as pd data = ["Chandigarh", "Hyderabad", "Pune", "Pune", "Chandigarh", "Pune"] df = pd.Series(data).value_counts() print(df) Pune 3 Chandigarh 2 Hyderabad 1 dtype: int64 ...

Read More

How to set indent the second line of paragraph using CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 3K+ Views

The CSS text-indent property is typically used to indent the first line of a paragraph. However, to create a hanging indent effect where the second and subsequent lines are indented instead of the first line, you need to combine negative text-indent with positive padding-left. Syntax selector { text-indent: negative-value; padding-left: positive-value; } How It Works To indent the second line of a paragraph, we use a two-step approach − Negative text-indent: Moves the first line to the left Positive padding-left: Moves the entire paragraph ...

Read More

How to set div width to fit content using CSS?

Shabaz Alam
Shabaz Alam
Updated on 15-Mar-2026 53K+ Views

To set div width to fit content using CSS is an important task for creating responsive designs and optimal space usage. By default, div elements take the full available width, but we can make them shrink to fit their content. Syntax div { width: max-content; /* or fit-content */ } /* Alternative approach */ div { display: inline-block; } Method 1: Using max-content Width Property The max-content value sets the width to the maximum intrinsic width of the content, allowing the div to expand ...

Read More
Showing 19841–19850 of 61,299 articles
Advertisements