Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Jun 2014
    Posts
    5
    Member #
    39517

    [CSS] Div-Container Automatic order

    Hello,

    I'm creating a design for a friend and he wants to create DIVs,
    which are not sized the same but ordered automatically.

    An example:

    box_order.jpg

    Example Code (the numbers would be text, which isn't the same length):

    HTML Code:
    <div class="content">1</div>
    <div class="content">2</div>
    <div class="content">3</div>
    <div class="content">4</div>
    <div class="content">5</div>
    I wonder if it is possible in CSS and HTML. (if it is possible in Javascript I would be also interested in a solution)

    Sry that I can't describe my problem even more and I hope that you understand me.

  2.  

  3. #2
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    Do you want this done dynamically? If this is static just lay it out using css.


    Regretfully sent from my iPhone using Tapatalk during lunch and other breaks

  4. #3
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    I'm not even certain how you would go about this using compatible technologies. There is flexbox, but the syntax is different from browser to browser, and support is very thin to begin with. Then, there's CSS columns. Still, really bad support.

    There is Masonry.js, which is how Pinterest does it. Maybe that'll do what you need. It does the trick with absolute positioning. Not something I'd normally recommend.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 03:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com