Doing shaper cornsers in css - html

I am trying to do sharp corners in css, it works only 50%, if you check the jsfiddle you will notice that on border top left and top right on the blue ribbon banner a remaining border which should not be there. How can I remove that border?
http://jsfiddle.net/XSs9L/699/
HTML
<div class="wrap_post_course">
<div class="ribbon_banner mega_course"><span class="name_type"><span class="tl"></span><span class="tr"></span>MEGA COURSES</span>
</div>
<div class="post_item post_item_courses post_item_courses_3 post_format_standard odd">
<div class="course-preview -course post_content ih-item colored square effect_dir left_to_right">
<div class="course-image post_featured img">
<a href="http://newskillsacademy.co.uk/course/ultimate-writing-course/"><img width="331" height="166" sizes="(max-width: 331px) 100vw, 331px" srcset="http://newskillsacademy.co.uk/wp-content/uploads/2016/04/writing-course-1-331x166.jpg 331w, http://newskillsacademy.co.uk/wp-content/uploads/2016/04/writing-course-1-75x39.jpg 75w"
alt="Writing Course" class="attachment-homepage-thumb size-homepage-thumb wp-post-image" src="http://newskillsacademy.co.uk/wp-content/uploads/2016/04/writing-course-1-331x166.jpg"></a>
</div>
<div class="course-meta">
<header class="course-header">
<h5 class="nomargin">The Ultimate Writing Course</h5>
</header>
</div>
<div class="course-price product-price">
<div class="price-text"><del><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">£</span>598.00</span></del> <ins><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">£</span>399.00</span></ins></div>
</div>
<section class="find-more-now">
FIND OUT MORE
</section>
</div>
</div>
</div>
CSS
.ribbon_banner {
float: right;
position: relative;
width: 75px;
z-index: 99;
}
.ribbon_banner span.name_type {
background: #17a9ce none repeat scroll 0 0;
box-shadow: 0 3px 5px -7px rgba(0, 0, 0, 1);
color: #fff;
display: block;
font-size: 16px;
font-weight: bold;
line-height: 20px;
margin-left: -50px;
margin-top: 29px;
padding: 5px;
position: absolute;
text-align: center;
text-transform: uppercase;
transform: rotate(45deg);
width: 152px;
}
.ribbon_banner span.name_type:before {
content: "";
position: absolute;
left: 0px;
top: 100%;
z-index: -1;
border-color: #17a9ce transparent transparent #17a9ce;
border-style: solid;
border-width: 3px;
}
.ribbon_banner span.name_type:after {
content: "";
position: absolute;
right: 0px;
top: 100%;
z-index: -1;
border-color: #17a9ce transparent transparent #17a9ce;
border-style: solid;
border-width: 3px;
}
.ribbon_banner .tl,
.ribbon_banner .tr,
.ribbon_banner .bl,
.ribbon_banner .br {
width: 0;
height: 0;
position: absolute;
}
.ribbon_banner .tl {
top: 0;
left: 0;
border-top: 24px solid #f4f7f9;
border-right: 24px solid transparent;
}
.ribbon_banner .tr {
top: 0;
right: 0;
border-top: 24px solid #f4f7f9;
border-left: 24px solid transparent;
}
.wrap_post_course {
display: inline-block;
margin: 40px;
width: 335px;
}

