CSS Units

CSS units determines the size of a property you’re setting for an element or its content. For example, if you wanted to set the property margin of a paragraph, you would give it a specific value. This value includes the CSS unit.CSS has several options for which units to use when determining the size of various CSS … Read more

Categories CSS

CSS Pseudo-class

CSS pseudo-class  is a keyword added to a selector that specifies a special state of the selected element(s). For example, :hover can be used to change a button’s color when the user’s pointer hovers over it.Pseudo-classes let you apply a style to an element not only in relation to the content of the document tree, but also in relation … Read more

Categories CSS

CSS !important

CSS !important property in CSS is used to provide more weight (importance) than normal property. In CSS, the !important means that “this is important”, ignore all the subsequent rules, and apply !important rule and the !important keyword must be placed at the end of the line, immediately before the semicolon. In other words, it adds importance to … Read more

Categories CSS

CSS Selector

A CSS selector is the first part of a CSS Rule. It is a pattern of elements and other terms that tell the browser which HTML elements should be selected to have the CSS property values inside the rule applied to them. The element or elements which are selected by the selector are referred to … Read more

CSS Pseudo-elements

CSS Pseudo-element is a keyword added to a selector that lets you style a specific part of the selected element(s). For example, ::first-line can be used to change the font of the first line of a paragraph. The general syntax for CSS Pseudo-elements looks like this: In CSS pseudo- elements It looks just like normal styling statements but with … Read more

Categories CSS

CSS Dropdown

CSS Dropdown menus are used to hide a predefined list within a button. HTML) Use any element to open the dropdown content, e.g. a <span>, or a <button> element. Use a container element (like <div>) to create the dropdown content and add whatever you want inside of it. Wrap a <div> element around the elements to … Read more

Categories CSS

CSS Web fonts

CSS Web fonts allows custom fonts to be loaded on a webpage. Once added to a stylesheet, the rule instructs the browser to download the font from where it is hosted, then display it as specified in the CSS. You will have a @font-face block at the start of the CSS, which specifies the font file(s) to download: … Read more

Categories CSS

CSS Color

CSS color values to specify a color. Typically, these are used to set a color either for the foreground of an element (i.e., its text) or else for the background of the element. They can also be used to affect the color of borders and other decorative effects. the example below sets the background colors … Read more

CSS Align

CSS Align module aims to create a consistent method of alignment across all of CSS. This document details the general concepts found in the specification. CSS Align-Centre To horizontally center a block element (like <div>), use margin: auto; Setting the width of the element will prevent it from stretching out to the edges of its container. … Read more

Categories CSS

CSS Overflow

 CSS Overflow property specifies whether to clip the content or to add scrollbars when the content of an element is too big to fit in the specified area. Overflow options include clipping, showing scrollbars, or displaying the content flowing out of its container into the surrounding area. In order for overflow to have an effect, the block-level container … Read more