-
CSS max-lines Property
The CSS max-lines property is used to limit a block content to a maximum number of lines before being cropped out. The max-lines property can create a clamping effect with the block-overflow property. Let’s remember that the line-clamp property is a shorthand for the max-lines and the block-overflow properties. The max-lines property is also called “limiting visible lines”, because the content falling within the maximum number of lines isn’t…
-
CSS max-height Property
The max-height property is used to set the maximum height of an element. This property prevents the height property’s value from becoming larger than the value specified for max-height. The max-height property overrides the height property, and min-height property overrides the max-height property. Initial Value none Applies to All elements, but non-replaced inline elements, table columns, and column groups. Inherited No. Animatable Yes. Height is animatable. Version CSS2…
-
CSS margin-top Property
The margin-top property is used to define the top margin of an element. The top and bottom margins of an element can collapse into one, which is equal to the largest of the two margins. However, this happens only in the case of vertical margins. Negative values are allowed. Initial Value 0 Applies to All elements. It…
-
CSS margin-right Property
The margin-right property is used to define how much the right margin of the element will be set. Initial Value 0 Applies to All elements. It also applies to ::first-letter. Inherited No. Animatable Yes. Right margin of the element is animatable. Version CSS2 DOM Syntax object.style.marginRight = “50px”; Syntax Example of the margin-right property: Result Example of the margin-right property…
-
CSS margin-left Property
The margin-left property is used to define how much the left margin of the element will be set. There are some rare situations when width, margin-left, border, padding, the content area and margin-right are defined. When it happens, the margin-left will be ignored and it will be set as if the auto value is defined. The margin-left property is defined as the keyword <auto>, <percentage> or a…
-
CSS margin-bottom Property
The margin-bottom property is used to set margin space on the bottom of an element. Initial Value 0 Applies to All elements. It also applies to ::first-letter. Inherited No. Animatable Yes. Bottom margin of the element is animatable. Version CSS2 DOM Syntax object.style.marginBottom = “70px”; Syntax Example of the margin-bottom property: Result Example of the margin-bottom property defined as “4em”: Example of…
-
CSS margin Property
The CSS margin property is used to create space around the element. The margin property is a shorthand for the following properties: We can use the margin property for all sides (top, bottom, left, right) at once. For the top side we use margin-top, for bottom margin-bottom, for left side margin-left and for right side margin-right. The margin property can be defined with…
-
CSS list-style-type Property
CSS list-style-type property is used to specify the type of a list item element. A list marker can have three types: glyphs (circle, disc, square), numbering systems, and alphabetic systems. The marker’s color will be the same as the computed color of the element it applies to. Only the <li> and <summary> elements have the “list-item” value of the display property. We can…
-
CSS list-style-position Property
The list-style-position property specifies whether a list item’s marker should be inside or outside the list-item box. The list-style-position property is applied to list items and elements for which the display is set to “list-item”. By default, this includes <li> elements. It can also be set on parent elements: <ol> or <ul>. Initial Value outside Applies to List items. Inherited Yes. Animatable No. Version CSS1 DOM…
-
CSS list-style-image Property
The list-style-image property is used to put an image instead of the list item marker. If the image has an inherent width and height, they will be used as width and height. If the image has an inherent ratio and an inherent height/width, they will be used as width and height. The used value of the missing dimension will be calculated from…