it seems to be a bug when rendering a rotated element because there is no such effect when the degree is 0. So I suggest to move .tr and .tl one pixel outer to wrap the effect.
.ribbon_banner {
float: right;
position: relative;
width: 75px;
z-index: 99;
}
.ribbon_banner span.name_type {
background: #17a9ce none repeat scroll 0 0;
box-shadow: 0 3px 5px -7px rgba(0, 0, 0, 1);
color: #fff;
display: block;
font-size: 16px;
font-weight: bold;
line-height: 20px;
margin-left: -50px;
margin-top: 29px;
padding: 5px;
position: absolute;
text-align: center;
text-transform: uppercase;
transform: rotate(45deg);
width: 152px;
}
.ribbon_banner span.name_type:before {
content: "";
position: absolute;
left: 0px;
top: 100%;
z-index: -1;
border-color: #17a9ce transparent transparent #17a9ce;
border-style: solid;
border-width: 3px;
}
.ribbon_banner span.name_type:after {
content: "";
position: absolute;
right: 0px;
top: 100%;
z-index: -1;
border-color: #17a9ce transparent transparent #17a9ce;
border-style: solid;
border-width: 3px;
}
.ribbon_banner .tl,
.ribbon_banner .tr,
.ribbon_banner .bl,
.ribbon_banner .br {
width: 0;
height: 0;
position: absolute;
}
.ribbon_banner .tl {
top: -1px;
left: -1px;
border-top: 24px solid #f4f7f9;
border-right: 24px solid transparent;
}
.ribbon_banner .tr {
top: -1px;
right: -1px;
border-top: 24px solid #f4f7f9;
border-left: 24px solid transparent;
}
.wrap_post_course {
display: inline-block;
margin: 40px;
width: 335px;
}
<div class="wrap_post_course">
<div class="ribbon_banner mega_course"><span class="name_type"><span class="tl"></span><span class="tr"></span>MEGA COURSES</span>
</div>
<div class="post_item post_item_courses post_item_courses_3 post_format_standard odd">
<div class="course-preview -course post_content ih-item colored square effect_dir left_to_right">
<div class="course-image post_featured img">
<a href="http://newskillsacademy.co.uk/course/ultimate-writing-course/"><img width="331" height="166" sizes="(max-width: 331px) 100vw, 331px" srcset="http://newskillsacademy.co.uk/wp-content/uploads/2016/04/writing-course-1-331x166.jpg 331w, http://newskillsacademy.co.uk/wp-content/uploads/2016/04/writing-course-1-75x39.jpg 75w"
alt="Writing Course" class="attachment-homepage-thumb size-homepage-thumb wp-post-image" src="http://newskillsacademy.co.uk/wp-content/uploads/2016/04/writing-course-1-331x166.jpg"></a>
</div>
<div class="course-meta">
<header class="course-header">
<h5 class="nomargin">The Ultimate Writing Course</h5>
</header>
</div>
<div class="course-price product-price">
<div class="price-text"><del><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">£</span>598.00</span></del> <ins><span class="woocommerce-Price-amount amount"><span class="woocommerce-Price-currencySymbol">£</span>399.00</span></ins></div>
</div>
<section class="find-more-now">
FIND OUT MORE
</section>
</div>
</div>
</div>

Related

How can I make my footer to meet the end of the VP

