AmitDiwan has Published 11365 Articles

Embedded or internal Style Sheets in CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:27:39

1K+ Views

CSS files can be embedded internally by declaring them in tag. This decreases the load time of the webpage. Although embedded CSS declarations allow dynamic styles, it should be downloaded at every page request as internal CSS can’t be cached. Internal CSS are declared in tag inside tag. ... Read More

Element Type Selector in CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:25:18

535 Views

The CSS element type selector is used to select all elements of a type. The syntax for CSS element type selector is as follows − Syntax The following is the syntax − element { /*declarations*/ } Element Type Selector for all elements In this ... Read More

Effect of Color Property on Borders and Outlines in CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:22:58

264 Views

We can define the border color and outline color for an element. Unlike borders, outline doesn’t take up any space. The border-color property is used to set an element’s border color and the outline-color property is used to set its outline color. Syntax The syntax for CSS border-color and outline-color ... Read More

Display Inline-Block Working with CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:21:16

2K+ Views

The CSS Display property with value inline-block renders an element according to content’s width or provided width whichever is greater, it does not force a line break until parent element’s width is fully utilized. The inline-block displays an element as an inline-level block container. The element itself is formatted as ... Read More

Disabling Pull-to-Refresh Feature on Mobile Browsers using CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:14:37

708 Views

We can change the output of scrolling a webpage’s boundary area using the CSS overscroll-behavior property. Through this, we can disable Pull-to-Refresh on browsers. Syntax The syntax of CSS overscroll-behavior property is as follows − Selector { overscroll-behavior: /*value*/ } The Overscroll-behavior The following example ... Read More

Difference Between Pseudo-Class and Pseudo-Element in CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:12:14

3K+ Views

Pseudo-Class A pseudo-class represents a state of a selector like :hover, :active, :last-child, etc. These start with a single colon(:). Syntax The syntax of CSS pseudo-class is as follows − :pseudo-class{ attribute: /*value*/ } Pseudo-Element Similarly, a pseudo-element is used to select virtual elements like ... Read More

Different Media Types in CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 16:09:29

191 Views

CSS Media Types are the device types on which the document is rendered and specific styles can be defined for every media type. The following are the Media Types in CSS3 and Media Queries − Sr.No Value & Description 1 allStylesheet applies to all media type ... Read More

Difference Between HTML and CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 15:45:41

599 Views

In this post, we will understand the difference between HTML and CSS HTML HTML refers to Hyper Text Markup Language. It helps create web pages and applications − It helps define structure of web page. It is a markup language. It helps create static pages as well. It helps ... Read More

Detect when an Element Gets Fixed in CSS position:sticky using Intersection Observer

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 14:10:14

2K+ Views

By applying various CSS styles to the element with the sticky position, we can easily detect when an element gets fixed. Set the Sticky Navbar Div Create divs and set the navbar − Watch Me! Style the Top Navbar Set the height of the Top ... Read More

Define Paddings for Individual Sides in CSS

AmitDiwan

AmitDiwan

Updated on 01-Nov-2023 14:08:14

74 Views

CSS allows us to set side specific padding for elements. We can easily specify padding sizes for individual sides of an element. The padding-top, padding-right, padding-bottom and padding-right properties define the top, right, bottom and left padding respectively. The padding shorthand property can also be used to achieve the same ... Read More

Advertisements