Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design [Solved] Divide li tag into Proper Columns

  • This topic is empty.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #203867
    harsh1994
    Participant

    CSS Design Issue:

    I want to divide li tag into proper Columns. Design for the Web Page is given below

    http://imagizer.imageshack.us/a/img673/8615/l3xBEC.jpg

    This is the Demo Code I have tried to written

    http://codepen.io/anon/pen/EjWqpM

    As seen in the above figure I want to display 3 li tag per each column under each title. I also want on main container div to have only horizontally scrolling not vertically

    If you cannot understand what I am trying to say please ask me at [email protected]

    #203879
    Paulie_D
    Member

    Something like column-count?

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

    #203886
    harsh1994
    Participant

    I know it is possible using column-count but don’t know how to use it.

    The Demo Code I tried to wrote is :

    #main > li > ul{
    column-count:auto;
    -moz-column-count:auto;
    -webkit-column-count:auto;
    }
    #main > li > ul li{
    column-width:300px;
    -moz-column-width:300px;
    -webkit-column-width:300px;
    }
    

    But not working properly so, can you show me how to make proper use of column-count

    #203892
    Paulie_D
    Member

    Why are you using auto…you wanted 3 columns…just use 3 like I did?

    #203893
    harsh1994
    Participant

    I don’t want exactly the 3 column. I want 3 li tag per each column ( As seen in figure “List 4 El” starts from new Column ). As the li tag increases column increases.

    Please see this Img :
    http://imagizer.imageshack.us/a/img673/8615/l3xBEC.jpg

    li tag displayed under each title are 3 per each column.

    Also I want horizontal scrolling not vertical so I have given the main container div a fixed height with css white-space:nowrap property.

    Hope you understand what I am trying to say…!!!

    #203897
    Paulie_D
    Member

    Ohhh…that’s gonna be funkyy…

    Not sure you can do that without some magic numbers

    #203898
    Paulie_D
    Member

    Hmmm…flexbox might be an option

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

    #203899
    harsh1994
    Participant

    Yeah I think you are right Flexbox is the only solution. But please post if you find any better solution than Flexbox.

    #203987
    aiden1988
    Participant

    Hi Paulie, thanks for the explanation, I will try to follow the code and will check the output.

    #204558
    harsh1994
    Participant

    I have developed something similiar to the design I have posted in the question so I would like to share with you all.

    Please update it to make the design more proper

    https://codepen.io/anon/pen/rVJEOY

Viewing 10 posts - 1 through 10 (of 10 total)
  • The forum ‘Design’ is closed to new topics and replies.