.main-timeline{ font-family: 'Poppins', sans-serif; } .main-timeline:after{ content: ''; display: block; clear: both; } .main-timeline .timeline{ width: 50%; margin: 0 5px 15px 0; float: left; } .main-timeline .timeline-content{ background: linear-gradient(to right,transparent,#eee); min-height: 120px; padding: 120px 20px 20px; display: block; position: relative; z-index: 1; } .main-timeline .timeline-content:hover{ text-decoration: none; } .main-timeline .timeline-icon{ color: #555; background: #eee; font-size: 40px; text-align: center; line-height: 80px; width: 70px; height: 80px; position: absolute; left: 20px; top: 20px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); } .main-timeline .timeline-year{ color: #fff; background-color: #FF9521; font-size: 22px; font-weight: 600; padding: 13px 30px; border-radius: 0 0 10px 10px; position: absolute; top: 0; right: 0; } .main-timeline .timeline-year:after{ content: ''; background-color: #DE7101; height: 40px; width: 20px; border-radius: 0 0 10px 0; transform: rotate(-20deg); position: absolute; right: -8px; top: 3px; z-index: -1; } .main-timeline .title{ color: #FF9521; font-size: 20px; font-weight: 600; letter-spacing: 1px; text-transform: capitalize; margin: 0 0 7px; } .main-timeline .description{ color: #666; font-size: 13px; font-weight: 400; line-height: 21px; letter-spacing: 1px; margin: 0; } .main-timeline .timeline:nth-child(even){ margin: 0 0 15px 5px; float: right; } .main-timeline .timeline:nth-child(even) .timeline-content{ background: linear-gradient(to left,transparent,#eee); } .main-timeline .timeline:nth-child(even) .timeline-icon{ left: auto; right: 0; } .main-timeline .timeline:nth-child(even) .timeline-year{ left: 0; right: auto; } .main-timeline .timeline:nth-child(even) .timeline-year:after{ border-radius: 0 0 0 10px; transform: rotate(20deg); left: -8px; right: 0; } .main-timeline .timeline:nth-child(2) .timeline-year{ background-color: #00B7B5; } .main-timeline .timeline:nth-child(2) .timeline-year:after{ background-color: #0073A1; } .main-timeline .timeline:nth-child(2) .title{ color: #00B7B5; } .main-timeline .timeline:nth-child(3) .timeline-year{ background-color: #F03C5B; } .main-timeline .timeline:nth-child(3) .timeline-year:after{ background-color: #BC173F; } .main-timeline .timeline:nth-child(3) .title{ color: #F03C5B; } .main-timeline .timeline:nth-child(4) .timeline-year{ background-color: #8743B5; } .main-timeline .timeline:nth-child(4) .timeline-year:after{ background-color: #592283; } .main-timeline .timeline:nth-child(4) .title{ color: #8743B5; } @media screen and (max-width:767px){ .main-timeline .timeline, .main-timeline .timeline:nth-child(even){ width: 100%; padding: 0 10px; margin: 0 0 30px; } }