Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Responsive timeline UI with Bootstrap3

How can I create a UI with a vertical timeline bar where on desktop it shows as timeline-bar in middle and event boxes on both sides. On smaller mobile screen, the timeline-bar on the left and all event boxes on the right.

Using JQuery in combination with responsive classes is okay, just need to show all event boxes, so hiding alternate boxes with xs-hidden won't do.

JS Fiddle: http://jsfiddle.net/n82ek/2/

Reduce expand size of result window to see responsive behavior.

What needs to happen? Move the bar left for xs display Nice to have: Also add the timelineDot on line alongside the box.

Please Refer to a sample timeline ui pattern image attached.... and Thank you!

enter image description here

Current HTML:

<div class="container">     <div class="timelineBar"></div>     <div class="timelineDot"></div>     <div class="row">         <div class="col-sm-6">         </div>         <div class="col-sm-6">             <div class="shadowBox">right</div>         </div>     </div>     <div class="row">         <div class="col-sm-6">             <div class="shadowBox">left</div>         </div>         <div class="col-sm-6">         </div>     </div>     <div class="row">         <div class="col-sm-6">         </div>         <div class="col-sm-6">             <div class="shadowBox">right</div>         </div>     </div>     <div class="row">         <div class="col-sm-6">             <div class="shadowBox">left</div>         </div>         <div class="col-sm-6">         </div>     </div> </div> 

Current CSS:

@import url('https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'); .timelineBar {     width: 2px;     background-color: #BDBDBD;     display: inline-block;     position: absolute;     height: 100%;     left: 50%;     margin-left: 10px;     margin-right: 10px; } .shadowBox {     box-shadow: rgba(0, 0, 0, 0.796875) 0px 0px 2px;     -webkit-box-shadow: rgba(0, 0, 0, 0.796875) 0px 0px 2px;     border:2px solid white;     border-radius: 10px;     margin: 10px;     background-color: #FFFFFF; } .timelineDot{     width: 10px;     height: 10px;     background-color: #BDBDBD;     opacity: 1;     display: inline-block;     position: absolute;     left: 50%;     top: 15px;     margin-left: 6px;     border-radius: 10px; } 
like image 278
Manish Pradhan Avatar asked Jan 03 '14 03:01

Manish Pradhan


2 Answers

"Timeline (responsive)" snippet:

This looks very, very close to what your example shows. The bootstrap snippet linked below covers all the bases you are looking for. I've been considering it myself, with the same requirements you have ( especially responsiveness ). This morphs well between screen sizes and devices.

You can fork this and use it as a great starting point for your specific expectations:

  • http://bootsnipp.com/snippets/featured/timeline-responsive

Here are two screenshots I took for you... wide and thin:

widethin

like image 184
digitalextremist Avatar answered Oct 11 '22 12:10

digitalextremist


BootFlat

You can also try BootFlat, which has a section in their documentation specifically for crafting Timelines:

enter image description here

like image 24
SMHasnain Avatar answered Oct 11 '22 13:10

SMHasnain