Multiple Columns in CSS

Multiple Columns in CSS ka use karke hum text ko newspaper-style columns me divide kar sakte hain. Isse content zyada clean, readable aur professional lagta hai, especially jab content lamba ho.

Ek hi paragraph ko multiple vertical sections (columns) me split kiya jata hai jisse reading easy ho jati hai.


CSS Multi-column Properties

Multiple Columns in CSS implement karne ke liye important properties:

  • column-count → kitne columns chahiye
  • column-gap → columns ke beech ka space
  • column-rule-style → columns ke beech line ka style
  • column-rule-width → line ki thickness
  • column-rule-color → line ka color
  • column-rule → shorthand (style + width + color ek saath)
  • column-span → element kitne columns cover kare
  • column-width → column ki ideal width

CSS Create Multiple Columns

Multiple Columns in CSS create karne ke liye column-count property use hoti hai.

Example:

CSS Create Multiple Columns

Isme content automatically 3 columns me divide ho jayega.


CSS Column Gap

Columns ke beech ka spacing define karne ke liye column-gap use hota hai.

Example:

Multiple Columns in CSS: CSS Column Gap

Isse columns ke beech 25px ka gap create hoga.


CSS Column Rule

Columns ke beech ek vertical dividing line add karne ke liye column-rule use hota hai.

Example:

CSS Column Rule

Yeh columns ke beech ek straight line show karega.


CSS Column Span

Kisi element (mostly heading) ko sabhi columns ke across dikhane ke liye column-span use hota hai.

Example:

CSS Column Span

Heading poore columns ke upar ek line me display hogi.


CSS Column Width

column-width browser ko suggest karta hai ki har column ki width kitni honi chahiye. Browser khud decide karega kitne columns banenge.

Example:

CSS Column Width

Isse layout responsive ban jata hai.

Leave a Comment