.timeline { position: relative; width: 860px; margin: 0px auto; padding: 20px; list-style-type: none; @media(max-width: 860px) { width: 100%; padding: 4em 0 1em 0; } &:before { position: absolute; left: 50%; top: 0; content: ' '; display: block; width: 6px; height: 100%; margin-left: -3px; background: rgb(80,80,80); z-index: 5; } li { padding: 1em 0; @media(max-width: 860px) { padding: 2em 0; } &::after { content: ""; display: block; height: 0; clear: both; visibility: hidden; } } } .direction-l { position: relative; width: 400px; float: left; text-align: right; @media(max-width: 860px) { float: none; width: 100%; text-align: center; } .flag { box-shadow: -1px 1px 1px rgba(0,0,0,0.15); &:after { content: ""; position: absolute; left: 100%; top: 50%; height: 0; width: 0; margin-top: -8px; border: solid transparent; border-left-color: rgb(248,248,248); border-width: 8px; pointer-events: none; @media(max-width: 860px) { content: ""; position: absolute; left: 50%; top: -8px; height: 0; width: 0; margin-left: -8px; border: solid transparent; border-bottom-color: rgb(255,255,255); border-width: 8px; pointer-events: none; } } } .time-wrapper { float: left; @media(max-width: 860px) { float: none; } } } .direction-r { position: relative; width: 400px; float: right; @media(max-width: 860px) { float: none; width: 100%; text-align: center; } .flag { box-shadow: 1px 1px 1px rgba(0,0,0,0.15); &:after { content: ""; position: absolute; right: 100%; top: 50%; height: 0; width: 0; margin-top: -8px; border: solid transparent; border-right-color: rgb(248,248,248); border-width: 8px; pointer-events: none; @media(max-width: 860px) { content: ""; position: absolute; left: 50%; top: -8px; height: 0; width: 0; margin-left: -8px; border: solid transparent; border-bottom-color: rgb(255,255,255); border-width: 8px; pointer-events: none; } } &:before { left: -40px; } } .time-wrapper { float: right; @media(max-width: 860px) { float: none; } } } .flag-wrapper { position: relative; display: inline-block; text-align: center; @media(max-width: 860px) { text-align: center; } .flag { position: relative; display: inline; background: rgb(248,248,248); padding: 6px 10px; border-radius: 5px; font-weight: 600; text-align: left; @media(max-width: 860px) { background: rgb(255,255,255); z-index: 15; } } } .direction-l .flag:before, .direction-r .flag:before { position: absolute; top: 50%; right: -40px; content: ' '; display: block; width: 12px; height: 12px; margin-top: -10px; background: #fff; border-radius: 10px; z-index: 10; @media(max-width: 860px) { position: absolute; top: -30px; left: 50%; content: ' '; display: block; margin-left: -10px; } } .time-wrapper { display: inline; line-height: 1em; font-size: 0.66666em; vertical-align: middle; @media(max-width: 860px) { display: block; position: relative; margin: 4px 0 0 0; z-index: 14; } .time { display: inline-block; padding: 4px 6px; background: rgb(248,248,248); } } .desc { margin: 1em 0.75em 0 0; font-size: 0.9em; font-style: italic; line-height: 1.5em; a { text-decoration: none; &:hover { text-decoration: underline; } } @media(max-width: 860px) { position: relative; margin: 1em 1em 0 1em; padding: 1em; background: rgb(245,245,245); box-shadow: 0 0 1px rgba(0,0,0,0.20); z-index: 15; } }