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 128 of 130
CSS max-height property
The CSS max-height property sets the maximum height that an element can reach. When content exceeds this maximum height, it will overflow or be clipped depending on the overflow property. Syntax selector { max-height: value; } Possible Values ValueDescription lengthA fixed height in px, em, rem, etc. percentageA percentage of the containing block's height noneNo maximum height limit (default) initialSets to default value inheritInherits from parent element Example: Text Content with Max Height The following example shows how max-height affects text content that exceeds the specified ...
Read MoreCSS line-height property
The CSS line-height property is used to set the height of a line of text. It controls the spacing between lines of text within an element, affecting readability and visual appearance. Syntax selector { line-height: value; } Possible Values ValueDescription normalDefault value, usually around 1.2 times the font size numberA number multiplied by the font size (e.g., 1.5) lengthFixed length in px, em, rem, etc. %Percentage of the font size Example: Setting Line Height The following example demonstrates different line-height values applied to paragraphs − ...
Read MoreCSS width property
The CSS width property is used to set the width of an element. It defines how wide an element should be, and can accept various types of values including lengths, percentages, or keywords. Syntax selector { width: value; } Possible Values ValueDescription autoBrowser calculates the width automatically (default) lengthDefines width in px, em, rem, cm, etc. %Defines width as a percentage of the parent element initialSets width to its default value inheritInherits width from the parent element Example: Setting Fixed Width The following example demonstrates setting ...
Read MoreCSS height property
The CSS height property is used to set the height of an element. It determines how tall an element will be, and can accept various types of values including lengths, percentages, or keywords. Syntax selector { height: value; } Possible Values ValueDescription autoBrowser calculates the height automatically (default) lengthDefines height in px, em, rem, cm, etc. %Defines height as a percentage of the parent element initialSets the property to its default value inheritInherits the value from parent element Example: Setting Fixed Height The following example demonstrates ...
Read MoreSet outline style as a solid single line with CSS
The CSS outline-style property with the value solid creates a solid single line outline around an element. This outline appears outside the element's border and does not affect the layout or positioning of other elements. Syntax selector { outline-style: solid; } Example The following example shows how to create a solid outline around a paragraph element − .solid-outline { outline-width: 3px; outline-style: solid; ...
Read MoreSet outline style as ridge with CSS
To set the outline style as ridge, use the outline-style property with the value ridge. The ridge outline creates a 3D raised effect that appears to protrude from the page surface, opposite to the groove style which looks carved into the page. Syntax selector { outline-style: ridge; } Example The following example demonstrates how to apply a ridge outline style to a paragraph − .ridge-outline { outline-width: 3px; ...
Read MoreSet outline style as a groove with CSS
To set the outline style as a groove, use the outline-style property with the value groove. Under groove, the outline looks as though it is carved into the page. Syntax selector { outline-style: groove; } Example The following example demonstrates how to apply a groove outline style to a paragraph − .groove-outline { outline-width: 3px; outline-style: groove; ...
Read MoreSet the width, line style and color properties for an outline in a single statement with CSS
The CSS outline property is a shorthand property that allows you to set the width, line style, and color of an element's outline in a single statement. The outline appears outside the element's border and does not affect the element's dimensions or layout. Syntax selector { outline: width style color; } Possible Values PropertyValuesDescription widththin, medium, thick, or length (px, em, etc.)Sets the thickness of the outline stylesolid, dashed, dotted, double, groove, ridge, inset, outsetDefines the line style of the outline colorcolor name, hex, rgb, rgba, etc.Sets the color ...
Read MoreSet the color of the outline with CSS
The outline-color property allows you to specify the color of the outline. Its value should either be a color name, a hex color, or an RGB value, as with the color and border-color properties. Syntax selector { outline-color: value; } Possible Values ValueDescription color nameSpecifies outline color using color names (red, blue, green, etc.) hex valueSpecifies outline color using hex values (#ff0000, #0000ff, etc.) RGB valueSpecifies outline color using RGB values (rgb(255, 0, 0), etc.) initialSets the property to its default value inheritInherits the property from its parent element ...
Read MoreCSS outline property
The outline property is a shorthand property that allows you to specify values for multiple properties such as outline-color, outline-style, and outline-width in a single declaration. Syntax selector { outline: width style color; } Possible Values PropertyValuesDescription outline-widththin, medium, thick, lengthSpecifies the width of the outline outline-stylesolid, dashed, dotted, double, groove, ridge, inset, outsetSpecifies the style of the outline outline-colorcolor name, hex, rgb, rgbaSpecifies the color of the outline Example: Different Outline Styles The following example demonstrates various outline styles and colors − ...
Read More