Front End Technology Articles

Page 528 of 652

Align the grid inside the container using CSS

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 172 Views

CSS Grid provides powerful alignment properties to position the entire grid inside its container. The justify-content property aligns the grid horizontally, while align-content aligns it vertically within the container. Syntax .grid-container { justify-content: value; /* Horizontal alignment */ align-content: value; /* Vertical alignment */ } Possible Values ValueDescription startAligns grid to the start of the container centerCenters the grid in the container endAligns grid to the end of the container space-betweenDistributes space between grid tracks space-aroundDistributes space around grid tracks space-evenlyDistributes ...

Read More

Create a responsive pagination with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 583 Views

Responsive pagination is a navigation component that adapts to different screen sizes while maintaining usability. This technique uses CSS to create pagination links that automatically adjust their layout and appearance across devices. Syntax .pagination { display: flex; justify-content: center; flex-wrap: wrap; } .pagination a { padding: value; margin: value; text-decoration: none; border: value; } @media (max-width: breakpoint) { /* Responsive styles */ } ...

Read More

Fade in on Button hover with CSS

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 879 Views

CSS fade-in effects on button hover create smooth visual transitions that enhance user interaction. This effect gradually increases a button's opacity from a lower value to full opacity when the user hovers over it. Syntax selector { opacity: initial-value; transition: duration; } selector:hover { opacity: final-value; } Example: Basic Fade-in on Hover The following example creates a button that fades in from 50% to full opacity on hover − ...

Read More

Set the width of a button with CSS

Rishi Rathor
Rishi Rathor
Updated on 15-Mar-2026 5K+ Views

The CSS width property is used to set the width of a button. By default, buttons size themselves based on their content, but you can control their width using CSS to create consistent button layouts. Syntax button { width: value; } Possible Values ValueDescription autoDefault value - button width adjusts to content lengthSets width using px, em, rem, etc. %Sets width as percentage of parent container max-contentWidth based on content size Example: Fixed Width Button The following example sets a button width to 150px with styling ...

Read More

Add a pressed effect on button click with CSS

Yaswanth Varma
Yaswanth Varma
Updated on 15-Mar-2026 3K+ Views

Adding a pressed effect on button click with CSS makes the user feel more interactive with the web page. It provides an immediate visual effect indicating that the button press has been registered, helping to improve the user experience. In this article, we have a button on our web page. Our task is to add a pressing effect while clicking the button using different CSS techniques. Syntax button:active { transform: transformFunction(value); } Approaches to Add a Pressed Effect on Button Here are three approaches to add a pressed effect ...

Read More

Usage of CSS grid-row-gap property

George John
George John
Updated on 15-Mar-2026 99 Views

The CSS grid-row-gap property is used to set the gap (space) between grid rows in a CSS Grid container. This property allows you to control the vertical spacing between grid items, making your layout more visually appealing and easier to read. Syntax selector { grid-row-gap: length; } Possible Values ValueDescription lengthDefines the gap size using units like px, em, rem, %, etc. 0Default value with no gap between rows Example The following example demonstrates how to create a grid layout with a 20px gap between rows ...

Read More

Create a Bordered Button Group with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 491 Views

The CSS border property allows you to create visually appealing button groups with defined borders around each button. This technique is useful for creating navigation menus, toolbars, or any grouped interactive elements. Syntax .button-group { /* Container styles */ } .button-group button { border: width style color; /* Additional button styles */ } Example: Basic Bordered Button Group The following example creates a horizontal button group with blue borders − .btn-group ...

Read More

Set the speed of the hover effect with CSS

Daniol Thomas
Daniol Thomas
Updated on 15-Mar-2026 15K+ Views

To set the speed of the hover effect with CSS, we can control how quickly style changes occur when users hover over elements. This is achieved using two main approaches: CSS transition properties and CSS animation properties. Syntax /* Using transition */ selector { transition-duration: time; } /* Using animation */ selector:hover { animation-duration: time; } Method 1: Using transition-duration Property The transition-duration property sets how long a transition takes to complete. This creates smooth changes between normal and hover states − ...

Read More

Create Hoverable Buttons with CSS

Krantik Chavan
Krantik Chavan
Updated on 15-Mar-2026 459 Views

The CSS :hover pseudo-selector is used to apply styles to an element when a user hovers their mouse over it. This creates interactive hoverable buttons that change appearance on mouse hover. Syntax selector:hover { property: value; } Example: Basic Hoverable Button The following example creates a hoverable button that changes color and border style when hovered − .btn { background-color: yellow; color: black; ...

Read More

How to add a colored border to a button with CSS?

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 1K+ Views

The CSS border property is used to add a colored border to HTML elements, including buttons. You can customize the border's width, style, and color to create various visual effects. Syntax selector { border: width style color; } Possible Values PropertyValuesDescription widthpx, em, rem, thin, medium, thickSets the border thickness stylesolid, dashed, dotted, double, grooveDefines the border style colorcolor names, hex, rgb, hslSets the border color Example: Dashed Blue Border The following example creates a button with a 3px dashed blue border − ...

Read More
Showing 5271–5280 of 6,519 articles
« Prev 1 526 527 528 529 530 652 Next »
Advertisements