Web Development Articles

Page 630 of 801

Variables in CSS

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

Variables in CSS are used to store values that can be reused throughout your stylesheet. They allow you to define custom properties with meaningful names and reference them anywhere in your CSS, making your code more maintainable and easier to update. Syntax /* Define variables */ :root { --variable-name: value; } /* Use variables */ selector { property: var(--variable-name); } Key Points CSS variables are defined with -- prefix The :root selector makes variables globally accessible Use var() function to access variable values Variable ...

Read More

CSS grid-template-rows property

Nancy Den
Nancy Den
Updated on 15-Mar-2026 107 Views

The CSS grid-template-rows property defines the size and number of rows in a CSS Grid container. It allows you to specify explicit dimensions for each row track. Syntax selector { grid-template-rows: value; } Possible Values ValueDescription lengthDefines row height in px, em, rem, etc. %Defines row height as a percentage of the container frDefines flexible row height using fractional units autoRow height adjusts to content min-contentRow height based on minimum content size max-contentRow height based on maximum content size Example 1: Fixed Row Heights The following ...

Read More

Shorthand property to set columns with CSS

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

The CSS columns property is a shorthand that allows you to set both the column width and column count for multi-column layouts. This property combines column-width and column-count into a single declaration. Syntax selector { columns: column-width column-count; } Possible Values ValueDescription column-widthSpecifies the optimal width for each column (px, em, rem, etc.) column-countSpecifies the number of columns (integer value) autoBrowser determines the value automatically Example The following example creates a 4-column layout with 100px optimal column width and adds styling rules − ...

Read More

Set how many columns an element should span across with CSS

Smita Kapse
Smita Kapse
Updated on 15-Mar-2026 232 Views

The CSS column-span property allows an element to span across multiple columns in a multi-column layout. This is particularly useful for creating headings or other elements that should break the column flow. Syntax selector { column-span: value; } Possible Values ValueDescription noneThe element does not span across columns (default) allThe element spans across all columns Example: Heading Spanning All Columns The following example demonstrates how to make a heading span across all columns in a multi-column layout − ...

Read More

How to position text to bottom left on an image with CSS

George John
George John
Updated on 15-Mar-2026 2K+ Views

To position text at the bottom left of an image with CSS, you need to use absolute positioning within a relative container. The position: absolute property combined with bottom and left properties allows precise text placement over images. Syntax .container { position: relative; } .text-overlay { position: absolute; bottom: value; left: value; } Method 1: Basic Bottom Left Positioning The following example positions text at the bottom left corner of an image − ...

Read More

Create a disabled look of a button with CSS

Nitya Raut
Nitya Raut
Updated on 15-Mar-2026 455 Views

To create a disabled button look in CSS, you can use the opacity property to make the button appear faded and less interactive. This visual effect helps users understand that the button is not functional. Syntax selector { opacity: value; } Example: Basic Disabled Button Look You can try to run the following code to create a disabled look of a button − .btn1 { background-color: #4CAF50; ...

Read More

Create a Vertical Button Group with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 1K+ Views

The vertical button group in CSS allows you to stack buttons one below the other, creating a clean and organized navigation or action menu. This layout is useful for sidebars, navigation panels, or any interface where you need buttons arranged vertically. Syntax .button-group .button { display: block; width: 100%; } Example The following example creates a vertical button group with styled buttons ? .mybtn .button { background-color: orange; ...

Read More

Set the color of the rule between columns with CSS

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

The CSS column-rule-color property sets the color of the rule (line) that appears between columns in a multi-column layout. This property is used in conjunction with column-rule-style to create visible separators between columns. Syntax selector { column-rule-color: color; } Possible Values ValueDescription colorAny valid CSS color value (hex, rgb, rgba, named colors, etc.) initialSets the property to its default value inheritInherits the color from the parent element Example: Orange Dashed Column Rule The following example creates a 4-column layout with orange dashed rules between columns − ...

Read More

Shorthand property for setting all the column-rule-* properties

Ankith Reddy
Ankith Reddy
Updated on 15-Mar-2026 163 Views

The CSS column-rule property is a shorthand property for setting all the column rule properties in one declaration. It allows you to define the width, style, and color of the line that appears between columns in a multi-column layout. Syntax selector { column-rule: width style color; } Possible Values PropertyValuesDescription column-rule-widththin, medium, thick, lengthSets the width of the column rule column-rule-stylenone, solid, dashed, dotted, double, etc.Sets the style of the column rule column-rule-colorcolor name, hex, rgb, rgbaSets the color of the column rule Example The following ...

Read More

How to fill columns with CSS

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

The CSS column-fill property controls how content is distributed across multiple columns when using CSS multi-column layout. This property determines whether columns should be balanced in height or filled sequentially. Syntax selector { column-fill: value; } Possible Values ValueDescription balanceContent is distributed evenly across all columns (default) autoColumns are filled sequentially, one after another balance-allBalance content across all columns including the last fragment Example: Balanced Column Fill The following example demonstrates the balance value, which distributes content evenly across columns − ...

Read More
Showing 6291–6300 of 8,010 articles
« Prev 1 628 629 630 631 632 801 Next »
Advertisements