I'm trying to make a google clone page, I am trying to make the footer to be sticked to the end of the viewport. But when I try position: absolute bottom: 0, it sticks to the end, but the page overflows.
I tried to use html, body and * height: 100% but it doesn't work.
I share my github repository for you to check the code: https://github.com/Diefonro/HTML-CSS
You can also check the webpage (on a PC) at: https://diefonro.github.io/HTML-CSS/
Code:
<body>
<header>
<nav>
<div class="nav">
<div id="nav-g-i">
<a class="menu-item" href="#">Gmail</a>
<a class="menu-item" href="https://google.com/imghp">Images</a>
</div>
<div class="" id="nav-gr-a">
<div class="dd-cont">
<div class="grid">
<img
id="grid"
src="assets/icons/apps_black_24dp.svg"
alt="apps-icon"
/>
</div>
<div class="drop-d">
<div class="dd-item">
<img
id="dd-search"
src="assets/icons/google-logo-dd.png"
alt="google-search-icon"
/>
<p>Search</p>
</div>
<div class="dd-item">
<img
id="dd-maps"
src="assets/icons/google-maps-dd.png"
alt="google-maps-icon"
/>
<p>Maps</p>
</div>
<div class="dd-item">
<img
id="dd-keep"
src="assets/icons/google-keep-dd.png"
alt="google-keep-icon"
/>
<p>Keep</p>
</div>
<div class="dd-item">
<img
class="dd-drive"
src="assets/icons/Google_Drive_dd.png"
alt="google-keep-icon"
/>
<p>Drive</p>
</div>
<div class="dd-item">
<img
class="dd-calendar"
src="assets/icons/512px-Google_Calendar_icon_dd.png"
alt="google-calendar-icon"
/>
<p>Calendar</p>
</div>
<div class="dd-item">
<img
class="dd-photos"
src="assets/icons/google_photos-dd.png"
alt="google-photos-icon"
/>
<p>Photos</p>
</div>
</div>
</div>
<img
id="profile-pic"
src="assets/icons/account_circle_black_24dp.svg"
alt="account-icon"
/>
</div>
</div>
</nav>
</header>
<main>
<section>
<div class="logo-cont">
<img
id="google-logo"
src="assets/images/googlelogo_color_272x92dp.png"
alt="google-logo"
/>
</div>
<div class="input-cont">
<input class="input-g" type="text" />
<img
src="assets/icons/search_black_24dp.svg"
alt="search-icon"
class="search-i"
/>
<img
class="mic"
src="assets/icons/Google_mic.svg.png"
alt="voice-search-icon"
/>
</div>
<div class="btn-cont">
<button class="custom-btn">Google Search</button>
<button class="custom-btn custom-btn-l">I'm Feeling Lucky</button>
</div>
<span class="s-lang"
>Google offered in:
<a href="#" class="s-link"
><div class="ll">Español (Latinoamérica)</div></a
>
</span>
</section>
</main>
<footer>
<div class="footer-cont">
<div class="top-footer">
<span class="f1">Colombiac test</span>
</div>
<div class="bottom-footer">
<div class="left-footer">
<div class="a-li">
About
Advertising
Business
How Search works
</div>
</div>
<div class="right-footer">
Privacy
Terms
Settings
</div>
</div>
</div>
</footer>
</body>
* {
margin: 0;
}
html{
height: 100vh;
}
body {
font-family: Arial, sans-serif;
}
nav {
text-align: right;
position: relative;
top: 9px;
right: 8px;
}
#nav-g-i {
display: inline-block;
position: relative;
top: 2px;
right: 23px;
}
#nav-gr-a {
display: inline-block;
position: relative;
top: 5px;
right: 10px;
}
#grid,
#profile-pic {
opacity: 50%;
}
section {
text-align: center;
position: relative;
top: 24px;
}
.input-g {
position: relative;
bottom: 2px;
width: 500px;
line-height: 17px;
border: none;
outline: none;
}
.input-cont {
width: 553px;
height: 16px;
position: relative;
bottom: 2px;
right: 1px;
color: #222;
border: 1px solid #dfe1e5;
font-size: 13px;
padding: 14px;
border-radius: 80px;
margin: 24px 0px;
display: inline-block;
}
.input-cont:hover,
.input-cont:focus {
box-shadow: 0 1px 5px 0 rgba(32, 33, 36, 0.28);
border-color: rgba(40, 40, 41, 0);
}
.input-cont > img {
position: absolute;
top: 10px;
right: 11px;
width: 23px;
}
.input-cont .search-i {
position: absolute;
top: 11.5px;
right: 547px;
width: 20px;
opacity: 40%;
}
#grid {
position: relative;
bottom: 3px;
margin-right: 16px;
}
.menu-item {
font-size: 13px;
color: #5b5f63;
text-decoration: none;
position: relative;
bottom: 8px;
margin-right: 10px;
}
.menu-item:hover {
text-decoration: underline;
}
#profile-pic {
width: 32px;
height: 32px;
}
.btn-cont {
position: relative;
top: 3px;
}
.custom-btn {
background-color: #f2f2f291;
color: #a2a8af;
font-size: 14px;
height: 36px;
padding: 0 16px;
background-image: linear-gradient(top, #f5f5f5, #f1f1f1);
border: 1px solid transparent;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0);
color: #222;
border-radius: 5px;
}
.custom-btn:first-of-type {
margin-right: 7px;
}
.custom-btn:hover {
border: 1px solid #c6c6c656;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
color: #222;
}
.custom-btn:active {
border: 1px solid cornflowerblue;
}
.drop-d {
width: 285px;
padding: 10px;
border: 1px solid #ccc;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
text-align: center;
position: absolute;
right: 11px;
border-radius: 12px;
display: none;
}
.grid:hover {
display: inline-block;
}
.dd-item:hover {
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 8px;
}
.dd-item {
margin-top: 10px;
display: inline-block;
width: 70px;
padding: 6px 3px;
}
.dd-item > img {
height: 50px;
width: 50px;
}
.dd-item > p {
color: rgba(0, 0, 0, 0.87);
margin: 0;
margin-top: 15px;
margin-bottom: 5px;
}
.dd-cont {
display: inline-block;
}
.dd-cont:hover .drop-d {
display: block;
}
.s-lang {
font-size: 13px;
color: #333;
position: relative;
top: 30px;
right: 3px;
}
.s-lang a {
text-decoration: underline;
}
.s-lang a:visited {
color: rgb(30, 30, 179);
}
.ll {
display: inline-block;
position: relative;
left: 3px;
}
.top-footer,
.bottom-footer {
font-size: 15px;
background-color: #d6d8da49;
color: #8a8686;
position: relative;
top: 200px;
}
.top-footer{
border-bottom: 1px solid rgba(155, 155, 155, 0.267);
}
.left-footer a {
display: inline-block;
text-decoration: none;
padding: 12px;
font-size: 14px;
}
.right-footer a {
font-size: 14px;
padding: 14px;
text-decoration: none;
color: #8a8686;
}
.bottom-footer{
display: flex;
justify-content: space-between;
align-items: center;
}
.bottom-footer a:hover{
text-decoration: underline;
}
span.f1 {
display: inline-block;
margin-left: 15px;
padding: 16px;
}
.a-li {
margin-left: 20px;
}
a:visited {
color: inherit;
}
.footer-cont {
position: absolute;
bottom: 0;
width: 100%;
left: 0;
height: fit-content;
height: -moz-fit-content;
}
footer{
position: relative;
width: 100vw;
}
You can remove top: 200px on .top-footer, .bottom-footer. Why? because you have added bottom: 0 to .footer-cont which increases its position to 0 (.footer-cont) + 200px (.top-footer, .bottom-footer) = 200px down. If scroll bars in vertical bother you, you can add overflow-y: hidden style to body or html.

