1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

DIV element

Discussion in 'CSS' started by dhavalprkh, Apr 20, 2014.

  1. #1
    Hi,



    I have attached image please have a look.

    DIV tags.png

    A to I are DIV blocks, I wanted to show them in given manner, There is no specific pattern and there could be lots of DIV blocks are there. In short, DIV element one after another with DIFFERENT heights and with FIXED widths and one by one need to display.

    It would be appreciate if anyone can guide me.

    Thanks in advance.
     
    dhavalprkh, Apr 20, 2014 IP
  2. xXxpert

    xXxpert Well-Known Member

    Messages:
    604
    Likes Received:
    34
    Best Answers:
    9
    Trophy Points:
    165
    Digital Goods:
    7
    #2
    xXxpert, Apr 20, 2014 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,998
    Best Answers:
    253
    Trophy Points:
    515
    #3
    using column-count as the example @xXxpert linked to will give the wrong order though -- instead of
    ABC
    DEF
    GHI

    You'll get
    ADG
    BEH
    CFI

    as that's how column-count works -- and there's no option to flip it the other way.

    Generally speaking layout concepts like this are what I like to call "not viable for web deployment" -- websites that do this usually get down on their knees in front of the proverbial equine of short stature, and generally speaking I would advise against doing this.

    THOUGH if you know how many there are total to be shown, and you don't give a flying purple fish about code order, just build it as a normal old-fashioned three column layout with them out-of-order.
     
    deathshadow, Apr 20, 2014 IP
  4. Helge Sverre

    Helge Sverre Prominent Member Affiliate Manager

    Messages:
    840
    Likes Received:
    99
    Best Answers:
    2
    Trophy Points:
    305
    Digital Goods:
    2
    #4
    I suppose you can float:left; all of the divs?
     
    Helge Sverre, May 6, 2014 IP
  5. sarbjeet singh

    sarbjeet singh Greenhorn

    Messages:
    19
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #5
    you can use blocksit.js for this
     
    sarbjeet singh, May 6, 2014 IP
  6. dhavalprkh

    dhavalprkh Member

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #6
    Thank You all of you for your reply, I will try above options and get back to you.
     
    dhavalprkh, May 10, 2014 IP