Change Bootstrap breadcrumbs divider color - html

I'm using Bootstrap 3 and am overriding .btn-primary with the following css to change the color a bit
.btn-primary {
color: #fff;
background-color: #337ab7;
border-color: #2e6da4
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open>.dropdown-toggle.btn-primary {
color: #fff;
background-color: #286090;
border-color: #204d74
}
I'm trying to use this breadcrumb example but when I do, the arrow points (triangle bits) that separate the items are not the same color as the buttons. This happens on the normal state as well as the hover/active state.
What CSS properties do I need to edit to make these triangles the same color as my buttons?
.btn-primary {
color: #fff;
background-color: #337ab7;
border-color: #2e6da4
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open>.dropdown-toggle.btn-primary {
color: #fff;
background-color: #286090;
border-color: #204d74
}
.btn-breadcrumb .btn:not(:last-child):after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 10px solid white;
position: absolute;
top: 50%;
margin-top: -17px;
left: 100%;
z-index: 3;
}
.btn-breadcrumb .btn:not(:last-child):before {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 17px solid transparent;
border-bottom: 17px solid transparent;
border-left: 10px solid rgb(173, 173, 173);
position: absolute;
top: 50%;
margin-top: -17px;
margin-left: 1px;
left: 100%;
z-index: 3;
}
/** The Spacing **/
.btn-breadcrumb .btn {
padding: 6px 12px 6px 24px;
color: #fff;
}
.btn-breadcrumb .btn:first-child {
padding: 6px 6px 6px 10px;
}
.btn-breadcrumb .btn:last-child {
padding: 6px 18px 6px 24px;
}
/** Primary button **/
.btn-breadcrumb .btn.btn-primary:not(:last-child):after {
border-left: 10px solid #428bca;
}
.btn-breadcrumb .btn.btn-primary:not(:last-child):before {
border-left: 10px solid #357ebd;
}
.btn-breadcrumb .btn.btn-primary:hover:not(:last-child):after {
border-left: 10px solid #3276b1;
}
.btn-breadcrumb .btn.btn-primary:hover:not(:last-child):before {
border-left: 10px solid #285e8e;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<div class="container">
<div class="row">
<h2>Breadcrumb Primary</h2>
<div class="btn-group btn-breadcrumb">
<i class="glyphicon glyphicon-home"></i>
Snippets
Breadcrumbs
Primary
</div>
</div>
</div>

This is the CSS you need to use on normal state:
.btn-breadcrumb .btn.btn-primary:not(:last-child):after {
border-left: 10px solid #327CBA;
}
This is the CSS you need to use on hover state:
.btn-breadcrumb .btn.btn-primary:hover:not(:last-child):after {
border-left: 10px solid #286090;
}
Just find the definitions in your CSS file and replace it with the code above.You just need to change the colors for the normal state and hover state actually.

Just remove the arrows altogether
.btn.btn-primary:not(:last-child)::before,
.btn.btn-primary:not(:last-child)::after {
content: none;
}

Related

How can I keep the same position for the divs (text-boxes) on top of an image, even when I resize the window?

I have an image with three text boxes on top of if. When I resize the window, I want the boxes to keep precisely the same position.
boxes
small boxes
Here is my HTML:
<div>
<img class="img-fluid" src="images/create_new_event2.png">
<!-- Shapes -->
<div style="position: absolute; left: 13%; top: 28%;">
<div class="box box-faded box-shadow box-left-arrow">Use a good description.<br /> If a team; <br />start with G07 e.l.</div>
</div>
<div style="position: absolute; right: 15%; top: 29%;">
<div class="box box-faded box-shadow box-top-arrow">Click here if you want to use a previous event as a template.</div>
</div>
<div style="position: absolute; left: 23%; top: 77%;">
<div class="box box-primary box-shadow box-right-arrow">When all fields are completed click here.</div>
</div>
<!-- End of Shapes -->
</div>
Here's my CSS:
/*
.box-primary -- used to describe the main action
.box-secondary -- used to show a secondary action
.box-faded -- used to show previous steps
*/
/* Box */
.box {
width: 300px;
margin: 50px auto;
border: 4px solid #000;
padding: 20px;
text-align: center;
font-weight: 900;
color: #000;
background-color: #fff;
font-family: "Open Sans", sans-serif;
position: relative;
}
.box.box-shadow.box-primary {
box-shadow: 0px 0px 10px #52c3bc96;
}
.box.box-shadow.box-faded {
box-shadow: 0px 0px 10px #e6e6e6bd;
}
.box:before {
content: "";
width: 0px;
height: 0px;
position: absolute;
}
.box:after {
content: "";
width: 0px;
height: 0px;
position: absolute;
}
/* Box Color variants */
.box.box-faded {
background-color: #f9f9f9;
border: 4px solid #e6e6e6;
color: #bbb;
}
.box.box-primary {
background-color: #fff;
border: 4px solid #00bfb6;
color: #00bfb6;
}
/* >> Box Bottom Arrow */
.box.box-bottom-arrow:before {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
right: 50%;
bottom: -23px;
}
.box.box-bottom-arrow:after {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #fff;
border-bottom: 10px solid transparent;
right: 50%;
bottom: -18px;
}
/* Box Bottom Arrow Color variants */
.box.box-bottom-arrow.box-faded:before {
border-top-color: #e6e6e6;
}
.box.box-bottom-arrow.box-faded:after {
border-top-color: #f6f6f6;
}
.box.box-bottom-arrow.box-primary:before {
border-top-color: #00bfb6;
}
.box.box-bottom-arrow.box-primary:after {
border-top-color: #fff;
}
/* >> Box Top Arrow */
.box.box-top-arrow:before {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid #fff;
right: 50%;
top: -23px;
}
.box.box-top-arrow:after {
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid #fff;
right: 50%;
top: -18px;
}
/* Box Top Arrow Color variants */
.box.box-top-arrow.box-faded:before {
border-bottom-color: #e6e6e6;
}
.box.box-top-arrow.box-faded:after {
border-bottom-color: #f6f6f6;
}
.box.box-top-arrow.box-primary:before {
border-bottom-color: #00bfb6;
}
.box.box-top-arrow.box-primary:after {
border-bottom-color: #fff;
}
/* >> Box Left Arrow */
.box.box-left-arrow:before {
border-left: 10px solid transparent;
border-right: 10px solid #00bfb6;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
left: -23px;
top: 40%;
}
.box.box-left-arrow:after {
border-left: 10px solid transparent;
border-right: 10px solid #fff;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
left: -17px;
top: 40%;
}
/* Box Left Arrow Color variants */
.box.box-left-arrow.box-faded:before {
border-right-color: #e6e6e6;
}
.box.box-left-arrow.box-faded:after {
border-right-color: #f6f6f6;
}
.box.box-left-arrow.box-primary:before {
border-right-color: #00bfb6;
}
.box.box-left-arrow.box-primary:after {
border-right-color: #fff;
}
/* >> Box Right Arrow */
.box.box-right-arrow:before {
border-left: 10px solid #00bfb6;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
right: -23px;
top: 40%;
}
.box.box-right-arrow:after {
border-left: 10px solid #fff;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
right: -17px;
top: 40%;
}
/* Box Right Arrow Color variants */
.box.box-right-arrow.box-faded:before {
border-left-color: #e6e6e6;
}
.box.box-right-arrow.box-faded:after {
border-left-color: #f6f6f6;
}
.box.box-right-arrow.box-primary:before {
border-left-color: #00bfb6;
}
.box.box-right-arrow.box-primary:after {
border-left-color: #fff;
}
/* >> Box Top Right Arrow */
.box.box-top-right-arrow:before {
border-left: 10px solid #00bfb6;
border-right: 10px solid transparent;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
right: -21px;
top: 6px;
}
.box.box-top-right-arrow:after {
border-left: 7px solid #fff;
border-right: 7px solid transparent;
border-top: 7px solid #fff;
border-bottom: 7px solid transparent;
right: -11px;
top: 10px;
}
/* Box Top Right Arrow Color variants */
.box.box-top-right-arrow.box-faded:before {
border-left-color: #e6e6e6;
border-top-color: #e6e6e6;
}
.box.box-top-right-arrow.box-faded:after {
border-left-color: #f6f6f6;
border-top-color: #f6f6f6;
}
.box.box-top-right-arrow.box-primary:before {
border-left-color: #00bfb6;
border-top-color: #00bfb6;
}
.box.box-top-right-arrow.box-primary:after {
border-left-color: #fff;
border-top-color: #fff;
}
/* >> Box Top Left Arrow */
.box.box-top-left-arrow:before {
border-left: 10px solid transparent;
border-right: 10px solid #00bfb6;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
left: -21px;
top: 6px;
}
.box.box-top-left-arrow:after {
border-left: 7px solid transparent;
border-right: 7px solid #fff;
border-top: 7px solid #fff;
border-bottom: 7px solid transparent;
left: -11px;
top: 10px;
}
/* Box Top Left Arrow Color variants */
.box.box-top-left-arrow.box-faded:before {
border-right-color: #e6e6e6;
border-top-color: #e6e6e6;
}
.box.box-top-left-arrow.box-faded:after {
border-right-color: #f6f6f6;
border-top-color: #f6f6f6;
}
.box.box-top-left-arrow.box-primary:before {
border-right-color: #00bfb6;
border-top-color: #00bfb6;
}
.box.box-top-left-arrow.box-primary:after {
border-right-color: #fff;
border-top-color: #fff;
}
/* >> Box Bottom Left Arrow */
.box.box-bottom-left-arrow:before {
border-left: 10px solid #00bfb6;
border-right: 10px solid transparent;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
left: 20px;
bottom: -23px;
}
.box.box-bottom-left-arrow:after {
border-left: 10px solid #fff;
border-right: 10px solid transparent;
border-top: 10px solid #fff;
border-bottom: 10px solid transparent;
left: 24px;
bottom: -13px;
}
/* Box Bottom Left Arrow Color variants */
.box.box-bottom-left-arrow.box-faded:before {
border-left-color: #e6e6e6;
border-top-color: #e6e6e6;
}
.box.box-bottom-left-arrow.box-faded:after {
border-left-color: #f6f6f6;
border-top-color: #f6f6f6;
}
.box.box-bottom-left-arrow.box-primary:before {
border-left-color: #00bfb6;
border-top-color: #00bfb6;
}
.box.box-bottom-left-arrow.box-primary:after {
border-left-color: #fff;
border-top-color: #fff;
}
/* >> Box Bottom Right Arrow */
.box.box-bottom-right-arrow:before {
border-left: 10px solid transparent;
border-right: 10px solid #00bfb6;
border-top: 10px solid #00bfb6;
border-bottom: 10px solid transparent;
right: 20px;
bottom: -23px;
}
.box.box-bottom-right-arrow:after {
border-left: 10px solid transparent;
border-right: 10px solid #fff;
border-top: 10px solid #fff;
border-bottom: 10px solid transparent;
right: 24px;
bottom: -13px;
}
/* Box Bottom Right Arrow Color variants */
.box.box-bottom-right-arrow.box-faded:before {
border-right-color: #e6e6e6;
border-top-color: #e6e6e6;
}
.box.box-bottom-right-arrow.box-faded:after {
border-right-color: #f6f6f6;
border-top-color: #f6f6f6;
}
.box.box-bottom-right-arrow.box-primary:before {
border-right-color: #00bfb6;
border-top-color: #00bfb6;
}
.box.box-bottom-right-arrow.box-primary:after {
border-right-color: #fff;
border-top-color: #fff;
}
Thank you in advance!
you have to use percent and vw and vh instead of pixel
so the box shrink when your screen shrinks

how i can hide the line under tap?

i have this navbar, when i hover on tag the result is :
when hover on
i try to make it like that , but i can't :
i need like this pic
.
menu-large-hover {
position: static !important;
border-left: 1px solid black;
border-right: 1px solid black;
border-bottom: none;
cursor: pointer;
text-decoration: underline;
}
add/edit below classes in your css
.menu-large-hover a#font-mega {
background: #fff;
z-index: 200000;
padding: 16px 27px
}
.navbar-nav > li {
margin: 0 9px 0 0;
height: 51px
}

CSS Right Arrow

I am trying to create right arrow with gray border with css. but I think the arrow is over lapping the left rectangle. some finishing touch is required here:
.arrow_box {
position: relative;
background: #fff;
border: 2px solid #aaa;
width: 300px;
padding: 8px 20px 8px 40px;
}
.arrow_box:after,
.arrow_box:before {
left: 100%;
top: 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-left-color: #fff;
border-width: 17px;
margin-top: -17px;
}
.arrow_box:before {
border-color: rgba(170, 170, 170, 0);
border-left-color: #aaa;
border-width: 19px;
margin-top: -19px;
}
<div class="arrow_box">Consumer Customer
</div>
You can add border on specific sides except right:
.arrow_box {
position: relative;
background: #fff;
border-left: 2px solid #aaa;
border-top: 2px solid #aaa;
border-bottom: 2px solid #aaa;
width: 300px;
padding: 8px 20px 8px 40px;
box-sizing: border-box;
}
https://jsfiddle.net/2ca4aucm/1/

Trying to a fix a broken UL border

I need your help. For some reason, I cannot seem to get my border to seamlessly line up with its parent element. The example below depicts the problem that I am having:
Here is a drawing of the desired result:
I am guessing that I cannot be that far off. Maybe a fresh set eyes can remedy the issue at hand.
Here is the HTML & CSS in question:
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
* {
font-family: Segoe UI;
font-size: 9pt;
}
.dropdown dd, .dropdown ul {
margin: 0px;
padding: 0px;
}
.dropdown dd {
position: relative;
}
.dropdown:hover {
color:#5d4617;
}
.dropdown dt {
border:1px solid rgb(180,180,180);
width: 170px;
position: relative;
border-radius: 2px;
padding: 1px;
}
.dropdown dt:hover, .dropdown dt:focus {
color:#5d4617;
border-color: rgb(180,180,180);
}
.dropdown dt input[type=text] {
border: 0;
width: 100%;
box-sizing: border-box;
}
.dropdown dt input[type=button] {
border: 0;
width: 15px;
height: 18px;
margin: 0;
padding: 0;
position: absolute;
top: 0;
right: 0;
}
.dropdown dd ul {
border-left:1px solid rgb(180,180,180);
border-right:1px solid rgb(180,180,180);
border-bottom:1px solid rgb(180,180,180);
border-top:1px solid #FFF;
color: #000;
display: block;
left: 0px;
top: -1px;
padding: 1px;
position:absolute;
width:auto;
min-width: 170px;
list-style:none;
cursor: pointer;
}
.dropdown dd ul li {
padding: 2px;
display: block;
}
.dropdown dd ul li:hover {
background-color: rgb(232,232,232);
font-weight: bold;
}
#field_img {
position:absolute;
left:0px;
top:2px;
}
#fileno {
padding-left: 18px;
}
/*CSS STYLING FOR BUTTONS */
input[type="button"] {
cursor:pointer;
border: 1px solid #707070;
background-color: #F0F0F0;
border-radius: 4px;
box-shadow: inset 0 1px 2px #fff, inset 0 -0.7em #DDD;
background-image: -ms-linear-gradient(top, #F1F1F1 0%, #E3E3E3 50%, #D0D0D0 100%);
padding: 3px 6px;
}
input[type="button"]:hover {
cursor:pointer;
background-color: #EAF6FD;
border: 1px solid #3C7FB1;
box-shadow: inset 0 1px 2px #fff, inset 0 -0.7em #BEE6FD, 0 0 3px #A7D9F5;
}
input[type="button"][disabled], input[type="button"][disabled]:hover {
border: 1px solid #ADB2B5;
text-shadow: 1px 1px #fff;
cursor:default;
background-color: #F4F4F4;
box-shadow: inset 0 1px 2px #fff;
}
</style>
</head>
<body>
<div style="float: left;" class="dropdown">
<dt>
<img src="glass.png" id="field_img">
<input id="fileno" type="text">
<input type="button" value="▼" id="btn_arrow">
</dt>
<dd>
<ul id="recent"></ul>
</dd>
</div>
<div><input type="button" id="search" value="search"></div>
</body>
</html>
.dropdown dt {
border:1px solid rgb(180, 180, 180);
border-bottom: 0; /* << ------------------------ fix here */
...
}
.dropdown dd ul {
border-left:1px solid rgb(180, 180, 180);
border-right:1px solid rgb(180, 180, 180);
border-bottom:1px solid rgb(180, 180, 180);
border-top: 0; /* << ------------------------ fix here */
...
}
Demo

transparent hover background

Please visit the 'jsfiddle' Code, where the output can be seen. When hover displays the menu text, the background of the text field is transpernt + and lower zindex. I haven't set any transparency or zindex to the menu.
I have tried every possible technique to get it resolved but no luck.
.control-menu {
float: left;
width: 50px;
background-color: #F0F0F0;
height: 380px;
border-right: 1px solid #e0e0e0;
z-index: 100;
}
.control-menu ul {
list-style: none;
padding: 0;
margin: 0;
}
.btn {
position: relative;
display: block;
text-decoration: none;
background-color: #e0e0e0;
padding: 15px 20px 10px 20px;
text-align: center;
margin: 0 0 1px 0;
border-right: 1px groove #f00;
text-shadow: #666666 1px 1px 1px;
}
.btn-name {
display: none;
border-top: 1px solid #f0f0f0;
padding-top: 16px !important;
}
.btn:hover .btn-name {
display:inline;
background-color: #e0e0e0;
width: 100px;
padding: 17px 20px 12px 0;
margin: 0 0 1px 0;
border-right: 1px groove #f00;
}
.btn.active {
background-color: #F0F0F0;
border-bottom: 1px solid #f00;
}
.btn.active:hover .btn-name {
background-color: #F0F0F0;
border-bottom: 1px solid #f00;
}
can someone please guide solution?
just add
z-index:200
to the .btn, didn't change any positioning fiddle
just add position: relative; and z-index: 1000;
.btn:hover .btn-name {
display: inline;
background-color: #e0e0e0 !important;
width: 100px;
padding: 17px 20px 12px 0;
margin: 0 0 1px 0;
border-right: 1px groove #f00;
position: relative;
z-index: 1000;
}
in the btn:hover .btn-name add position relative and z-index: 1
.btn:hover .btn-name {
/* add this */
position: relative;
z-index: 1;
/* you code */
display: inline;
background-color: #e0e0e0 !important;
width: 100px;
padding: 17px 20px 12px 0;
margin: 0 0 1px 0;
border-right: 1px groove #f00;
}
here the fix : jsfiddle