0

I have a parent DIV with variable width. It can have many DIVs.

Now, what i want is as it renders, if it cannot accomodate all its child DIVs then, may be collapse them from now and as user hover or scrolls, these DIVs should appear.

Something like this:

enter image description here Also, I am trying to display those coloured child DIV as shown in the image. Those colored DIVs should appear with margin on 4 of their sides.

Here is the JS Fiddle

http://jsfiddle.net/Dw2Qk/

HTML:

<div class="timeline-details">
    <div>
        <span id="data-details">Some information </span>
    </div>
    <div>
        <span class="range-icon" style="background: green">ABC </span>
        <span class="range-label">ABC1 </span>
        <span class="range-time">testing 123 </span>
    </div>
    <div>
        <span class="range-icon" style="background: blue">123 </span>
        <span class="range-label">AFG5 </span>
        <span class="range-time">testing 3 34 5 6</span>
    </div>
    <div>
        <span class="range-icon" style="background: orange">UTY </span>
        <span class="range-label">AFG </span>
        <span class="range-time">blah blhab lha </span>
    </div>
    <div>
        <span class="range-icon" style="background: blue">DIO </span>
        <span class="range-label">DIO90 </span>
        <span class="range-time">testing last </span>
    </div>
</div>

CSS:

.timeline-details {     
    text-transform: uppercase;  
    height: 80px;   
    display: inline-block;  
    border: 1px solid rgb(215, 215, 218);
    text-align: center; 
}

.timeline-details div {     
    display: inline-block;  
    padding: none;  
    margin: none;   
    border-right: 1px solid rgb(215, 215, 218);     
    height: 100%;  
}

.timeline-details span {    
    position: relative;  
}

.timeline-details .range-icon {     
    width: 40%;     
    height: 100%;   
    float: left;    
    text-align: center  
} 

.timeline-details .range-label {    
    width: 60%;     
    height: 50%;    
    float: right;   
    text-align: left
} 

.timeline-details .range-time {     
    width: 60%;     
    height: 50%;    
    float: right;   
    text-align: left  
}

Any help/suggestions/hint/idea will be appreciated

Thanks

Guy
  • 1,434
  • 1
  • 19
  • 33
Cute_Ninja
  • 4,742
  • 4
  • 39
  • 63
  • Is your issue similar to this discussion: [On Hover Show Element](http://stackoverflow.com/questions/18749276/css-on-hover-show-another-element) – Alan Wells Jun 30 '14 at 18:05
  • No, not really. What I want to do is that imagin if there is a parent DIV which can only fit in 3 children DIV s at a tiem and if there are extra DIVs that are not able to fit inside a parent DIV, a thin DIV should appear at the end, which when hovered should show the next 3 DIVs and so on. – Cute_Ninja Jun 30 '14 at 18:07

0 Answers0