AmitDiwan has Published 10744 Articles

Understanding the difference between CSS Border and Outline

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 18:40:00

1K+ Views

The CSS border property is used to define the border properties for an element. It is a shorthand for border-width, border-style and border-color. Borders for individual sides can be styled and a border-radius can also be specified. On the other hand, the CSS outline doesn’t take up space and is ... Read More

Understanding CSS Selector and Declarations

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 18:23:53

353 Views

CSS selectors are used to selecting HTML elements by matching each element of a given pattern. We define the styles by declaring property and their value inside the selector. Syntax The syntax for declaring styles is as follows − Selector { property: value; } ... Read More

What is Pseudo-class in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 18:04:55

135 Views

CSS Pseudo Classes are representation of special states of different elements, these classes not only depict basic elements in document but also their external factors such status, position, history, etc. Using these pseudo classes developer can even style elements which cannot be directly selected via CSS selectors. Pseudo-classes The following ... Read More

Understanding CSS Absolute and Relative Units

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 18:02:08

447 Views

The fonts, height, width, margins, padding, etc. are set on a web page with the length units. For example, height 100px, width 100px, font 2em, etc. These length units are categorised into Absolute and Relative Units. CSS Absolute Units The absolute length units are fixed in relation to each other. ... Read More

Understanding clientHeight, offsetHeight & scrollHeight Properties in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 17:55:31

2K+ Views

To return the height of an element, scrollable height, height including padding, border and scrollbar, then use these properties; clientHeight − The clientHeight gives the measure of the height of an element including the padding. Note that border, margin, and scrollbar height (if rendered) are not included in this. ... Read More

Typing and Deleting Effect with JavaScript and CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 17:52:35

2K+ Views

With the help of CSS animations, we can create a typewriter typing and deleting effect using JavaScript. The infinite effect is also set. The custom function will get called and the words will get display with the effect. At the end, those words will get deleted using another custom function. ... Read More

Type of Boxes Generated in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 16:45:00

1K+ Views

One or more boxes are generated for every element in a document tree after processing it under visual formatting model. A generated box has certain CSS properties associated with it and is accordingly rendered in HTML. To display elements, the following are the two common values − block − ... Read More

Turning off Float using Clear Property of CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 16:41:59

2K+ Views

We can use CSS clear property to specify the side of the floated element which is to be cleared of flowing content. If you want to control the element next to a floating element, then use the clear property. Syntax The following is the syntax of the float property − ... Read More

The width and height properties in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 16:40:47

146 Views

We can define the height and width exclusively for the element’s content, though these properties do not include margins, paddings or borders. Syntax The syntax of CSS height property is as follows − Selector { height: /*value*/ } The syntax of CSS width property is ... Read More

The padding shorthand Property in CSS

AmitDiwan

AmitDiwan

Updated on 02-Jan-2024 16:37:50

270 Views

The padding property in CSS allows you to set the padding for padding-top, padding-right, padding-bottom, padding-left. It is a shorthand property. For example padding:10px 5px 7px 10px; Here, top padding is 10px right padding is 5px bottom padding is 7px left padding is 10px Syntax The ... Read More

Advertisements