Grow your CSS skills. Land your dream job.

How to Make Multiple Columns

  • Anonymous
    # April 15, 2013 at 8:32 am

    How to make multiple column like newspaper using css3?

    # April 15, 2013 at 8:40 am

    This is one simple way to do it.

    [http://cdpn.io/mEKdF](http://cdpn.io/mEKdF)

    # April 15, 2013 at 9:45 am

    You can use the CSS3 multicolumn layout: http://www.w3.org/TR/css3-multicol/

    Very limited support though: http://caniuse.com/#feat=multicolumn

    # April 16, 2013 at 10:27 am

    Chris made a video on this a while back, but he makes an entire grid system.

    http://css-tricks.com/video-screencasts/115-dont-overthink-it-grids/

    # April 16, 2013 at 11:26 am

    I’ve been experimenting in Codepen.

    It’s all unprefixed and as @Senff said….has very limited support.

    http://codepen.io/Paulie-D/pen/khdJH

    Odd top-margin bug on the contents which I’ve had to ‘hack’…any thoughts?

    # April 16, 2013 at 12:01 pm

    Great example @Paulie_D.
    I think you missed “column” in front of “gap”.

    # April 16, 2013 at 12:10 pm

    >@rodolpheb

    Thanks…so I did. Fixed

    # April 16, 2013 at 12:20 pm

    Actually the universal selector works (just not on Codepen). I’ve tested it on Safari, Chrome, Opera, Firefox (Mac)

    # April 16, 2013 at 12:59 pm

    Oh…I know it works **generally** but if I remove the margin-top: 0 from the p tag there is a gap at the top of the first column even with the the universal margin set to 0.

    # April 16, 2013 at 1:13 pm

    On your example:
    - with the universal margin set to 0,
    - and with the margin-top: 0 from the p tag removed
    it works.
    Try without using Codepen. :)

    # April 16, 2013 at 1:15 pm

    Hmmm….must be a Codepen issue then.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".