Angular create vertical timeline

I would like to create a Responsive vertical timeline as shown below.
sorry, I am backend developer not that strong in CSS.
I was able to achieve something as shown below
Currently, I am looking for help in positioning my div left right as shown in picture one.
I am planing to use bootstrap and fa Icon
My CSS:
$text-color: #373737;
$gray-base: #494949;
$gray-darker: #222;
$gray-dark: #333;
$gray: #555;
$gray-light: #777;
$gray-lighter: #eee;
$brand-primary: #1f9eba;
$brand-success: #59ba1f;
$brand-info: #5bc0de;
$brand-warning: #d1bd10;
$brand-danger: #ba1f1f;
/* Timeline */
.timeline {
list-style: none;
padding: 20px;
position: relative;
&:before {
top: 40px;
bottom: 0;
position: absolute;
content: " ";
width: 3px;
background-color: #eeeeee;
left: 50%;
margin-left: -1.5px;
}
.timeline-item {
margin-bottom: 20px;
position: relative;
&:before,
&:after {
content: "";
display: table;
}
&:after {
clear: both;
}
.timeline-badge {
color: #fff;
width: 54px;
height: 54px;
line-height: 52px;
font-size: 22px;
text-align: center;
position: absolute;
top: 18px;
left: 50%;
margin-left: -25px;
background-color: $gray-dark;
border: 3px solid #ffffff;
z-index: 100;
border-top-right-radius: 50%;
border-top-left-radius: 50%;
border-bottom-right-radius: 50%;
border-bottom-left-radius: 50%;
i,
.fa,
.glyphicon {
top: 2px;
left: 0px;
}
&.primary {
background-color: $brand-primary;
}
&.info {
background-color: $brand-info;
}
&.success {
background-color: $brand-success;
}
&.warning {
background-color: $brand-warning;
}
&.danger {
background-color: $brand-danger;
}
}
.timeline-panel {
position: relative;
text-align: right;
width: 46%;
float: left;
right: 16px;
// border: 1px solid $gray-light;
background: #ffffff;
border-radius: 2px;
padding: 20px;
-webkit-box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
box-shadow: 0 1px 6px rgba(0, 0, 0, 0.175);
&:before {
position: absolute;
top: 26px;
right: -16px;
display: inline-block;
border-top: 16px solid transparent;
border-left: 16px solid $gray-light;
border-right: 0 solid $gray-light;
border-bottom: 16px solid transparent;
// content: " ";
}
.timeline-title {
margin-top: 0;
color: inherit;
}
.timeline-body > p,
.timeline-body > ul {
margin-bottom: 0;
}
.timeline-body > p + p {
margin-top: 5px;
}
}
}
.timeline-item:last-child {
&:nth-child(even) {
float: right;
}
}
.timeline-item:nth-child(even) {
.timeline-panel {
float: right;
text-align: left;
left: 16px;
&:before {
border-left-width: 0;
border-right-width: 14px;
left: -14px;
right: auto;
}
}
}
}
// .timeline-horizontal:extend(.timeline) {
// list-style: none;
// position: relative;
// padding: 20px 0px 20px 0px;
// display: inline-block;
// &:before {
// height: 3px;
// top: auto;
// bottom: 26px;
// left: 56px;
// right: 0;
// width: 100%;
// margin-bottom: 20px;
// }
// .timeline-item {
// display: table-cell;
// height: 280px;
// width: 20%;
// min-width: 320px;
// float: none !important;
// padding-left: 0px;
// padding-right: 20px;
// margin: 0 auto;
// vertical-align: bottom;
// .timeline-panel {
// top: auto;
// bottom: 64px;
// display: inline-block;
// float: none !important;
// left: 0 !important;
// right: 0 !important;
// width: 100%;
// margin-bottom: 20px;
// &:before {
// top: auto;
// bottom: -16px;
// left: 28px !important;
// right: auto;
// border-right: 16px solid transparent !important;
// border-top: 16px solid $gray-light !important;
// border-bottom: 0 solid $gray-light !important;
// border-left: 16px solid transparent !important;
// }
// }
// &:before,
// &:after {
// display: none;
// }
// .timeline-badge {
// size: 3em;
// top: auto;
// bottom: 0px;
// left: 43px;
// }
// }
// }
My HTML:
<div class="row">
<div class="col-md-12">
<div class="page-header">
<h1>Timeline</h1>
</div>
<ul class="timeline">
<li class="timeline-item">
<div class="timeline-badge">
<fa-icon [icon]="faCheck"></fa-icon>
</div>
<div class="timeline-panel">
<div class="timeline-heading">
<h4 class="timeline-title">Mussum ipsum cacilds 1</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small></p>
</div>
</div>
<div style="float: right; position: relative;text-align: right;"> Hello </div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><i class="glyphicon glyphicon-check"></i></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h4 class="timeline-title">Mussum ipsum cacilds 2</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small></p>
</div>
<div class="timeline-body">
<p>Test</p>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><i class="glyphicon glyphicon-check"></i></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h4 class="timeline-title">Mussum ipsum cacilds 3</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small></p>
</div>
<div class="timeline-body">
<p>Test Content 1 </p>
<p>Test Content 2 </p>
</div>
</div>
</li>
<li class="timeline-item">
<div class="timeline-badge"><i class="glyphicon glyphicon-check"></i></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h4 class="timeline-title">Mussum ipsum cacilds 4</h4>
<p><small class="text-muted"><i class="glyphicon glyphicon-time"></i> 11 hours ago via Twitter</small></p>
</div>
<div class="timeline-body">
<p>Test </p>
</div>
</div>
</li>
</ul>
</div>
</div>
Note: I took this sample from https://codepen.io/wdmg/pen/ZWmwNM
Any help is much appreciated.
This works for me
Result
Code:
<html><body>
<style>
.bold{font-weight:bold;}
.time{position:absolute; left:-110px;}
.timeline-wrapper {
padding-left:80px;
min-width: 400px;
font-family: 'Helvetica';
font-size: 14px;
/*border: 1px solid #CCC;*/
}
.StepProgress {
position: relative;
padding-left: 45px;
list-style: none;
}
.StepProgress::before {
display: inline-block;
content: '';
position: absolute;
top: 0;
left: 15px;
width: 10px;
height: 100%;
border-left: 2px solid #CCC;
}
.StepProgress-item {
position: relative;
counter-increment: list;
}
.StepProgress-item:not(:last-child) {
padding-bottom: 20px;
}
.StepProgress-item::before {
display: inline-block;
content: '';
position: absolute;
left: -30px;
height: 100%;
width: 10px;
}
.StepProgress-item::after {
content: '';
display: inline-block;
position: absolute;
top: 0;
left: -37px;
width: 12px;
height: 12px;
border: 2px solid #CCC;
border-radius: 50%;
background-color: #FFF;
}
.StepProgress-item.is-done::before {
border-left: 2px solid green;
}
.StepProgress-item.is-done::after {
/*content: "?";*/
font-size: 10px;
color: #FFF;
text-align: center;
border: 2px solid green;
background-color: green;
}
/*.StepProgress-item.current::before {
border-left: 2px solid green;
}
.StepProgress-item.current::after {
content: counter(list);
padding-top: 1px;
width: 19px;
height: 18px;
top: -4px;
left: -40px;
font-size: 14px;
text-align: center;
color: green;
border: 2px solid green;
background-color: white;
}*/
.StepProgress strong {
display: block;
}
</style>
<div class="timeline-wrapper">
<ul class="StepProgress">
<li class="StepProgress-item is-done">
<div class="bold time">10:00 Am</div>
<div class="bold">Step 1</div>
</li>
<li class="StepProgress-item is-done">
<div class="bold time">11:00 Am</div>
<div class="bold">Step 2</div>
<div>En proceso</div>
</li>
<li class="StepProgress-item current">
<div class="bold time">12:00 Pm</div>
<div class="bold">Step 3</div>
</li>
<li class="StepProgress-item">
<div class="bold time">01:00 Pm</div>
<div class="bold">Step 4</div>
</li>
<li class="StepProgress-item">
<div class="bold time">02:00 Pm</div>
<div class="bold">Step 5</div>
</li>
</ul>
</div>
</body></html>

