Unable to make the arrow tip longer - html

As you can see when you run the snippet below, The "outer" arrow that currently wraps 5 smaller arrows dont look alot the smaller once.
I know this is the line I have to modify, but no matter what I do, I can't achieve the desired result.
background: linear-gradient(var(--c), var(--c)) 20px 0 /calc(100% - 40px) 100% no-repeat, linear-gradient(to bottom right, var(--c) 50%, transparent 50.5%) 100% 100%/20px 51% no-repeat, linear-gradient(to top right, var(--c) 50%, transparent 50.5%) 100% 0/20px 51% no-repeat, linear-gradient(to top left, var(--c) 50%, transparent 50.5%) 0 100%/20px 51% no-repeat, linear-gradient(to bottom left, var(--c) 50%, transparent 50.5%) 0px 0/20px 51% no-repeat;
Style whise I want the "outer" arrow to look like the last arrow. as you can see the start and end of the "outer" arrow is not that "pointy"
.phases {
width: 1000px;
}
.breadcrumb {
list-style: none;
overflow: hidden;
font: 18px Sans-Serif;
margin: 0;
padding: 32px 0;
}
.breadcrumb li {
float: left;
margin-right: -15px;
}
.breadcrumb li:first-child {
margin-left: -20px;
}
.breadcrumb li a {
color: white;
text-decoration: none;
padding: 20px 40px;
--c: #004c89;
background: linear-gradient(var(--c), var(--c)) 20px 0 /calc(100% - 40px) 100% no-repeat, linear-gradient(to bottom right, var(--c) 50%, transparent 50.5%) 100% 100%/20px 51% no-repeat, linear-gradient(to top right, var(--c) 50%, transparent 50.5%) 100% 0/20px 51% no-repeat, linear-gradient(to top left, var(--c) 50%, transparent 50.5%) 0 100%/20px 51% no-repeat, linear-gradient(to bottom left, var(--c) 50%, transparent 50.5%) 0 0/20px 51% no-repeat;
position: relative;
float: left;
}
.breadcrumb li a:hover {
--c: #0078d7;
}
.breadcrumb_wrapper {
margin-left: 42px;
position: relative;
}
.breadcrumb_wrapper:before {
content: "";
position: absolute;
top: 0px;
bottom: 0px;
left: -32px;
right: 0;
--c:#e0dad7;
background: linear-gradient(var(--c), var(--c)) 20px 0 /calc(100% - 40px) 100% no-repeat, linear-gradient(to bottom right, var(--c) 50%, transparent 50.5%) 100% 100%/20px 51% no-repeat, linear-gradient(to top right, var(--c) 50%, transparent 50.5%) 100% 0/20px 51% no-repeat, linear-gradient(to top left, var(--c) 50%, transparent 50.5%) 0 100%/20px 51% no-repeat, linear-gradient(to bottom left, var(--c) 50%, transparent 50.5%) 0px 0/20px 51% no-repeat;
}
.breadcrumb_wrapper .breadcrumb {
padding: 0;
margin-bottom: 30px;
}
.breadcrumb_wrapper span {
color: white;
display: block;
position: relative;
text-align: center;
padding: 5px 0;
}
.breadcrumb_wrapper ul li:last-child {
margin-right: 20px;
}
.firsta {
margin-top: 29px;
}
<div class="phases">
<ul class="breadcrumb">
<li>Pre-project</li>
<li class="breadcrumb_wrapper">
<span>Implementation project</span>
<ul class="breadcrumb">
<li>Analysis</li>
<li>Design</li>
<li>Development</li>
<li>Implementation</li>
<li>Operation</li>
</ul>
</li>
</ul>
</div>

