ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Squidoo CSS: multi-column text

Updated on May 19, 2014

CSS3 multiple columns

You can divide long text snippets into multiple columns with a simple CSS trick. It's not difficult, and it can be customized in a plenty of ways.

In this lens I'll show you how to do it, step by step. You don't need any knowledge of HTML or CSS. I'll also discuss why this CSS trick can be useful.

Preview

This text is divided into two columns. You can divide text into more columns as well: three, four, five, and so on. If you are applying this CSS trick into your Squidoo lens, I recommend using no more than three columns. Too many columns look ugly and the text will become unreadable.

See the grey line between the columns? You can change its thickness, its color, its style, and you can completely get rid of it. I'll show you later how.

Can't see any columns but just one big piece of text? Then you are most probably using an outdated web browser. I recommend getting a newer one. Modern browsers are not only free, but they also provide better functionality, more pleasant browsing experience, and more advanced protection against security risks. I recommend getting either Google Chrome (my choice) or Mozilla Firefox (this is good as well). They are both free.

So, if you can't see any columns, click here to see a picture how this text should look like.

How: the basics

Below is a basic code for two column CSS code. If you want to immediately deploy this CSS trick, please feel free to do so. However, if you want to know how to modify it, please continue reading this lens.

Copy the code snippet below and paste it into your module. Change only the text that is green in the code snippet below.

Your text here. Don't change the blue text. Only green.

How: number of columns

Change the red numbers below to change the number of columns. By default the number is two. You can try three and even four, but please, don't be greedy. A five column paragraph doesn't look good.

2

; -moz-column-gap: 40px; -moz-column-rule: 1px solid #c4c8cc; -webkit-column-count: 2; -webkit-column-gap: 40px; -webkit-column-rule: 1px solid #c4c8cc; column-count: 2; column-gap: 40px; column-rule: 1px solid #c4c8cc;">Your text here. Don't change the blue text. Only green and red.

A five column paragraph doesn't look good.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec erat massa, dictum at viverra in, pulvinar non ipsum. Donec odio tortor, cursus eu facilisis id, sodales ac est. Mauris iaculis adipiscing nunc, a auctor justo tristique ut. Proin interdum nibh justo. Sed eget orci sit amet libero sollicitudin venenatis. Suspendisse tristique arcu sit amet massa convallis vitae tristique ligula faucibus. Integer vitae urna velit. Integer vestibulum orci sit amet eros interdum non eleifend dolor viverra. Ut consectetur libero mi. Ut vitae nunc nulla, id rhoncus purus.

How: the gap between columns

You can change the width of the gap between columns by changing the red text. By default it's 40 pixels, which is an ideal width.

40px

; -moz-column-rule: 1px solid #c4c8cc; -webkit-column-count: 2; -webkit-column-gap: 40px; -webkit-column-rule: 1px solid #c4c8cc; column-count: 2; column-gap: 40px; column-rule: 1px solid #c4c8cc;">Your text here. Don't change the blue text. Only green and red.

The gap between these paragraphs is now 20 pixels (20px). Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse elementum, eros ac pretium condimentum, orci odio rhoncus augue, posuere fringilla ipsum diam fringilla augue. Curabitur nec pellentesque ante. Morbi iaculis lacus quis justo vulputate semper.

How: the line between columns

You can change the thickness, color, and style of the line between columns. You can also get rid of it. Change the red text like this:

  • 1Thickness

    Change the first value. By default it's 1px, you can try e.g. 3px.

  • 2Style

    Change the second value. By default it's solid, you can try e.g. dotted. Click here to see available styles.

  • 3Color

    Change the third value. By default it's #c4c8cc (light grey). Either write a name of a color (e.g. red or blue), or a hex color code (e.g. #f4656f (pink)). (Psst...be sure to check out my lens Funny Hex Colors.)

1px solid #c4c8cc

; -webkit-column-count: 2; -webkit-column-gap: 40px; -webkit-column-rule: 1px solid #c4c8cc; column-count: 2; column-gap: 40px; column-rule: 1px solid #c4c8cc;">Your text here. Don't change the blue text. Only green and red.

My gap line is 3px dashed #b59290. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse elementum, eros ac pretium condimentum, orci odio rhoncus augue, posuere fringilla ipsum diam fringilla augue. Curabitur nec pellentesque ante. Morbi iaculis lacus quis justo vulputate semper.

  • 4Getting rid of the line

    Remove the red text.

-moz-column-rule: 1px solid #c4c8cc;

-webkit-column-count: 2; -webkit-column-gap: 40px; -webkit-column-rule: 1px solid #c4c8cc; column-count: 2; column-gap: 40px; column-rule: 1px solid #c4c8cc;">Your text here. Don't change the blue text. Only green and red.

My gap doesn't have a line at all! Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse elementum, eros ac pretium condimentum, orci odio rhoncus augue, posuere fringilla ipsum diam fringilla augue. Curabitur nec pellentesque ante. Morbi iaculis lacus quis justo vulputate semper.

That's a wrap!

Did you get it? Now you (should) know how to do the multi-column text CSS trick. Please vote below and please be honest. If you have questions, be sure to ask me. There's a guestbook at the bottom of this lens.

Did you understand?

See results

Want more CSS?

The book below is a must for you if you want to learn CSS. If you want to, you'd better also learn HTML. CSS and HTML go together, hand in hand.

Was this CSS trick useful? Are you already using it? Link to your lens using this CSS trick below, and feel free to add other comments as well!

HTML is allowed, spamming is not. Comments are moderated.

working

This website uses cookies

As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://corp.maven.io/privacy-policy

Show Details
Necessary
HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
LoginThis is necessary to sign in to the HubPages Service.
Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
AkismetThis is used to detect comment spam. (Privacy Policy)
HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
Features
Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
MavenThis supports the Maven widget and search functionality. (Privacy Policy)
Marketing
Google AdSenseThis is an ad network. (Privacy Policy)
Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
Index ExchangeThis is an ad network. (Privacy Policy)
SovrnThis is an ad network. (Privacy Policy)
Facebook AdsThis is an ad network. (Privacy Policy)
Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
AppNexusThis is an ad network. (Privacy Policy)
OpenxThis is an ad network. (Privacy Policy)
Rubicon ProjectThis is an ad network. (Privacy Policy)
TripleLiftThis is an ad network. (Privacy Policy)
Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
Statistics
Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
ClickscoThis is a data management platform studying reader behavior (Privacy Policy)