• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
AimactGrow
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
AimactGrow
No Result
View All Result

writing-mode | CSS-Tips

Admin by Admin
July 21, 2026
Home Coding
Share on FacebookShare on Twitter


The writing-mode CSS property units whether or not traces of textual content are laid out horizontally or vertically, and the course during which blocks and features progress.

.ingredient {
  writing-mode: vertical-rl;
}

That is most helpful in languages corresponding to Chinese language, Japanese or Korean the place the textual content is commonly set vertically. Within the English language, it’s extra probably that you simply’ll need to use this property for aesthetics causes, corresponding to aligning a heading in a block of textual content like this:

Syntax

writing-mode: horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr;
  • Preliminary: horizontal-tb
  • Applies to: all components besides desk row teams, desk column teams, desk rows, desk columns, ruby base containers, ruby annotation containers
  • Inherited: sure
  • Computed worth: as specified
  • Animation sort: not animatable

Values

writing-mode: horizontal-tb;
writing-mode: vertical-rl;
writing-mode: vertical-lr;
writing-mode: sideways-rl;
writing-mode: sideways-lr;

/* International values */
writing-mode: inherit;
writing-mode: preliminary;
writing-mode: revert;
writing-mode: revert-layer;
writing-mode: unset;

Every worth combines two components. The primary describes whether or not textual content is specified by horizontal or vertical traces, whereas the second describes the course during which these traces and block-level content material progress. tb means top-to-bottom, rl means right-to-left, and lr means left-to-right.

  • horizontal-tb: That is the default worth. Textual content is specified by horizontal traces, with traces and blocks progressing from high to backside.
  • vertical-rl: Textual content is specified by vertical traces, with traces and blocks progressing from proper to left. Every new line is positioned to the left of the earlier one.
  • vertical-lr: Textual content is specified by vertical traces, with traces and blocks progressing from left to proper. Every new line is positioned to the appropriate of the earlier one.
  • sideways-rl: Textual content is specified by vertical traces that progress from proper to left, however makes use of the typographic conventions of horizontal writing. In consequence, the glyphs are rotated sideways, dealing with towards the appropriate.
  • sideways-lr: Textual content is specified by vertical traces that progress from left to proper, however makes use of the typographic conventions of horizontal writing. In consequence, the glyphs are rotated sideways, dealing with towards the left.

Writing modes and CSS format

The writing-mode property doesn’t simply change the orientation of textual content. Extra basically, it establishes the block and inline instructions that CSS makes use of to put out content material.

The inline axis follows the course during which content material flows inside a line, whereas the block axis follows the course during which blocks and features stack. These axes will be horizontal or vertical relying on the writing mode.

Within the default horizontal-tb writing mode, the inline axis runs horizontally and the block axis runs vertically. In a vertical writing mode corresponding to vertical-rl, the inline axis runs vertically and the block axis runs horizontally.

Fashionable CSS format is constructed round these logical axes. Flexbox, Grid, alignment, and logical properties describe relationships by way of block, inline, begin, and finish, moderately than being completely tied to bodily instructions corresponding to high, proper, backside, and left.

This is the reason logical properties corresponding to inline-size and block-size are helpful. Slightly than referring to a hard and fast bodily dimension like width and peak, they describe the scale of a component alongside its inline or block axis:

.ingredient {
  inline-size: 20rem;
  block-size: 10rem;
}

In a horizontal writing mode, inline-size corresponds to the horizontal dimension and block-size to the vertical dimension. In a vertical writing mode, these relationships are switched.

The identical precept applies to flow-relative properties corresponding to margin-inline-start and padding-block-end, which consult with logical instructions moderately than fastened bodily sides of the display like left and backside.

In Flexbox, a container with flex-direction set to row lays out gadgets alongside the inline axis, whereas column lays them out alongside the block axis. In consequence, a row will be horizontal or vertical relying on the writing mode.

Grid additionally respects the writing mode when putting and sizing gadgets. Its rows and columns aren’t completely tied to the bodily horizontal and vertical instructions.

Alignment properties corresponding to align-items and justify-items , amongst others, observe the identical precept.

Understanding this mannequin is helpful even should you by no means create a vertical format. When you begin pondering by way of block and inline axes, many trendy CSS format options turn into simpler to grasp, plus your layouts turn into much less depending on a selected writing course or bodily display orientation.

Demo

Use the dropdowns to strive totally different languages, writing-mode values, and course. Watch how the textual content, the container, and the inline and block axis indicators change.

The language selector units the standard values for every script, however you possibly can override them to experiment. Discover that writing-mode adjustments greater than the orientation of the textual content. It additionally adjustments how all the container and its contents circulate.

Browser Help

The writing-mode property is outlined within the CSS Writing Modes Degree 4 specification and is broadly out there throughout trendy browsers.

Associated properties

Associated articles

Tags: CSSTrickswritingmode
Admin

Admin

Next Post
Meta Open-Sources Astryx: An Agent-Prepared React Design System With 150+ Accessible Parts, Seven Themes, and a CLI

Meta Open-Sources Astryx: An Agent-Prepared React Design System With 150+ Accessible Parts, Seven Themes, and a CLI

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended.

ChatGPT Will Quickly Roll Again Some Of Its Most Controversial Adjustments

ChatGPT Will Quickly Roll Again Some Of Its Most Controversial Adjustments

October 15, 2025
I Reviewed Greatest Operational Threat Administration Software program: Prime 8 Picks

I Reviewed Greatest Operational Threat Administration Software program: Prime 8 Picks

April 16, 2025

Trending.

High LLM Observability and Analysis Platforms in 2026: Langfuse, LangSmith, Braintrust, Arize, and Extra In contrast

High LLM Observability and Analysis Platforms in 2026: Langfuse, LangSmith, Braintrust, Arize, and Extra In contrast

August 9, 2026
Telegram ban in India sparks a rush to VPNs, rival apps

Telegram ban in India sparks a rush to VPNs, rival apps

June 19, 2026
AI & data-driven Starbucks – Deep Brew

AI & data-driven Starbucks – Deep Brew

May 18, 2026
The Full Information to EcoGPT

The Full Information to EcoGPT

June 6, 2026
Self-Coding AI: Breakthrough or Hazard?

Self-Coding AI: Breakthrough or Hazard?

July 4, 2025

AimactGrow

Welcome to AimactGrow, your ultimate source for all things technology! Our mission is to provide insightful, up-to-date content on the latest advancements in technology, coding, gaming, digital marketing, SEO, cybersecurity, and artificial intelligence (AI).

Categories

  • AI
  • Coding
  • Cybersecurity
  • Digital marketing
  • Gaming
  • SEO
  • Technology

Recent News

OpenAI brokers hijacked German web site earlier than Hugging Face hack, report claims

OpenAI brokers hijacked German web site earlier than Hugging Face hack, report claims

September 6, 2026
Unpatched Magento and Adobe Commerce Zero-Day Exploited to Backdoor On-line Shops

Unpatched Magento and Adobe Commerce Zero-Day Exploited to Backdoor On-line Shops

September 6, 2026
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved