Web Development Articles

Page 393 of 801

Control the flow and formatting of text with CSS

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

The white-space property is used to control the flow and formatting of text in CSS. It determines how whitespace characters (spaces, tabs, line breaks) inside an element are handled. Syntax white-space: normal | nowrap | pre | pre-wrap | pre-line; White-space Values Value Line Breaks Spaces/Tabs Text Wrapping ...

Read More

Usage of color property in CSS

Ramu Prasad
Ramu Prasad
Updated on 15-Mar-2026 199 Views

The color property in CSS is used to set the color of text content. It accepts various color formats including color names, hexadecimal values, RGB, and HSL values. Syntax color: value; Color Value Formats The color property accepts several formats: Color names: red, blue, green, etc. Hexadecimal: #ff0000, #00ff00, #0000ff RGB: rgb(255, 0, 0) RGBA: rgba(255, 0, 0, 0.5) with transparency HSL: hsl(0, 100%, 50%) Example: Using Color Names ...

Read More

How to set the cases for a text in CSS?

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

The text-transform property in CSS allows you to control the capitalization of text without modifying the original HTML content. This property is particularly useful for styling headings, navigation links, and other text elements consistently across your website. Syntax text-transform: none | capitalize | uppercase | lowercase | initial | inherit; Property Values The text-transform property accepts the following values: none - No transformation (default value) capitalize - First letter of each word is capitalized uppercase - All letters are converted ...

Read More

How to set the whitespace between text in CSS?

vanithasree
vanithasree
Updated on 15-Mar-2026 281 Views

The CSS white-space property controls how whitespace characters (spaces, tabs, line breaks) are handled within text elements. This property is essential for controlling text formatting and layout. Syntax white-space: value; White-space Property Values Value Spaces/Tabs Line Breaks Text Wrapping normal Collapsed Ignored Yes pre Preserved Preserved No nowrap Collapsed Ignored No pre-wrap Preserved Preserved Yes pre-line Collapsed Preserved Yes Example: Using white-space: pre The pre value preserves all whitespace and line breaks, similar to the HTML tag: ...

Read More

How to style images with CSS?

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

CSS provides numerous properties to style and enhance images on web pages. You can control dimensions, transparency, borders, filters, and positioning to create visually appealing designs. Basic Image Styling Properties Common CSS properties for styling images include: width/height: Control image dimensions opacity: Set transparency (0 to 1) border: Add borders around images border-radius: Create rounded corners filter: Apply visual effects Setting Image Opacity The opacity property controls image transparency, with values from 0 (fully transparent) to 1 (fully opaque): ...

Read More

Usage of width property with CSS

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

The width property in CSS is used to set the width of elements, including images. This property accepts values in various units such as pixels (px), percentages (%), em, rem, and other CSS length units. When using percentage values, the width is calculated relative to the containing element's width. Syntax width: value; Common Values Pixels (px): Absolute unit - width: 200px; Percentage (%): Relative to parent container - width: 50%; Auto: Browser calculates width automatically - width: auto; Em/Rem: Relative to font size - width: 10em; Example: Setting Image Width ...

Read More

Set the opacity of an image with CSS

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

To set the opacity of an image, you can use the CSS opacity property. This is the modern standard method that works across all browsers. The opacity property accepts values from 0 (completely transparent) to 1 (completely opaque). Syntax opacity: value; Where value is a number between 0 and 1: 0 = completely transparent (invisible) 0.5 = 50% transparent 1 = completely opaque (default) Example: Basic Image Opacity .opacity-demo { ...

Read More

Usage of -moz-opacity property with CSS

Chandu yadav
Chandu yadav
Updated on 15-Mar-2026 860 Views

The -moz-opacity property was a Mozilla-specific CSS property used to set the opacity of HTML elements, including images. This property created transparent effects in older Firefox browsers before the standard opacity property was widely supported. Browser-Specific Opacity Properties Different browsers historically required different approaches for opacity: Mozilla Firefox: -moz-opacity Internet Explorer: filter: alpha(opacity=x) Modern browsers: opacity (standard) Syntax /* Legacy Mozilla syntax */ -moz-opacity: value; /* IE filter syntax */ filter: alpha(opacity=value); /* Modern standard syntax */ opacity: value; The value ranges from 0 (completely transparent) to 1 ...

Read More

CSS padding-right property

Arjun Thakur
Arjun Thakur
Updated on 15-Mar-2026 253 Views

The padding-right property in CSS specifies the amount of space between the content and the right border of an element. It adds internal spacing on the right side without affecting the element's border or margin. Syntax padding-right: value; The value can be specified in: Length units: px, em, rem, pt, etc. Percentage: % (relative to parent element's width) Keywords: inherit, initial, unset Example: Length Values .box { ...

Read More

CSS padding property

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

The padding property sets the internal space between an element's content and its border. It creates space inside the element on all four sides: top, right, bottom, and left. Syntax padding: value; padding: top-bottom left-right; padding: top left-right bottom; padding: top right bottom left; Padding Values The padding property accepts various units: px - Fixed pixels % - Percentage of parent element's width em/rem - Relative to font size auto - Browser calculates automatically Examples Single Value (All Sides) ...

Read More
Showing 3921–3930 of 8,010 articles
« Prev 1 391 392 393 394 395 801 Next »
Advertisements