How to make this specific shadow for a box : before?

How can i achieve the top left part of this box like the image below with css?
I can't make the shadow below the yellow triangle.
some suggestions would be helpfull.
Below is my CSS + HTML so far:
:root {
--jaune: #FFF701;
--bleu: #212D55;
}
.book{
margin-bottom: 0px;
font-size: x-small;
color: #364165;
text-align: center;
}
.box {
border: 1px solid var(--bleu);
background-color: #fff;
position: relative;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 16px;
}
.box::before {
content: ' ';
border-top: 32px solid #d3d5dd;
border-right: 30px solid var(--jaune);
width: 0;
position: absolute;
}
.btn_book{
background-color: #212d55;
width: 128px;
margin-right:79px;
margin-left:79px;
border: 1px solid #212d55;
position: absolute;
color: white;
text-transform: uppercase;
cursor: pointer;
}
.btn_book:hover{
background-color: var(--jaune);
color:#212d55;
}
.btn_book:hover::before {
border-top: 10px solid #212d55;
}
.btn_book:before {
content: "";
height: 0;
width: 0;
border-top: 10px solid #fffa0a;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
position: absolute;
z-index: 1;
top:0;
left: 0;
transform-origin: left;
transform: translate(60%) translateY(-71%) rotate(135deg)
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="box" style="width: 18rem; height: 19rem;">
<img src="https://b2btolink.com/leboudoir/wp-content/themes/leboudoir/images/logo.png" style="width: 100px; margin-left:80px;">
<p style="text-align:center;color: #212d55;">
<b>NEW CANAAN</b>
</p>
<hr class="dashed">
<p class="book"> 160 Main Street</p>
<p class="book"> New Canaan CT 06840</p>
<p class="book"> 203-957-8600</p>
<hr class="dashed">
<button type="button" class="btn_book">BOOK NOW</button>
</div>
How can this be possible with shadow property
Here is an idea using multiple background with gradient and skew transformation:
.box {
border: 1px solid #212D55;
background-color: #fff;
position: relative;
margin: 10px;
background:
linear-gradient(to top left,transparent 50%,#d3d5dd 50%) top left/32px 32px no-repeat;
}
.box::before {
content: ' ';
position: absolute;
top:-1px;
left:-1px;
width:34px;
height:34px;
background:
linear-gradient(to bottom right,transparent 45%,grey 50%) bottom/100% 5px,
linear-gradient(to bottom right,transparent 45%,grey 50%) right/5px 100%,
linear-gradient(to bottom right,transparent 50%,yellow 50%);
background-repeat: no-repeat;
transform: skew(5deg,5deg);
}
<div class="box" style="width: 18rem; height: 19rem;">
</div>
You will need to adjust this a little, but you should be able to use clip-pathto create a triangle on another div, then change the z-index on your ::before to bring it in front of the triangle.
:root {
--jaune: #FFF701;
--bleu: #212D55;
}
.book{
margin-bottom: 0px;
font-size: x-small;
color: #364165;
text-align: center;
}
.box {
border: 1px solid var(--bleu);
background-color: #fff;
position: relative;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 16px;
}
.box::before {
content: ' ';
border-top: 32px solid #d3d5dd;
border-right: 30px solid var(--jaune);
width: 0;
position: absolute;
z-index: 100;
}
.shadow{
position: absolute;
top: 5px;
height: 41px;
left: 0px;
width: 37px;
background: #A0A0A0;
clip-path: polygon(83% 0%, 4% 63%, 100% 91%);
z-index: 1;
}
.btn_book{
background-color: #212d55;
width: 128px;
margin-right:79px;
margin-left:79px;
border: 1px solid #212d55;
position: absolute;
color: white;
text-transform: uppercase;
cursor: pointer;
}
.btn_book:hover{
background-color: var(--jaune);
color:#212d55;
}
.btn_book:hover::before {
border-top: 10px solid #212d55;
}
.btn_book:before {
content: "";
height: 0;
width: 0;
border-top: 10px solid #fffa0a;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
position: absolute;
z-index: 1;
top:0;
left: 0;
transform-origin: left;
transform: translate(60%) translateY(-71%) rotate(135deg)
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="box" style="width: 18rem; height: 19rem;">
<div class="shadow"></div>
<img src="https://b2btolink.com/leboudoir/wp-content/themes/leboudoir/images/logo.png" style="width: 100px; margin-left:80px;">
<p style="text-align:center;color: #212d55;">
<b>NEW CANAAN</b>
</p>
<hr class="dashed">
<p class="book"> 160 Main Street</p>
<p class="book"> New Canaan CT 06840</p>
<p class="book"> 203-957-8600</p>
<hr class="dashed">
<button type="button" class="btn_book">BOOK NOW</button>
</div>

How to place a p block on top of another line with a cone?

HOME This is the code I have.
<div class="row">
<div class="col-sm">
</div>
<div class="col-sm">
<p align="center" class="savings-calculator-p">SAVINGS CALCULATOR</p>
</div>
<div class="col-sm">
</div>
</div>
How to make the UI like the below one
Like This
A bit of CSS trickery and you get an almost exact replica of what you are after.
*You can play around with the settings to get the look you want. See the 2 images for examples.
Pure & Simple - Quick & Easy CSS
No external scripts or javaScrtipt required. :)
body {
padding-top: 15px;
}
.myContent {
border: 0.8px solid #ddd;
}
#myPage .savings {
position: relative;
border: 1px solid #ddd;
border-bottom: none;
border-radius: 8px 8px 0 0;
box-shadow: 0 0 4px #ccc;
font-size: 14px;
text-align: center;
font-weight: bold;
color: #777;
font-family: arial;
margin: 0 auto;
padding: 8px 10px 6px 10px;
max-width: 180px;
}
#myPage .savings:after,
#myPage .savings:before {
position: absolute;
left: 50%;
top: 100%;
border: solid transparent;
content: "";
}
#myPage .savings:before {
margin-left: -14px;
border-width: 20px;
border-top-color: #eee;
}
#myPage .savings:after {
border-top-color: #ffffff;
border-width: 16px;
margin-left: -10px;
}
<div id="myPage">
<div class="savings">
SAVINGS CALCULATOR
</div>
<div class="myContent">
</div>
</div>
Try this and you're done...
p.savings-calculator-p {
background-color: #EEE;
width: max-content;
padding: 5px 20px;
margin: auto;
margin-top: 20px;
border-radius: 5px;
position: relative;
filter: drop-shadow(0px 0px 2px rgba(0,0,0,0.4));
}
p.savings-calculator-p:after {
display: block;
content: '';
position: absolute;
top: 70%;
left: 0;
right: 0;
margin: auto;
background: #EEE;
width: 20px;
height: 20px;
z-index: -1;
transform: rotateZ(45deg);
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.bundle.min.js"></script>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-sm">
</div>
<div class="col-sm">
<p align="center" class="savings-calculator-p">SAVINGS CALCULATOR</p>
</div>
<div class="col-sm">
</div>
</div>
Use this tool to generate a custom css - http://www.cssarrowplease.com/, or use the below code snippet
.arrow_box {
font-size: 12px;
text-align: center;
max-width: 200px;
margin: 0 auto;
padding: 10px;
position: relative;
background: #ffffff;
font-family: sans-serif;
border: 1px solid #cccccc;
}
.arrow_box:after, .arrow_box:before {
top: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.arrow_box:after {
border-color: rgba(255, 255, 255, 0);
border-top-color: #ffffff;
border-width: 10px;
margin-left: -10px;
}
.arrow_box:before {
border-color: rgba(204, 204, 204, 0);
border-top-color: #cccccc;
border-width: 11px;
margin-left: -11px;
}
<div class="arrow_box">
SAVINGS CALCULATOR
</div>
I guess this will be helpful for you.
$(document).ready(function(){
$('.col-sm-4').on('mouseover', function(ev) {
$('.savings-calculator-p').addClass('show');
$('.savings-calculator-p').css('left', ev.clientX - 80 + 'px');
})
$('.col-sm-4').on('mousemove', function(ev) {
$('.savings-calculator-p').css('left', ev.clientX - 80 + 'px');
})
$('.col-sm-4').on('mouseleave', function(ev) {
$('.savings-calculator-p').removeClass('show')
})
})
.row {
position: relative;
display: flex;
}
.col-sm-4 {
flex: 1;
display: flex;
justify-content: center;
margin-top: 50px;
}
.savings-calculator-p {
font-size: 12px;
display: inline-block;
text-align: center;
max-width: 200px;
margin: 0 auto;
padding: 10px;
position: fixed;
background: #ffffff;
font-family: sans-serif;
border: 1px solid #cccccc;
transition: all 0.3s ease;
opacity: 0;
visibility: visible;
}
.show {
opacity: 1;
visibility: visible;
}
.savings-calculator-p:after, .savings-calculator-p:before {
top: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.savings-calculator-p:after {
border-color: rgba(255, 255, 255, 0);
border-top-color: #ffffff;
border-width: 10px;
margin-left: -10px;
}
.savings-calculator-p:before {
border-color: rgba(204, 204, 204, 0);
border-top-color: #cccccc;
border-width: 11px;
margin-left: -11px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="row">
<p align="center" class="savings-calculator-p">SAVINGS CALCULATOR</p>
<div class="col-sm-4">
Header 1
</div>
<div class="col-sm-4">
Header 2
</div>
<div class="col-sm-4">
Header 3
</div>
</div>
Use Bootstrap popover and always show it
Since you are already using bootstrap, you should go for popover. It is concise and hence easy to maintain.
$('.popover-visible') .popover('show') .off('click');
<div class="container">
<div class="row pt-5">
<div class="col-sm ">
</div>
<div class="col-sm popover-visible mt-5"
data-container="body"
data-toggle="popover"
data-placement="top"
data-content="SAVINGS CALCULATOR">
<p align="center" class="savings-calculator-p">CURRENT SAVING DONE(R)</p>
</div>
<div class="col-sm">
</div>
</div>
</div>
https://codepen.io/anon/pen/wYJERz

How to create play button with border-radius?

Hi I'm trying to make a Pomodoro clock. I've made a play button by removing border-right and increasing border-left width to create a triangle.
My questions is - how do I apply border-radius to it?
https://codepen.io/jenlky/pen/ypQjPa?editors=1100
<div id="all-buttons" class="buttons">
<!-- play button -->
<div id="play" class="play-button"></div>
<!-- pause button -->
<div id="pause">
<div class="line-1"></div>
<div class="line-2"></div>
</div>
<!-- end of play and pause button-->
</div>
.play-button {
z-index: 2;
width: 48px;
height: 48px;
border-style: solid;
border-width: 24px 0px 24px 48px;
border-color: white white white #FF8F83;
}
HTML play button:
.circle_inner{
position: relative;
height: 100%;
}
.circle_inner:before{
content: "";
display: block;
width: 0;
height: 0;
border-style: solid;
border-width: 10px 0 10px 20px;
border-color: transparent transparent transparent #000;
position: absolute;
top: 50px;
left: 50%;
margin: -10px 0 0 -7px;
}
<div class="circle_inner">
</div>
Try this (Less)
<div class="control play">
<span class="left"></span><span class="right"></span>
</div>
.control {
#color: #ffb160;
#highlight: darken(#color, 10%);
#duration: 0.4s;
#sin: 0.866;
#size: 112px;
border-radius: 50%;
margin: 20px;
padding: #size*0.25;
width: #size;
height: #size;
font-size: 0;
white-space: nowrap;
text-align: center;
cursor: pointer;
&, .left, .right, &:before {
display: inline-block;
vertical-align: middle;
transition: border #duration, width #duration, height #duration, margin #duration;
transition-tiomig-function: cubic-bezier(1, 0, 0, 1);
}
&:before {
content: "";
height: #size;
}
&.pause {
.left, .right {
margin: 0;
border-left: #size*0.33 solid #color;
border-top: 0 solid transparent;
border-bottom: 0 solid transparent;
height: #size*#sin;
}
.left {
border-right: #size*0.2 solid transparent;
}
}
&.play {
#border: #size/4;
.left {
margin-left: #size/6;
border-left: #size*#sin/2 solid #color;
border-top: #border solid transparent;
border-bottom: #border solid transparent;
border-right: 0px solid transparent;
height: #size - 2*#border;
}
.right {
margin: 0;
border-left: #size*#sin/2 solid #color;
border-top: #border solid transparent;
border-bottom: #border solid transparent;
height: 0px;
}
}
&:hover {
border-color: #highlight;
.left, .right {
border-left-color: #highlight;
}
}
}