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 […]
How to prevent copy text in your website with pure CSS
If you need to restrict the text selection in your website you are in the right place. The user-select CSS property controls whether the user can select text. This doesn’t have any effect on content loaded as part of a browser’s user interface except in textboxes. Values none: The text of the element and its sub-elements […]
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 […]