Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
CSS Articles
Page 88 of 130
Set the width of the rule between columns with CSS
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 MoreSet the style of the rule between columns with CSS
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 MoreSet a rounded active and hover button with CSS
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 MoreCSS shorthand property for the flex-grow, flex-shrink, and the flex-basis properties
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 MoreRole of CSS flex-direction property column value
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 MoreShorthand CSS property for flex-direction and flex-wrap
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 MoreAlign flex lines with CSS
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 MoreUsage of CSS align-items property flex-end value
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 MoreUsage of CSS align-content property center value
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 MoreRole of CSS justify-content property space-around value
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