.phases {
width: 1000px;
}
.breadcrumb {
list-style: none;
overflow: hidden;
font: 18px Sans-Serif;
margin: 0 0 0 7px;
padding: 32px 0;
}
.breadcrumb li {
float: left;
margin-right: -15px;
}
.breadcrumb li:first-child {
margin-left: -20px;
}
.breadcrumb li a {
color: white;
text-decoration: none;
padding: 20px 40px;
--c: #004c89;
background: linear-gradient(var(--c), var(--c)) 20px 0 /calc(100% - 40px) 100% no-repeat, linear-gradient(to bottom right, var(--c) 50%, transparent 50.5%) 100% 100%/20px 51% no-repeat, linear-gradient(to top right, var(--c) 50%, transparent 50.5%) 100% 0/20px 51% no-repeat, linear-gradient(to top left, var(--c) 50%, transparent 50.5%) 0 100%/20px 51% no-repeat, linear-gradient(to bottom left, var(--c) 50%, transparent 50.5%) 0 0/20px 51% no-repeat;
position: relative;
float: left;
}
.breadcrumb li a:hover {
--c: #0078d7;
}
.breadcrumb_wrapper {
margin-left: 50px;
position: relative;
}
.breadcrumb_wrapper:before {
content: "";
position: absolute;
top: 0px;
bottom: 0px;
left: -32px;
right: 0;
--c:#e0dad7;
background: linear-gradient(var(--c), var(--c)) 30px 0 /calc(100% - 62px) 100% no-repeat, linear-gradient(to bottom right, var(--c) 50%, transparent 50.5%) 100% 100%/32px 51% no-repeat, linear-gradient(to top right, var(--c) 50%, transparent 50.5%) 100% 0/32px 51% no-repeat, linear-gradient(to top left, var(--c) 50%, transparent 50.5%) 0 100%/32px 51% no-repeat, linear-gradient(to bottom left, var(--c) 50%, transparent 50.5%) 0px 0/32px 51% no-repeat;
}
.breadcrumb_wrapper .breadcrumb {
padding: 0;
margin-bottom: 30px;
}
.breadcrumb_wrapper span {
color: white;
display: block;
position: relative;
text-align: center;
padding: 5px 0;
}
.breadcrumb_wrapper ul li:last-child {
margin-right: 43px;
}
.firsta {
margin-top: 29px;
}
<div class="phases">
<ul class="breadcrumb">
<li>Pre-project</li>
<li class="breadcrumb_wrapper">
<span>Implementation project</span>
<ul class="breadcrumb">
<li>Analysis</li>
<li>Design</li>
<li>Development</li>
<li>Implementation</li>
<li>Operation</li>
</ul>
</li>
</ul>
</div>

Related

Responsive html css Curly Braces .brace.bottom:after not working

