CSS Articles

Page 88 of 130

Set the width of the rule between columns with CSS

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

The CSS column-rule-width property is used to set the width of the rule (line) between columns in a multi-column layout. This property works in conjunction with column-rule-style and column-rule-color to create visual separators between columns. Syntax selector { column-rule-width: value; } Possible Values ValueDescription thinA thin rule (typically 1px) mediumA medium rule (typically 3px) - default value thickA thick rule (typically 5px) lengthA specific width in px, em, rem, etc. Example: Setting Column Rule Width The following example demonstrates how to set different widths for column ...

Read More

Set the style of the rule between columns with CSS

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

The CSS column-rule-style property is used to set the style of the rule (line) between columns in a multi-column layout. This property works in conjunction with column-count or column-width to create visual separators between columns. Syntax selector { column-rule-style: value; } Possible Values ValueDescription noneNo rule between columns (default) solidA solid line between columns dashedA dashed line between columns dottedA dotted line between columns doubleA double line between columns ridgeA 3D ridged border grooveA 3D grooved border Example: Dashed Column Rule The following example creates a ...

Read More

Set a rounded active and hover button with CSS

Jennifer Nicholas
Jennifer Nicholas
Updated on 15-Mar-2026 1K+ Views

The CSS :hover pseudo-class allows you to add interactive effects when users hover over elements, while the border-radius property creates rounded corners. Combining these with the .active class creates visually appealing navigation buttons with distinct states. Syntax /* Hover effect */ selector:hover { property: value; } /* Active state */ selector.active { property: value; } /* Rounded corners */ selector { border-radius: value; } Example: Rounded Active and Hover Buttons The following example creates a navigation menu with rounded buttons ...

Read More

CSS shorthand property for the flex-grow, flex-shrink, and the flex-basis properties

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

The CSS flex property is a shorthand that combines flex-grow, flex-shrink, and flex-basis properties in a single declaration. It controls how flex items grow, shrink, and their initial size within a flex container. Syntax selector { flex: flex-grow flex-shrink flex-basis; } Possible Values PropertyDescriptionDefault Value flex-growHow much the item should grow (number)0 flex-shrinkHow much the item should shrink (number)1 flex-basisInitial size before growing/shrinkingauto Example The following example demonstrates how the flex property affects item sizing within a flex container − ...

Read More

Role of CSS flex-direction property column value

Anvi Jain
Anvi Jain
Updated on 15-Mar-2026 181 Views

The CSS flex-direction: column property arranges flex items vertically in a column layout, stacking them from top to bottom. This is the opposite of the default row direction which arranges items horizontally. Syntax selector { display: flex; flex-direction: column; } Example The following example demonstrates how to create a vertical layout using flex-direction: column − .mycontainer { display: flex; flex-direction: ...

Read More

Shorthand CSS property for flex-direction and flex-wrap

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

The CSS flex-flow property is a shorthand property that combines flex-direction and flex-wrap into a single declaration. This property allows you to control both the direction of flex items and whether they wrap to new lines. Syntax selector { flex-flow: flex-direction flex-wrap; } Possible Values ValueDescription flex-directionSets the direction: row, row-reverse, column, column-reverse flex-wrapSets wrapping: nowrap, wrap, wrap-reverse Example: Column Direction with Wrapping The following example uses flex-flow: column wrap to arrange items vertically with wrapping − ...

Read More

Align flex lines with CSS

Vrundesha Joshi
Vrundesha Joshi
Updated on 15-Mar-2026 480 Views

The CSS align-content property is used to align flex lines in a flex container when there is extra space in the cross-axis direction. This property only works when flex-wrap is set to wrap or wrap-reverse, creating multiple lines of flex items. Syntax selector { align-content: value; } Possible Values ValueDescription stretchLines stretch to take up remaining space (default) flex-startLines are packed toward the start of the cross-axis flex-endLines are packed toward the end of the cross-axis centerLines are centered in the cross-axis space-betweenLines are evenly distributed with space between ...

Read More

Usage of CSS align-items property flex-end value

Vrundesha Joshi
Vrundesha Joshi
Updated on 15-Mar-2026 177 Views

The CSS align-items property with the flex-end value is used to align flex items to the end of the cross-axis, which is typically the bottom of the flex container when using the default row direction. Syntax selector { display: flex; align-items: flex-end; } Example The following example demonstrates how to align flex items to the bottom of their container using align-items: flex-end − .mycontainer { display: flex; ...

Read More

Usage of CSS align-content property center value

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

The CSS align-content property with the center value is used to center flex lines in a flex container. This property only works when the flex container has multiple lines created by flex-wrap: wrap. Syntax .container { display: flex; flex-wrap: wrap; align-content: center; } Example The following example demonstrates how to center flex lines within a flex container − .mycontainer { display: flex; ...

Read More

Role of CSS justify-content property space-around value

Rishi Rathor
Rishi Rathor
Updated on 15-Mar-2026 175 Views

The CSS justify-content property with the space-around value distributes flex items evenly along the main axis with equal space around each item. This creates equal spacing on both sides of each item, making the space between adjacent items twice as large as the space at the edges. Syntax .container { display: flex; justify-content: space-around; } Example You can try to run the following code to implement the space-around value − ...

Read More
Showing 871–880 of 1,299 articles
« Prev 1 86 87 88 89 90 130 Next »
Advertisements