Front End Scripts Articles

Page 13 of 47

What should be done with the left/ right edges of the content on overflow with JavaScript?

Fendadis John
Fendadis John
Updated on 15-Mar-2026 163 Views

When content overflows horizontally in a container, the overflowX property controls how the left and right edges are handled. This property allows you to add horizontal scrolling, hide overflow, or make it visible. Syntax element.style.overflowX = "value"; Common overflowX Values Value Description Use Case scroll Always shows horizontal scrollbar ...

Read More

Usage of text-transform property in CSS

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 176 Views

The text-transform property in CSS is used to control the capitalization of text content. It allows you to transform text to uppercase, lowercase, capitalize first letters, or leave it unchanged. Syntax text-transform: value; Property Values Value Description none No transformation (default) capitalize Capitalizes the first letter of each word uppercase Converts all text to uppercase lowercase Converts all text to lowercase Example Text Transform Example ...

Read More

Example of embedded CSS

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 7K+ Views

Embedded CSS allows you to place CSS rules directly within an HTML document using the element. This tag is placed inside the section, and the rules defined will apply to all elements in the document. Syntax /* CSS rules go here */ selector { property: value; } ...

Read More

Working with element for CSS

Samual Sam
Samual Sam
Updated on 15-Mar-2026 76 Views

You can put your CSS rules into an HTML document using the element. This tag is placed inside ... tags. Rules defined using this syntax will be applied to all the elements available in the document. Syntax /* CSS rules go here */ selector { property: value; } Example Following is an example of embedded CSS ...

Read More

How to use style attribute to define style rules?

karthikeya Boyini
karthikeya Boyini
Updated on 15-Mar-2026 379 Views

The style attribute allows you to apply CSS rules directly to individual HTML elements. This is called inline CSS and provides element-specific styling with the highest specificity. Syntax Content Example: Basic Inline Styling Inline CSS Example This is inline CSS Styled div with multiple properties Example: Multiple Style Properties ...

Read More

Including an external stylesheet file in your HTML document

varma
varma
Updated on 15-Mar-2026 649 Views

The element can be used to include an external style sheet file in your HTML document. An external style sheet is a separate text file with .css extension. You define all the Style rules within this text file and then you can include this file in any HTML document using element. Creating an External CSS File Consider a simple style sheet file with a name new.css having the following rules: h1, h2, h3 { color: #36C; font-weight: normal; letter-spacing: .4em; ...

Read More

Rules to override Style Sheet Rule in CSS

varun
varun
Updated on 15-Mar-2026 3K+ Views

CSS follows a specific hierarchy when multiple styles are applied to the same element. Understanding the cascade and specificity rules helps you control which styles take precedence. CSS Cascade Priority Order CSS applies styles based on the following priority order, from highest to lowest: Inline styles - Styles applied directly to HTML elements using the style attribute Internal stylesheets - Styles defined within tags in the HTML document External stylesheets - Styles defined in separate CSS files linked to the HTML document Example: Style Override Hierarchy ...

Read More

How to add comments in the style sheet blocks

Samual Sam
Samual Sam
Updated on 15-Mar-2026 300 Views

You may need to put additional comments in your stylesheet blocks. Therefore, it is very easy to comment any part of the style sheet. You can simply put your comments inside /*...this is a comment in style sheet...*/. You can use /* ... */ to comment multi-line blocks in a similar way you do in C and C++ programming languages. Syntax /* Single-line comment */ /* Multi-line comment can span multiple lines */ Example: Adding Comments to CSS ...

Read More

Which Measurement Unit should be used in CSS to set letter spacing

Lakshmi Srinivas
Lakshmi Srinivas
Updated on 15-Mar-2026 963 Views

To set letter spacing with CSS, use the em measurement unit for most cases, though other units like px and rem are also available depending on your needs. The em unit is a relative measurement based on the font size of the current element. Because an em unit equals the size of the current font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt. Why Use em for Letter Spacing? Using em units makes letter spacing responsive and proportional to the font size. When the font size changes, ...

Read More

How to set font size using CSS Measurement Unit vmin?

mkotla
mkotla
Updated on 15-Mar-2026 256 Views

The vmin CSS unit sets font size based on the smaller dimension of the viewport (width or height). It's useful for creating responsive text that scales with screen size. What is vmin? The vmin unit represents 1% of the viewport's smaller dimension. If the viewport is 800px wide and 600px tall, 1vmin = 6px (1% of 600px). Syntax font-size: [number]vmin; Example vmin Font Size Example ...

Read More
Showing 121–130 of 465 articles
« Prev 1 11 12 13 14 15 47 Next »
Advertisements