I have a some code for Responsive html css Curly Braces i trying to place the bottom position but its not working correctly . position top is working perfect. anyone know how to change that position to bottom.
Thanks
That's my code
.brace{
border: 2px solid #CCC;
height: 25px;
position:relative;
border-bottom: 0;
border-radius: 25px 25px 0 0;
margin-top: 25px;
}
.brace.top:after{
content: '';
position:absolute;
left: 50%;
width: 50px;
height: 55px;
margin-top: -27px;
margin-left: -25px;
background-color: #FFF;
background:
linear-gradient(135deg, transparent 10px, #CCC 0) top left,
linear-gradient(225deg, transparent 10px, #CCC 0) top right,
linear-gradient(315deg, transparent 10px, #CCC 0) bottom right,
linear-gradient(45deg, transparent 10px, #CCC 0) bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
background-image:
radial-gradient(circle at 0 0, transparent 25px, #CCC 26px, #FFF 28px ),
radial-gradient(circle at 100% 0, transparent 25px, #CCC 26px, #FFF 28px),none,none;
}
.brace.bottom{
border-top: 0;
border-bottom: 2px solid #CCC;
border-radius: 0 0 25px 25px;
margin-top: 0;
}
.brace.bottom:after{
content: '';
position:absolute;
left: 50%;
width: 50px;
height: 55px;
margin-top: 0px;
margin-left: -25px;
background-color: #FFF;
background:
linear-gradient(135deg, transparent 10px, #25aae1 0) top left,
linear-gradient(225deg, transparent 10px, #25aae1 0) top right,
linear-gradient(315deg, transparent 10px, #25aae1 0) bottom right,
linear-gradient(45deg, transparent 10px, #25aae1 0) bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
background-image:
radial-gradient(circle at 0 0, transparent 25px, #25aae1 26px, #25aae1 28px ),
radial-gradient(circle at 100% 0, transparent 25px, #25aae1 26px, #25aae1 28px),none,none;
}
<div class="wrapper">
<div class="content">
<div class="brace top"></div>
<br>
<div class="brace bottom"></div>
</div>
</div>
Plz follow these steps.. Depends on relative the bottom position will be aligned..
.brace {
position: static;
}
.wrapper {
position: relative;
}
.brace.top::after {
margin-top: 0;
bottom: -28px;
}
.brace.bottom:after {
content: '';
position: absolute;
left: 50%;
width: 50px;
height: 55px;
margin-top: -4px;
margin-left: -25px;
background-color: #FFF;
background: linear-gradient(135deg, transparent 10px, #CCC 0) top left, linear-gradient(225deg, transparent 10px, #CCC 0) top right, linear-gradient(315deg, transparent 10px, #CCC 0) bottom right, linear-gradient(45deg, transparent 10px, #CCC 0) bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
background-image: radial-gradient(circle at 0 0, transparent 25px, #CCC 26px, #FFF 28px), radial-gradient(circle at 100% 0, transparent 25px, #CCC 26px, #FFF 28px), none, none;
transform: rotate(180deg);
}
<div class="wrapper">
<div class="content">
<div class="brace top"></div>
<br>
<div class="brace bottom"></div>
</div>
</div>

How do you make ::after part of css pentagon responsive?

I have created a form that is responsive but I cannot get the :before and :after elements which make it look like a polygon to be responsive. I want to make it so the top and bottom triangles resize along with the form.
How would I fix this? code pen:
https://codepen.io/coolblow/pen/rKEOEa
.form{
flex:1;
}
form {
background-color: lightgreen;
margin: -10px auto;
padding: 20px;
width: 50%;
position: relative;
}
form::before {
content: '';
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 20px solid red;
position: absolute;
top: -20px;
left: 50%;
margin-left: -20px;
}
form::after {
content: '';
width: 0;
height: 0;
border-left: 120px solid transparent;
border-right: 120px solid transparent;
border-top: 70px solid blue;
position: absolute;
bottom: -70px;
left: 0;
}
Use background to create the whole shape:
form {
padding: 50px 20px;
margin:20px;
width:50%;
height:200px;
background:
/*Top part*/
linear-gradient(to bottom left,transparent 49%,green 50%)top right/50.5% 50px,
linear-gradient(to bottom right,transparent 49%,green 50%)top left/50% 50px,
/*middle part*/
linear-gradient(green,green) center/100% calc(100% - 100px),
/*bottom part*/
linear-gradient(to top left,transparent 49%,green 50%)bottom right/50.5% 50px,
linear-gradient(to top right,transparent 49%,green 50%)bottom left/50% 50px;
background-repeat:no-repeat;
}
<form>
</form>
Update
If you want smaller triangle on the top you can do this:
form {
padding: 50px 20px;
margin:20px;
width:50%;
height:200px;
background:
/*Top part*/
linear-gradient(to bottom left,transparent 49%,green 50%)calc(50% + 25px) 0/50px 50px,
linear-gradient(to bottom right,transparent 49%,green 50%)calc(50% - 25px) 0/50px 50px,
/*middle part*/
linear-gradient(green,green) center/100% calc(100% - 100px),
/*bottom part*/
linear-gradient(to top left,transparent 49%,green 50%)bottom right/50.5% 50px,
linear-gradient(to top right,transparent 49%,green 50%)bottom left/50% 50px;
background-repeat:no-repeat;
}
<form>
</form>
And for more control you can use CSS variables to adjust dimensions:
form {
margin:20px;
width:50%;
height:120px;
--tw:50px; /*Top triangle*/
--bw:50px; /*Bottom triangle*/
padding: var(--tw) 20px var(--bw);
background:
/*Top part*/
linear-gradient(to bottom left,transparent 49%,green 50%)calc(50% + var(--tw)/2) 0/var(--tw) var(--tw),
linear-gradient(to bottom right,transparent 49%,green 50%)calc(50% - var(--tw)/2) 0/var(--tw) var(--tw),
/*middle part*/
linear-gradient(green,green) 50% var(--tw)/100% calc(100% - (var(--tw) + var(--bw))),
/*bottom part*/
linear-gradient(to top left,transparent 49%,green 50%)bottom right/50.5% var(--bw),
linear-gradient(to top right,transparent 49%,green 50%)bottom left/50% var(--bw);
background-repeat:no-repeat;
}
<form>
</form>
<form style="--tw:80px;--bw:60px;">
</form>
<form style="--tw:120px;--bw:120px;">
</form>

Bevel corners, background not rounded

I have a figure with bevel corners, but the background is not rounded:
How to have it rounded?
.test-block {
height: 480px;
padding: 4px;
color: #ffffff;
background-color: transparent;
background-image:
-webkit-linear-gradient(top, #ffdc00, #ffdc00),
-webkit-linear-gradient(225deg, #ffdc00, #ffdc00),
-webkit-linear-gradient(bottom, #ffdc00, #ffdc00),
-webkit-linear-gradient(left, #ffdc00, #ffdc00),
-webkit-linear-gradient(315deg, transparent 9px, #ffdc00 10px, #ffdc00 12px, red 12px);
background-image:
linear-gradient(180deg, #1698d9, #1698d9),
linear-gradient(225deg, #1698d9, #1698d9),
linear-gradient(0deg, #1698d9, #1698d9),
linear-gradient(90deg, #1698d9, #1698d9),
linear-gradient(135deg, transparent 28px, #1698d9 28px, #1698d9 32px, #ffffff 10px);
background-position: top right, top right, bottom left, bottom left, top left;
background-size: -webkit-calc(100% - 15px) 2px, 2px 100%, 100% 2px, 2px -webkit-calc(100% - 15px), 100% 100%;
background-size: calc(100% - 40px) 4px, 4px 100%, 100% 4px, 4px calc(100% - 40px), 100% 100%;
background-repeat: no-repeat;
border-radius: 10px;
width: 320px;
}
.test-block__div {
background-image: url(http://css-snippets.com/blogfile/wp-content/uploads/2011/03/square.jpg);
background-repeat: no-repeat;
background-position: -24px 208px;
height: 100%;
}
<div class="test-block">
<div class="test-block__div"></div>
</div>
Since you are using multiple background you can add more using radial-gradiant to create the corner (I removed the vendor prefixes to simplify the code)
.test-block {
height: 480px;
padding: 4px;
color: #ffffff;
background-color: transparent;
background-image:
radial-gradient(circle at top left, transparent 40%, #1698d9 0%),
radial-gradient(circle at bottom left, transparent 40%, #1698d9 0%),
radial-gradient(circle at top right, transparent 40%, #1698d9 0%),
linear-gradient(180deg, #1698d9, #1698d9),
linear-gradient(225deg, #1698d9, #1698d9),
linear-gradient(0deg, #1698d9, #1698d9),
linear-gradient(90deg, #1698d9, #1698d9),
linear-gradient(135deg, transparent 28px, #1698d9 28px, #1698d9 32px, transparent 10px);
background-position:
bottom right,
top right,
bottom left,
top right,
top right,
bottom left,
bottom left,
top left;
background-size:
10px 10px, 10px 10px, 10px 10px,
calc(100% - 40px) 4px,
4px 100%,
100% 4px,
4px calc(100% - 40px),
100% 100%;
background-repeat: no-repeat;
border-radius: 10px;
width: 320px;
}
body {
background-image:linear-gradient(30deg, pink, yellow);
}
<div class="test-block">
</div>
By the way you can achieve the same layout using pseudo-element and without multiples background. It can be easier to handle:
.test-block {
height: 440px;
padding: 4px;
margin-top: 60px;
color: #ffffff;
border-right: 4px solid #1698d9;
border-left: 4px solid #1698d9;
border-bottom: 4px solid #1698d9;
border-radius: 0 0 10px 10px;
width: 320px;
position: relative;
}
.test-block:before {
content: "";
position: absolute;
left: -4px;
width: 50%;
height: 40px;
top: -44px;
border-left: 4px solid #1698d9;
border-top: 4px solid #1698d9;
transform: skewX(-40deg);
transform-origin: bottom left;
}
.test-block:after {
content: "";
position: absolute;
right: -4px;
height: 40px;
width: 50%;
top: -44px;
border-right: 4px solid #1698d9;
border-top: 4px solid #1698d9;
border-radius: 0 10px 0 0;
}
body {
background-image: linear-gradient(30deg, pink, yellow);
}
<div class="test-block">
</div>

How to make hover double triangle?

like this. so 'a' elements adjoin to each other. And with work transition. Do you know how it to implement? i'll be very happy if you at least give me some link
you may use gradients to draw each parts on top of a background-color :
If gradients are not avalaible (older browser), you still have a background to show different state.
nav {
background: #009EAC
}
a {
display: inline-block;
padding: 1em;
color: white;
font-weight: 900;
text-shadow: 1px 1px 1px #333;
text-decoration: none;
background: linear-gradient(-250deg, #009EAC 0.5em, #009EAC 0.5em) top left no-repeat, linear-gradient(70deg, #009EAC 0.5em, #009EAC 0.5em) bottom left no-repeat, linear-gradient(250deg, #009EAC 0.5em, #009EAC 0.5em) top right no-repeat, linear-gradient(-70deg, #009EAC 0.5em, #009EAC 0em) bottom right no-repeat, linear-gradient(to bottom, rgba(255, 250, 0, 0), transparent) top left no-repeat;
background-size: 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 80%;
transition:background 0.5s;
}
a.active,
a:hover {
background: linear-gradient(-250deg, #009EAC 0.5em, transparent 0.5em) top left no-repeat, linear-gradient(70deg, #009EAC 0.5em, transparent 0.5em) bottom left no-repeat, linear-gradient(250deg, #009EAC 0.5em, transparent 0.5em) top right no-repeat, linear-gradient(-70deg, #009EAC 0.5em, transparent 0.5em) bottom right no-repeat, linear-gradient(to bottom, rgba(255, 250, 0, 0.9), transparent) top left no-repeat;
background-color: #EEB01F;
background-size: 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 80%;
}
<nav><a href>LINK</a><a href class="active">ACTIVE HOVER STATE</a><a href>HOVER ME</a>
</nav>
codepen to play with
You can use :before and :after pseudo elements
ul {
padding: 0;
list-style-type: none;
display: flex;
background: #019CB2;
}
a {
text-decoration: none;
color: white;
}
li {
padding: 10px 20px;
margin: 0 10px;
position: relative;
transition: all 0.3s ease-in;
}
li:after,
li:before {
content: '';
top: 0;
position: absolute;
transition: all 0.3s ease-in;
width: 0;
height: 0;
}
li:before {
left: 0;
border-style: solid;
border-width: 20px 10px 20px 0;
border-color: transparent #019CB2 transparent transparent;
transform: translateX(-100%);
}
li:after {
right: 0;
border-style: solid;
border-width: 20px 0 20px 10px;
border-color: transparent transparent transparent #019CB2;
transform: translateX(100%);
}
li:hover {
background: #FFE902;
}
li:hover:after {
border-color: transparent transparent transparent #FFE902;
}
li:hover:before {
border-color: transparent #FFE902 transparent transparent;
}
<ul>
<li>Link</li>
<li>Link</li>
<li>Link</li>
</ul>

Overflow logo outside nav bar

I've tried the overflow-y: visible in css but the logo still cuts, i imagine it has something to do with the body since, in all the other pages the logo shows as i want it to.
<div class="nav-logo">
<img class="lightup-logo" src="image/logo.png" alt=""/>
</div>
.nav-logo {
float: left;
overflow-y: visible;
width: 24%;
padding: 0px;
margin: 0px;
}
On a side note the logo works as intended in all other pages, it overflows nicely, its just in the index page that the problem seems to appear.
For those who are looking for a complete code sample.
<header>
<div class="header-container">
<div class="nav-logo">
<img class="lightup-logo" src="image/logo.png" alt=""/>
</div>
</div>
</header>
<main>
<div class="body-container">
<div class="large-container"></div>
<div class="clear"></div>
</div>
</main>
header {
padding: 0px;
margin: 0px;
background: rgba(31,34,36,1);
background: -moz-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: -webkit-gradient(left top, right top, color-stop(0%, rgba(31,34,36,1)), color-stop(25%, rgba(0,0,0,1)), color-stop(50%, rgba(0,0,0,1)), color-stop(77%, rgba(0,0,0,1)), color-stop(100%, rgba(31,34,36,1)));
background: -webkit-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: -o-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: -ms-linear-gradient(left, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
background: linear-gradient(to right, rgba(31,34,36,1) 0%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 77%, rgba(31,34,36,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#1f2224', endColorstr='#1f2224', GradientType=1 );
}
.nav-logo {
float: left;
overflow-y: visible;
width: 230px;
height: 100%;
width: 24%;
padding: 0px;
margin: 0px;
}
.header-container {
max-width: 1000px;
margin: auto;
border-left: 0px;
border-right: 0px;
border-top: 0px;
border-bottom: 1px solid transparent;
-webkit-border-image: url(/border.png) 28 stretch; /* Safari 3.1-5 */
-o-border-image: url(/border.png) 28 stretch; /* Opera 11-12.1 */
border-image: url(/border.png) 28 stretch;
}
main {
margin: 0px;
padding: 0px;
}
.large-container {
height: 478px;
background-image: url(../image/sliced1.png);
}
.body-container {
margin: auto;
max-width: 1000px;
position: relative;
}
If i add z-index: -1 to the body-container i get the result i want (logo overflows) however links in the body-containers no longer work.
screen_styles.css, line 48, remove z-index: 5px;. z-index has nothing to do with pixels.
add these rules to header line 14:
header {
position: relative;
z-index: 99;
}
That's about it. The reason why z-index did not work was because you were trying to use it on a position:static element. It only works on elements with position other than static.
Your project has quite a few errors, you should have a decent front end developer look at it before you launch, to put it mildly.
try
.nav-logo img
{
max-width: 100px; //width of div
max-height: 100px;//height of div
}
or you can make logo.png, background of div
<div class="nav-logo">
</div>
and use
.nav-logo {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-image: url("image/logo.png");
background-repeat: no-repeat;
background-size: contain;
}
contain makes background image fill the div and not getting bigger.