The CSS Background property

The CSS background property is a shorthand property that allows you to specify the background of an element in a single line of code. It allows you to set multiple background properties, such as the background color, image, and position, all in one place. Here is a quick overview of the background property and how […]

CSS Margin Property

The margin CSS shorthand property sets the margin area on all four sides of an element. Definition and Usage The margin property sets the margins for an element, and is a shorthand property for the following properties: margin-top margin-right margin-bottom margin-left If the margin property has four values: margin: 10px 5px 15px 20px; top margin […]

CSS Padding Property

The padding CSS shorthand property sets the padding area on all four sides of an element at once. Definition and Usage An element’s padding is the space between its content and its border. The padding property is a shorthand property for: padding-top padding-right padding-bottom padding-left Note: Padding creates extra space within an element, while margin […]

CSS Cursor Property

The cursor CSS property sets the mouse cursor, if any, to show when the mouse pointer is over an element. The curser setting should inform users of the mouse operations that can be performed at the current location, including: text selection, activating help or context menus, copying content, resizing tables, and so on. You can […]

CSS Object-position Property

The object-position CSS property specifies the alignment of the selected replaced element’s contents within the element’s box. Areas of the box which aren’t covered by the replaced element’s object will show the element’s background. You can adjust how the replaced element’s object’s intrinsic size (that is, its natural size) is adjusted to fit within the element’s […]

CSS Object-fit Property

The object-fit CSS property sets how the content of a replaced element, such as an <img> or <video>, should be resized to fit its container. You can alter the alignment of the replaced element’s content object within the element’s box using the object-position property. Values fill: This is default. The replaced content is sized to […]

CSS Border Property

The CSS border property it’s a shorthand that sets an element’s border. You’ll be able to set the values of border-width, border-style, and border-color. I have a 4px dashed red border Values border-width: Sets the thickness of the border. Defaults to medium if absent. border-style: Sets the style of the border. Defaults to none if absent. border-color: Sets […]

CSS Outline Property

The CSS outline property is line drawed outside the element’s border Hi, I have a 2px red border and a blue outline of 6px width Be careful: Outline differs from borders! Unlike border, the outline is drawn outside the element’s border, and may overlap other content. Also, the outline is NOT a part of the […]