

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set how many columns an element should span across with CSS
To set how many columns an element should span, use the column-span property. You can try to run the following code to implement the column-span property:
Example
<!DOCTYPE html> <html> <head> <style> .demo { column-count: 4; column-rule-color: maroon; column-rule-style: dashed; } h1 { column-span: all; } </style> </head> <body> <div class = "demo"> <h1>This is our heading.</h1> This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </div> </body> </html>
- Related Questions & Answers
- Set how many columns an element should span across with JavaScript.
- Set how many times an Animation should run with CSS
- How to specify the number of columns an element should be divided into with CSS
- How to set or return the number of columns an element should be divided into with JavaScript?
- Set the right margin of an element with CSS
- Set the top margin of an element with CSS
- Set the font stretch of an element with CSS
- Set the background color of an element with CSS
- Set the background image of an element with CSS
- Set the number of columns to span in HTML
- How to specify the number of columns a table cell should span in HTML?
- Shorthand property to set columns with CSS
- How to set whether an element should be visible in JavaScript?
- How to set the number of rows a table cell should span in HTML?
- Determine whether an element should be visible when not facing the screen with CSS
Advertisements