How do I make rounded button-group in Foundation 6? - zurb-foundation

There used to be a "round" class on Foundation 5 that transforms a button-group to have rounded edges. How do I do this in Foundation 6?

It's not possible in Foundation 6. The rules have been completely removed along with others to reduce the file size. Your best bet is to copy the rules into the Foundation 6 css file or into a custom css file (it's up to you).
Here are the css rules you'll need (taken directly from the latest Foundation 5 file, with no alterations):
.button-group {
list-style: none;
margin: 0;
left: 0; }
.button-group:before, .button-group:after {
content: " ";
display: table; }
.button-group:after {
clear: both; }
.button-group.even-2 li {
display: inline-block;
margin: 0 -2px;
width: 50%; }
.button-group.even-2 li > button, .button-group.even-2 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-2 li:first-child button, .button-group.even-2 li:first-child .button {
border-left: 0; }
.button-group.even-2 li button, .button-group.even-2 li .button {
width: 100%; }
.button-group.even-3 li {
display: inline-block;
margin: 0 -2px;
width: 33.33333%; }
.button-group.even-3 li > button, .button-group.even-3 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-3 li:first-child button, .button-group.even-3 li:first-child .button {
border-left: 0; }
.button-group.even-3 li button, .button-group.even-3 li .button {
width: 100%; }
.button-group.even-4 li {
display: inline-block;
margin: 0 -2px;
width: 25%; }
.button-group.even-4 li > button, .button-group.even-4 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-4 li:first-child button, .button-group.even-4 li:first-child .button {
border-left: 0; }
.button-group.even-4 li button, .button-group.even-4 li .button {
width: 100%; }
.button-group.even-5 li {
display: inline-block;
margin: 0 -2px;
width: 20%; }
.button-group.even-5 li > button, .button-group.even-5 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-5 li:first-child button, .button-group.even-5 li:first-child .button {
border-left: 0; }
.button-group.even-5 li button, .button-group.even-5 li .button {
width: 100%; }
.button-group.even-6 li {
display: inline-block;
margin: 0 -2px;
width: 16.66667%; }
.button-group.even-6 li > button, .button-group.even-6 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-6 li:first-child button, .button-group.even-6 li:first-child .button {
border-left: 0; }
.button-group.even-6 li button, .button-group.even-6 li .button {
width: 100%; }
.button-group.even-7 li {
display: inline-block;
margin: 0 -2px;
width: 14.28571%; }
.button-group.even-7 li > button, .button-group.even-7 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-7 li:first-child button, .button-group.even-7 li:first-child .button {
border-left: 0; }
.button-group.even-7 li button, .button-group.even-7 li .button {
width: 100%; }
.button-group.even-8 li {
display: inline-block;
margin: 0 -2px;
width: 12.5%; }
.button-group.even-8 li > button, .button-group.even-8 li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.even-8 li:first-child button, .button-group.even-8 li:first-child .button {
border-left: 0; }
.button-group.even-8 li button, .button-group.even-8 li .button {
width: 100%; }
.button-group > li {
display: inline-block;
margin: 0 -2px; }
.button-group > li > button, .button-group > li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group > li:first-child button, .button-group > li:first-child .button {
border-left: 0; }
.button-group.stack > li {
display: block;
margin: 0;
float: none; }
.button-group.stack > li > button, .button-group.stack > li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.stack > li:first-child button, .button-group.stack > li:first-child .button {
border-left: 0; }
.button-group.stack > li > button, .button-group.stack > li .button {
border-color: rgba(255, 255, 255, 0.5);
border-left-width: 0;
border-top: 1px solid;
display: block;
margin: 0; }
.button-group.stack > li > button {
width: 100%; }
.button-group.stack > li:first-child button, .button-group.stack > li:first-child .button {
border-top: 0; }
.button-group.stack-for-small > li {
display: inline-block;
margin: 0 -2px; }
.button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button {
border-left: 0; }
#media only screen and (max-width: 40em) {
.button-group.stack-for-small > li {
display: block;
margin: 0;
width: 100%; }
.button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button {
border-left: 0; }
.button-group.stack-for-small > li > button, .button-group.stack-for-small > li .button {
border-color: rgba(255, 255, 255, 0.5);
border-left-width: 0;
border-top: 1px solid;
display: block;
margin: 0; }
.button-group.stack-for-small > li > button {
width: 100%; }
.button-group.stack-for-small > li:first-child button, .button-group.stack-for-small > li:first-child .button {
border-top: 0; } }
.button-group.radius > * {
display: inline-block;
margin: 0 -2px; }
.button-group.radius > * > button, .button-group.radius > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.radius > *:first-child button, .button-group.radius > *:first-child .button {
border-left: 0; }
.button-group.radius > *,
.button-group.radius > * > a,
.button-group.radius > * > button,
.button-group.radius > * > .button {
border-radius: 0; }
.button-group.radius > *:first-child, .button-group.radius > *:first-child > a, .button-group.radius > *:first-child > button, .button-group.radius > *:first-child > .button {
-webkit-border-bottom-left-radius: 3px;
-webkit-border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px; }
.button-group.radius > *:last-child, .button-group.radius > *:last-child > a, .button-group.radius > *:last-child > button, .button-group.radius > *:last-child > .button {
-webkit-border-bottom-right-radius: 3px;
-webkit-border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-top-right-radius: 3px; }
.button-group.radius.stack > * {
display: block;
margin: 0; }
.button-group.radius.stack > * > button, .button-group.radius.stack > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.radius.stack > *:first-child button, .button-group.radius.stack > *:first-child .button {
border-left: 0; }
.button-group.radius.stack > * > button, .button-group.radius.stack > * .button {
border-color: rgba(255, 255, 255, 0.5);
border-left-width: 0;
border-top: 1px solid;
display: block;
margin: 0; }
.button-group.radius.stack > * > button {
width: 100%; }
.button-group.radius.stack > *:first-child button, .button-group.radius.stack > *:first-child .button {
border-top: 0; }
.button-group.radius.stack > *,
.button-group.radius.stack > * > a,
.button-group.radius.stack > * > button,
.button-group.radius.stack > * > .button {
border-radius: 0; }
.button-group.radius.stack > *:first-child, .button-group.radius.stack > *:first-child > a, .button-group.radius.stack > *:first-child > button, .button-group.radius.stack > *:first-child > .button {
-webkit-top-left-radius: 3px;
-webkit-top-right-radius: 3px;
border-top-left-radius: 3px;
border-top-right-radius: 3px; }
.button-group.radius.stack > *:last-child, .button-group.radius.stack > *:last-child > a, .button-group.radius.stack > *:last-child > button, .button-group.radius.stack > *:last-child > .button {
-webkit-bottom-left-radius: 3px;
-webkit-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px; }
#media only screen and (min-width: 40.0625em) {
.button-group.radius.stack-for-small > * {
display: inline-block;
margin: 0 -2px; }
.button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button {
border-left: 0; }
.button-group.radius.stack-for-small > *,
.button-group.radius.stack-for-small > * > a,
.button-group.radius.stack-for-small > * > button,
.button-group.radius.stack-for-small > * > .button {
border-radius: 0; }
.button-group.radius.stack-for-small > *:first-child, .button-group.radius.stack-for-small > *:first-child > a, .button-group.radius.stack-for-small > *:first-child > button, .button-group.radius.stack-for-small > *:first-child > .button {
-webkit-border-bottom-left-radius: 3px;
-webkit-border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
border-top-left-radius: 3px; }
.button-group.radius.stack-for-small > *:last-child, .button-group.radius.stack-for-small > *:last-child > a, .button-group.radius.stack-for-small > *:last-child > button, .button-group.radius.stack-for-small > *:last-child > .button {
-webkit-border-bottom-right-radius: 3px;
-webkit-border-top-right-radius: 3px;
border-bottom-right-radius: 3px;
border-top-right-radius: 3px; } }
#media only screen and (max-width: 40em) {
.button-group.radius.stack-for-small > * {
display: block;
margin: 0; }
.button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button {
border-left: 0; }
.button-group.radius.stack-for-small > * > button, .button-group.radius.stack-for-small > * .button {
border-color: rgba(255, 255, 255, 0.5);
border-left-width: 0;
border-top: 1px solid;
display: block;
margin: 0; }
.button-group.radius.stack-for-small > * > button {
width: 100%; }
.button-group.radius.stack-for-small > *:first-child button, .button-group.radius.stack-for-small > *:first-child .button {
border-top: 0; }
.button-group.radius.stack-for-small > *,
.button-group.radius.stack-for-small > * > a,
.button-group.radius.stack-for-small > * > button,
.button-group.radius.stack-for-small > * > .button {
border-radius: 0; }
.button-group.radius.stack-for-small > *:first-child, .button-group.radius.stack-for-small > *:first-child > a, .button-group.radius.stack-for-small > *:first-child > button, .button-group.radius.stack-for-small > *:first-child > .button {
-webkit-top-left-radius: 3px;
-webkit-top-right-radius: 3px;
border-top-left-radius: 3px;
border-top-right-radius: 3px; }
.button-group.radius.stack-for-small > *:last-child, .button-group.radius.stack-for-small > *:last-child > a, .button-group.radius.stack-for-small > *:last-child > button, .button-group.radius.stack-for-small > *:last-child > .button {
-webkit-bottom-left-radius: 3px;
-webkit-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px; } }
.button-group.round > * {
display: inline-block;
margin: 0 -2px; }
.button-group.round > * > button, .button-group.round > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.round > *:first-child button, .button-group.round > *:first-child .button {
border-left: 0; }
.button-group.round > *,
.button-group.round > * > a,
.button-group.round > * > button,
.button-group.round > * > .button {
border-radius: 0; }
.button-group.round > *:first-child, .button-group.round > *:first-child > a, .button-group.round > *:first-child > button, .button-group.round > *:first-child > .button {
-webkit-border-bottom-left-radius: 1000px;
-webkit-border-top-left-radius: 1000px;
border-bottom-left-radius: 1000px;
border-top-left-radius: 1000px; }
.button-group.round > *:last-child, .button-group.round > *:last-child > a, .button-group.round > *:last-child > button, .button-group.round > *:last-child > .button {
-webkit-border-bottom-right-radius: 1000px;
-webkit-border-top-right-radius: 1000px;
border-bottom-right-radius: 1000px;
border-top-right-radius: 1000px; }
.button-group.round.stack > * {
display: block;
margin: 0; }
.button-group.round.stack > * > button, .button-group.round.stack > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.round.stack > *:first-child button, .button-group.round.stack > *:first-child .button {
border-left: 0; }
.button-group.round.stack > * > button, .button-group.round.stack > * .button {
border-color: rgba(255, 255, 255, 0.5);
border-left-width: 0;
border-top: 1px solid;
display: block;
margin: 0; }
.button-group.round.stack > * > button {
width: 100%; }
.button-group.round.stack > *:first-child button, .button-group.round.stack > *:first-child .button {
border-top: 0; }
.button-group.round.stack > *,
.button-group.round.stack > * > a,
.button-group.round.stack > * > button,
.button-group.round.stack > * > .button {
border-radius: 0; }
.button-group.round.stack > *:first-child, .button-group.round.stack > *:first-child > a, .button-group.round.stack > *:first-child > button, .button-group.round.stack > *:first-child > .button {
-webkit-top-left-radius: 1rem;
-webkit-top-right-radius: 1rem;
border-top-left-radius: 1rem;
border-top-right-radius: 1rem; }
.button-group.round.stack > *:last-child, .button-group.round.stack > *:last-child > a, .button-group.round.stack > *:last-child > button, .button-group.round.stack > *:last-child > .button {
-webkit-bottom-left-radius: 1rem;
-webkit-bottom-right-radius: 1rem;
border-bottom-left-radius: 1rem;
border-bottom-right-radius: 1rem; }
#media only screen and (min-width: 40.0625em) {
.button-group.round.stack-for-small > * {
display: inline-block;
margin: 0 -2px; }
.button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button {
border-left: 0; }
.button-group.round.stack-for-small > *,
.button-group.round.stack-for-small > * > a,
.button-group.round.stack-for-small > * > button,
.button-group.round.stack-for-small > * > .button {
border-radius: 0; }
.button-group.round.stack-for-small > *:first-child, .button-group.round.stack-for-small > *:first-child > a, .button-group.round.stack-for-small > *:first-child > button, .button-group.round.stack-for-small > *:first-child > .button {
-webkit-border-bottom-left-radius: 1000px;
-webkit-border-top-left-radius: 1000px;
border-bottom-left-radius: 1000px;
border-top-left-radius: 1000px; }
.button-group.round.stack-for-small > *:last-child, .button-group.round.stack-for-small > *:last-child > a, .button-group.round.stack-for-small > *:last-child > button, .button-group.round.stack-for-small > *:last-child > .button {
-webkit-border-bottom-right-radius: 1000px;
-webkit-border-top-right-radius: 1000px;
border-bottom-right-radius: 1000px;
border-top-right-radius: 1000px; } }
#media only screen and (max-width: 40em) {
.button-group.round.stack-for-small > * {
display: block;
margin: 0; }
.button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button {
border-left: 1px solid;
border-color: rgba(255, 255, 255, 0.5); }
.button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button {
border-left: 0; }
.button-group.round.stack-for-small > * > button, .button-group.round.stack-for-small > * .button {
border-color: rgba(255, 255, 255, 0.5);
border-left-width: 0;
border-top: 1px solid;
display: block;
margin: 0; }
.button-group.round.stack-for-small > * > button {
width: 100%; }
.button-group.round.stack-for-small > *:first-child button, .button-group.round.stack-for-small > *:first-child .button {
border-top: 0; }
.button-group.round.stack-for-small > *,
.button-group.round.stack-for-small > * > a,
.button-group.round.stack-for-small > * > button,
.button-group.round.stack-for-small > * > .button {
border-radius: 0; }
.button-group.round.stack-for-small > *:first-child, .button-group.round.stack-for-small > *:first-child > a, .button-group.round.stack-for-small > *:first-child > button, .button-group.round.stack-for-small > *:first-child > .button {
-webkit-top-left-radius: 1rem;
-webkit-top-right-radius: 1rem;
border-top-left-radius: 1rem;
border-top-right-radius: 1rem; }
.button-group.round.stack-for-small > *:last-child, .button-group.round.stack-for-small > *:last-child > a, .button-group.round.stack-for-small > *:last-child > button, .button-group.round.stack-for-small > *:last-child > .button {
-webkit-bottom-left-radius: 1rem;
-webkit-bottom-right-radius: 1rem;
border-bottom-left-radius: 1rem;
border-bottom-right-radius: 1rem; } }
.button-bar:before, .button-bar:after {
content: " ";
display: table; }
.button-bar:after {
clear: both; }
.button-bar .button-group {
float: left;
margin-right: 0.625rem; }
.button-bar .button-group div {
overflow: hidden; }
Foundation 6 Fiddle

Rounded button-group is essentially rounding of of the first and last buttons on the left and on the right, respectively.
HTML:
<div class="button-group">
<a class="button first">First</a>
<a class="button">Middle</a>
<a class="button last">Last</a>
</div>
SCSS:
#mixin radius-left($radius) {
border-radius-topleft: $radius;
border-radius-bottomleft: $radius;
-moz-border-radius-topleft: $radius;
-moz-border-radius-bottomleft: $radius;
-webkit-border-top-left-radius: $radius;
-webkit-border-bottom-left-radius: $radius;
-khtml-border-top-left-radius: $radius;
-khtml-border-bottom-left-radius: $radius;
}
#mixin radius-right($radius) {
border-radius-topright: $radius;
border-radius-bottomright: $radius;
-moz-border-radius-topright: $radius;
-moz-border-radius-bottomright: $radius;
-webkit-border-top-right-radius: $radius;
-webkit-border-bottom-right-radius: $radius;
-khtml-border-top-right-radius: $radius;
-khtml-border-bottom-right-radius: $radius;
}
..
..
.button.first { #include radius-left(10px); }
.button.last { #include radius-right(10px); }
Just a few easy to understand lines providing complete control over the rounding.

Related

Making Bootstrap's modal-fullscreen not quite fullscreen

I needed a way to create fullscreen Bootstrap modals that weren't 'fully' fullscreen, as I felt that this may create the impression of the site having navigated to a new page. The solution seemed to be to rework the existing modal-fullscreen to pull it in a bit at the edges. I couldn't find an existing solution for this.
I had a go at custom CSS for this. Not sure how robust it is but I didn't change a lot from modal-fullscreen.
.modal-almost-fullscreen {
width: 99vw;
max-width: none;
height: 99%;
margin-top: 2px;
margin-bottom: 2px;
}
.modal-almost-fullscreen .modal-content {
height: 99%;
border: 0;
}
.modal-almost-fullscreen .modal-header,
.modal-almost-fullscreen .modal-footer {
border-radius: 0;
}
.modal-almost-fullscreen .modal-body {
overflow-y: auto;
}
#media (max-width: 575.99px) {
.modal-almost-fullscreen-sm-down {
width: 99vw;
max-width: none;
height: 99%;
margin: 0;
}
.modal-almost-fullscreen-sm-down .modal-content {
height: 99%;
border: 0;
border-radius: 0;
}
.modal-almost-fullscreen-sm-down .modal-header,
.modal-almost-fullscreen-sm-down .modal-footer {
border-radius: 0;
}
.modal-almost-fullscreen-sm-down .modal-body {
overflow-y: auto;
}
}
#media (max-width: 767.99px) {
.modal-almost-fullscreen-md-down {
width: 99vw;
max-width: none;
height: 99%;
margin: 0;
}
.modal-almost-fullscreen-md-down .modal-content {
height: 99%;
border: 0;
border-radius: 0;
}
.modal-almost-fullscreen-md-down .modal-header,
.modal-almost-fullscreen-md-down .modal-footer {
border-radius: 0;
}
.modal-almost-fullscreen-md-down .modal-body {
overflow-y: auto;
}
}
#media (max-width: 991.99px) {
.modal-almost-fullscreen-lg-down {
width: 99vw;
max-width: none;
height: 99%;
margin: 0;
}
.modal-almost-fullscreen-lg-down .modal-content {
height: 99%;
border: 0;
border-radius: 0;
}
.modal-almost-fullscreen-lg-down .modal-header,
.modal-almost-fullscreen-lg-down .modal-footer {
border-radius: 0;
}
.modal-almost-fullscreen-lg-down .modal-body {
overflow-y: auto;
}
}
#media (max-width: 1199.99px) {
.modal-almost-fullscreen-xl-down {
width: 99vw;
max-width: none;
height: 99%;
margin: 0;
}
.modal-almost-fullscreen-xl-down .modal-content {
height: 99%;
border: 0;
border-radius: 0;
}
.modal-almost-fullscreen-xl-down .modal-header,
.modal-almost-fullscreen-xl-down .modal-footer {
border-radius: 0;
}
.modal-almost-fullscreen-xl-down .modal-body {
overflow-y: auto;
}
}
#media (max-width: 1399.99px) {
.modal-almost-fullscreen-xxl-down {
width: 99vw;
max-width: none;
height: 99%;
margin: 0;
}
.modal-almost-fullscreen-xxl-down .modal-content {
height: 99%;
border: 0;
border-radius: 0;
}
.modal-almost-fullscreen-xxl-down .modal-header,
.modal-almost-fullscreen-xxl-down .modal-footer {
border-radius: 0;
}
.modal-almost-fullscreen-xxl-down .modal-body {
overflow-y: auto;
}
}
JSFiddle:
https://jsfiddle.net/valoukh/e2karuxf/

bootstrap-modal transparent background opaque text

I am having a problem setting a bootstrap-modal as transparent with background opaque text. I tried setting the background color as RGBA, however, it still affects the text making it the same transparency now. I tried defining the background in: .modal-open, .modal-dialog, .modal-content, .modal.in and .modal-dialog — none of those worked.
HTML:
<!-- Modal -->
<div class="modal" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<div class="modal-title" id="myModalLabel"><h1>ZU</h1></div>
<div class="modal-body">
<p>Do Zore World Tour 2017</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Unde nihil enim aperiam illum nisi tenetur facere quidem possimus libero dolorum, vitae natus cumque? Dolor sapiente fugiat culpa repudiandae, earum quisquam.</p>
</div>
<!-- email sign up form w/ button -->
<div class="container">
<div class="row">
<div class="col-md-6">
<p><form class="form-inline">
<div class="form-group">
<label for="email"></label>
<input type="email" class="form-control" id="email" placeholder="Email address*"><button type="submit" class="btn btn-default">Sign Up</button>
</div>
<div>
</div>
</form></p>
</form>
</div>
</div>
</div>
<!-- email sign up form w/ button -->
</div>
</div>
CSS:
/* modal pop up */
.modal-content {
position: relative;
background-color: rgba(250, 179, 0, 0,6;)!important;
border: 1px solid #999;
border: 1px solid rgba(0,0,0,.2);
border-radius: 0px;
outline: 0;
-webkit-box-shadow: 0 3px 9px rgba(0,0,0,.5);
box-shadow: 0 3px 9px rgba(0,0,0,.5);
}
.modal.body{
background-color: none;
}
.modal-title h1{
font-family:;
font-size: 20.854em;
text-align: center;
color:#fab300;
}
/* modal pop up */
I have updated the CSS file. Please check at the codepen link here:
https://codepen.io/sushantb/pen/mwvzdR?editors=0100
The CSS file now looks like this:
* {
border-radius: 0 !important;
}
body {
background-color: #000;
}
/* LINKS */
a:hover {
color: #ffcc4d !important;
text-decoration: none;
}
a:visited {
color: #fab300 !important;
text-decoration: none;
}
/* LINKS */
/* nav bar custom*/
.navbar-inverse {
background-color: #000;
padding-top: 0px;
padding-bottom: 0px;
border: none;
padding: 0px;
margin: 0px;
}
.navbar-inverse .navbar-nav > li > a:hover, .navbar-default .navbar-nav > li > a:focus {
color: #ffcc4d !important; /*Sets the text hover color on navbar*/
}
.navbar-inverse .navbar-nav > .active > a, .navbar-default .navbar-nav > .active >
a:hover, .navbar-default .navbar-nav > .active > a:focus {
color: #fab300 !important; /*BACKGROUND color for active*/
}
.navbar-toggle{
position: relative;
float: right;
padding: 9px 10px;
margin-top: 8px;
margin-right: 15px;
margin-bottom: 8px;
background-color: transparent;
background-image: none;
border: 1px solid #fab300 !important;
border-radius: 4px;
}
.navbar-inverse .navbar-toggle .sr-only .icon-bar{
color: #fab300 !important;
}
/*.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: silver; /*Change rollover cell color here
}*/
.navbar-inverse .navbar-nav > li > a {
color: #fab300; /*Change active text color here*/
}
.navbar-inverse .navbar-brand > li > a:hover, .navbar-inverse .navbar-brand > li > a:focus {
color: #ffcc4d !important; /*Sets the text hover color on brand TO FIGURE OUT!!!*/
}
.navbar-inverse .navbar-brand > .active > a, .navbar-inverse .navbar-brand > .active >
a:hover, .navbar-default .navbar-nav > .active > a:focus {
color: #fab300 !important; /*BACKGROUND color for active brand TO FIGUER OUT!!!*/
}
/* nav bar custom*/
/* type */
body {
background-color: white;
font-family: Scope One;
font-weight: 400;
line-height: 1.45;
color: #333;
}
p {margin-bottom: 1.3em;}
p span {
color: white;
font-weight: 900;
}
h1, h2, h3, h4 {
margin: 1.414em 0 0.5em;
font-family: Scope One;
font-weight: inherit;
line-height: 1.2;
}
h1 {
margin-top: 0;
font-size: 6.854em;
}
h2 {font-size: 4.236em;}
h3 {font-size: 2.618em;}
h4 {font-size: 1.618em;}
small, .font_small {font-size: 0.618em;}
/* type */
/* modal pop up rgba(250, 179, 0, 0,6;) */
.modal-content {
background-color: rgba(0,0,0,0.6)!important;
position: relative;
opacity: 1.0;
border: 1px solid #999;
border-radius: 50px;
outline: 0;
}
.modal.body{
background-color: green;
}
.modal-dialog {
background-color: white;
}
.modal.in .modal-dialog {
background-color: transparent;
}
.modal-title h1{
font-family:calibri;
font-size: 20.854em;
text-align: center;
color:#fab300;
opacity: 1;
padding-bottom:5px;
}
.modal-title h3{
font-family:inherit;
font-size: inherit;
text-align: center;
color:#fab300;
padding-bottom:5px;
}
.modal-body h3, p{
color: #fab300;
}
.modal-backdrop {
background-color: transparent !important; /* I kept this to show the kind of transparent effect I would like to acheive on tge modal background */
}
/* email sign up form */
.input .placeholder-shown{
color:#fab300 !important;
}
.input .placeholder{
color: #fab300;
}
.form-control{
border-top: none;
border-bottom: 1px solid #fab300;
border-left: none;
border-right: none;
box-shadow: none !important;
width: 65%;
}
.button, .input, .select, .textarea{
color:#fab300 !important
border-top: 1px solid #fab300 !important;
border-bottom: 1px solid #fab300!important;
border-left: 1px solid #fab300 !important;
border-right: 1px solid #fab300 !important;
box-shadow: none !important;
}
.form-inline .btn .btn-default{
border-top: 1px solid #fab300 !important;
border-bottom: 1px solid #fab300!important;
border-left: 1px solid #fab300 !important;
border-right: 1px solid #fab300 !important;
box-shadow: none !important;
}
/* email sign up form */
/* modal pop up rgba(250, 179, 0, 0,6;) */
/* overlay */
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
transition: .5s ease;
background-color: rgba(250, 179, 0,.2;)!important;
}
.container:hover .overlay {
opacity: 1;
}
.text {
color: #fab300;
font-size: 10px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
}
/* .overlay .btn .btn-primary .btn-lg{
}*/
/* CTA button color override */
.btn-primary, .btn-primary:active, .btn-primary:visited, .btn-primary:focus {
background-color: #fab300 !important;
/* background-color: rgba(250, 179, 0,.6;)!important -- I WOULD LIKE TO HAVE IT TRANSPARENT*/
border-color: #fab300 !important;
font-family: 'Scope One', serif;
font-color:#fff !important;
font-size: 16px;
font-style: bold;
text-transform: none;
color: white;
vertical-align: center;
text-align: center;
}
.btn-primary:hover{
background-color: #ffcc4d !important;
border-color: #ffcc4d !important;
}
/* overlay */
/* Tour - Table */
.table .table-inverse{
border-spacing: 0;
background-color: rgba(250, 179, 0,.6;);
}
.table .table-inverse .td {
padding: 0;
}
/* Tour - Table */
Please review and revert.
Regards,
Sushant

Changing QWidget object scope changes the CSS

Consider this two parts of code
NotifWidget* notifWidget_ = new NotifWidget();
notifWidget_->show();
notifWidget_->move(computePosition(notifWidget_));
notifWidget_->show();
notifWidget_->move(computePosition(notifWidget_));
In first case the NotifWidget (which is inherited from QFrame) the notifWidget_ object is local object and the corresponding widget is show like this
In the second case the notifWidget_ object is the class member and and here is the image for that case
Both widgets have same CSS style sheet and same objectName. Does anyone know what's the problem for the second case? Why in second case the inner widgets are overlapped?
update
including css(if any)
QWidget#NotifWidget_actions
{
border:0px solid;
}
QWidget#AccessGiven, QWidget#AccessGiven[onhover="false"]
{
background: white;
}
QWidget#AccessGiven[onhover="true"]
{
background: #f2f2f2;
}
QLabel#AccessGiven_icon, QLabel#AccessGiven_message, QLabel#AccessGiven_icon[onhover="false"], QLabel#AccessGiven_message[onhover="false"]
{
background: white;
padding-bottom: 0px;
qproperty-wordWrap: true;
max-height: 48px;
min-height: 48px;
}
QLabel#AccessGiven_message
{
font: 12px;
max-width: 200px;
min-width: 200px;
}
QLabel#AccessGiven_icon
{
max-width: 64px;
min-width: 64px;
}
QLabel#AccessGiven_icon[onhover="true"], QLabel#AccessGiven_message[onhover="true"]
{
background: #f2f2f2;
}
QPushButton#AccessGiven_action, QPushButton#AccessGiven_action[onhover="true"]
{
font: 12px;
color: rgba( 35, 35, 35, 0% );
padding-bottom: 0px;
background-color: rgba( 35, 35, 35, 0% );
margin-left: 0px;
}
QPushButton#AccessGiven_action[onhover="true"]
{
color: rgba( 35, 35, 35, 50% );
}
QPushButton#AccessGiven_action:hover
{
background: rgba( 35, 35, 35, 20% );
}
QPushButton#AccessGiven_action:pressed
{
background: rgba( 35, 35, 35, 10% );
padding-bottom: 2px;
}
QPushButton#NotifWidget_settings
{
background-image: url(./media/settings.png);
height: 24px;
width: 24px;
background-repeat: no-repeat;
background-position: center center;
border: 0px;
}
QPushButton#NotifWidget_settings:hover
{
background-color: lightgray;
}
QPushButton#NotifWidget_settings:pressed
{
background-color: silver;
}
QPushButton#NotifWidget_help
{
background-image: url(./media/help.png);
height: 24px;
width: 24px;
background-repeat: no-repeat;
background-position: center center;
border: 0px;
}
QPushButton#NotifWidget_help:hover
{
background-color: lightgray;
}
QPushButton#NotifWidget_help:pressed
{
background-color: silver;
}
QPushButton#NotifWidget_toWeb
{
height: 24px;
width: 24px;
background-image: url(./media/web.png);
background-repeat: no-repeat;
background-position: center center;;
border: 0px light ;
}
QPushButton#NotifWidget_toWeb:hover
{
background-color: lightgray;
}
QPushButton#NotifWidget_toWeb:pressed
{
background-color: silver;
}
QPushButton#NotifWidget_exit
{
height: 14;
padding:2px;
margin-left:5px;
background-color: rgb(255,0,0, 0%);
border: 1px light ;
}
QPushButton#NotifWidget_exit:hover
{
background-color: rgb(255,0,0, 25%);
}
QPushButton#NotifWidget_exit:pressed
{
background-color: rgb(255,0,0, 35%);
}
QScrollArea#NotifWidget_scrollArea
{
/* background: transparent;
border: 0px solid;*/
}
QFrame#NotifWidget
{
background-color: #F5F5F5;
/*min-width: 345;
max-width: 345;
min-height: 400;*/
border: 1px solid rgb(37, 76, 241);
}

css file not working properly on rails 4.2

css is not working properly in rails 4.2.5 on implementing home page looks like
the gem file are
gem 'rails', '4.2.5.1'
gem 'pg'
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'devise'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'bootstrap-sass', '3.2.0.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'coffee-script-source', '1.8.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
my routes are
Rails.application.routes.draw do
get 'pages/about'
get 'pages/contact'
get 'pages/resources'
devise_for :admin_users, ActiveAdmin::Devise.config
ActiveAdmin.routes(self)
resources :categories
get 'categories/index'
get 'categories/edit'
get 'categories/new'
get 'categories/show'
get 'home/index'
resources :posts
root 'home#index'
end
my css files are:
#import "bootstrap-sprockets";
#import "bootstrap";
body {
margin: 0;
padding: 0;
background: #000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #6F6F6F;
}
strong {
color: #3F3F3F;
}
h1,h2,h3 {
margin: 0;
padding: 0;
text-transform: uppercase;
font-family: 'Abel', sans-serif;
font-weight: normal;
color: #2B2522;
}
h1 {
font-size: 2em;
}
h2 {
font-size: 2.8em;
}
h3 {
font-size: 1.6em;
}
p,ul,ol {
margin-top: 0;
line-height: 180%;
}
ul,ol {
}
a {
text-decoration: underline;
color: #D93544;
}
a:hover{
text-decoration: none;
}
#wrapper{
width: 1000px;
margin: 0 auto;
padding: 0;
background: #000000;
}
/* Header */
#header-wrapper {
height: 120px;
}
#header {
width: 1000px;
margin: 0 auto;
padding: 0px 0px 0px 0px;
}
/* Logo */
#logo {
float: left;
width: 350px;
margin: 0;
padding: 0;
color: #000000;
}
#logo h1, #logo p {
}
#logo h1 {
margin-left: 30px;
padding: 20px 0px 0px 0px;
letter-spacing: -1px;
text-transform: uppercase;
font-family: 'Abel', sans-serif;
font-size: 3.8em;
font-weight: bold;
color: #D43442;
}
#logo h1 a {
color: #D43442;
}
#logo h1 span {
}
#logo p {
margin: 0;
padding: 0px 0 0 32px;
font: normal 14px Georgia, "Times New Roman", Times, serif;
font-style: italic;
color: #BEBEBE;
}
#logo a {
border: none;
background: none;
text-decoration: none;
color: #707070
}
/* Search */
#search {
float: right;
width: 280px;
height: 60px;
padding: 20px 0px 0px 0px
}
#search form {
height: 41px;
margin: 0;
padding: 10px 0 0 0px;
}
#search fieldset {
margin: 0;
padding: 0;
border: none;
}
#search-text {
width: 170px;
height: 19px;
padding: 4px 5px 1px 5px;
border: none;
background: #FFFFFF;
text-transform: lowercase;
font: normal 11px Arial, Helvetica, sans-serif;
color: #5D781D;
}
#search-submit {
width: 50px;
height: 26px;
background: #D93544;
color: #FFFFFF;
}
/* Menu */
#menu {
float: right;
height: 125px;
margin: 0 auto;
padding: 0;
background: #D43442;
}
#menu ul {
margin: 0;
padding: 0px 0px 0px 0px;
list-style: none;
line-height: normal;
}
#menu li {
float: left;
border-left: 1px solid #000000;
}
#menu a {
display: block;
height: 80px;
padding: 45px 25px 0px 25px;
text-decoration: none;
text-align: center;
text-transform: uppercase;
font-family: 'Abel', sans-serif;
font-size: 26px;
font-weight: normal;
color: #FFFFFF;
border: none;
}
#menu a:hover, #menu .current_page_item a{
background: #A32833;
text-decoration: none;
}
#menu .current_page_item a {
}
/* Page */
#page {
width: 980px;
margin: 0 auto;
padding: 0px 0px 0px 20px;
}
#page-bgtop {
padding: 20px 0px;
}
/* Content */
#content {
float: right;
width: 600px;
padding: 40px 0px 0px 0px;
}
.post, .post_full, .page {
margin-bottom: 30px;
padding: 30px 20px 20px 20px;
background: #FFFFFF url (images/page-gradient-bg.png) repeat-x left bottom;
box-shadow: inset 0px 0px 1px 1px rgba(255,255,255,1);
outline: 1px dashed #D4D4D4;
outline-offset: -5px;
}
.post .title, .page .title {
height: 41px;
padding: 0px 0px 0px 0px;
letter-spacing: -1px;
font-family: 'Abel', sans-serif;
}
.post .title a, .page .title a {
text-decoration: none;
color: #202020;
border: none;
}
.post .entry {
padding: 20px 30px 20px 30px;
padding-bottom: 20px;
text-align: justify;
}
.post .byline {
clear: both;
overflow: hidden;
padding-bottom: 20px;
}
.post .meta {
float: left;
}
.post .links {
float: right;
}
/* Full Post */
.post_full .byline p {
padding: 0;
margin: 0;
}
.post_full .byline {
clear: both;
overflow: hidden;
margin-bottom: 15px;
padding: 5px;
background: black:;
color: #fff;
border-left: 5px #D93544 solid;
}
.links a {
}
/* Sidebar */
#sidebar {
float: left;
width: 300px;
margin: 0px;
padding: 20px 20px 0px 0px;
}
#sidebar ul {
margin: 0;
padding: 0;
list-style: none;
}
#sidebar li {
margin: 0;
padding: 0;
}
#sidebar li ul {
margin: 0px 0px;
padding-bottom: 30px;
}
#sidebar li li {
line-height: 35px;
border-bottom: 1px dashed #191919;
background: url (images/img01.jpg) no-repeat left 15px;
margin: 0px 20px 0px 20px;
border-left: none;
text-align: left;
}
#sidebar li li span {
display: block;
margin-top: -20px;
padding: 0;
font-size: 11px;
font-style: italic;
}
#sidebar li li a {
padding: 0px 0px 0px 0px;
}
#sidebar h2 {
height: 31px;
margin: 0px 0px 0px 0px;
padding: 10px 0px 0px 20px;
background: url(images/img03.jpg) no-repeat left top;
text-shadow: #203060 -1px 1px 2px;
text-align: left;
text-transform: uppercase;
letter-spacing: -0.5em;
font-size: 2em;
color: #FFFFFF;
}
#sidebar p {
margin: 0 0px;
padding: 0px 20px 20px 20px;
text-align: justify;
color: #847F7E;
}
#sidebar a {
border: none;
color: #847F7E;
}
#sidebar a:hover {
text-decoration: underline;
color: #847F7E;
}
/* Calendar */
#calender {
}
#calender_wrap{
padding:20px;
}
#calender table {
width: 100%;
}
#calendar body td {
text-align: center;
}
#calendar #next {
text-align: right;
}
/footer/
#footer{
width: 980px;
height: 50px;
margin: 0 auto;
padding: 0px 0 15px 0;
font-family: Arial, Helvetica, sans-serif;
}
#footer p {
margin: 0;
line-height: normal;
font-size: 10px;
text-transform: uppercase;
text-align: center;
color: #847F7E;
}
#footer a {
color: 847F7E;
}
form label{width: 110px; display: inline-block;}
looks like thisenter image description here
want home about contact to be in column form
and want to remove the header background

Drop-down menu that opens UP/upward CSS

I'm fairly new to CSS so if someone can help me I'd be very appreciative!!!
I need to make a dropdown menu that drops up not down, since the nav bar is at the bottom of the page.
Here is the CSS for the nav bar
* 5. Navigation *
************************************************/
#navigation {
background: #000000;
height: 30px;
width: 100%;
font-size: 0.8em;
font-family: Arial, Helvetica, sans-serif;
font-style: normal;
color: #666666;
font-weight: normal;
margin: 0px auto 1px;
padding: 0px 0px 0px 0px;
position: relative;
z-index: 9;
}
/*** ESSENTIAL STYLES ***/
.menu, .menu * {
margin: 0;
padding: 0;
list-style: none;
}
.menu {
line-height: 1.0;
}
.menu ul {
margin: 0px;
padding: 0px;
}
.menu ul ul, ul.menu ul {
position: absolute;
top: -9999px;
width: 180px; /* left offset of submenus need to match (see below) */
}
.menu ul li ul li, ul.menu ul li {
width: 100%;
border: none;
margin: 0px 0px 0px 0px;
}
.menu li:hover {
visibility: inherit; /* fixes IE7 'sticky bug' */
}
.menu li {
float: left;
position: relative;
}
.menu a {
display: block;
position: relative;
}
.menu li:hover ul,
.menu li.sfHover ul {
left: 0;
top: 30px; /* match top ul list item height */
z-index: 99;
}
ul.menu li:hover li ul,
ul.menu li.sfHover li ul {
top: -9999px;
}
ul.menu li li:hover ul,
ul.menu li li.sfHover ul {
left: 180px; /* match ul width */
top: 0;
}
ul.menu li li:hover li ul,
ul.menu li li.sfHover li ul {
top: -9999px;
}
ul.menu li li li:hover ul,
ul.menu li li li.sfHover ul {
left: 180px; /* match ul width */
top: 0;
}
/*** SKIN ***/
#navigation .menu .current_page_item a,
#navigation .menu .current_page_ancestor a,
#navigation .menu .current-menu-item a,
#navigation .menu .current-cat a {
background: #000000;
color: #FFFFFF;
}
#navigation .menu li .current_page_item a, #navigation .menu li .current_page_item a:hover,
#navigation .menu li .current-menu-item a, #navigation .menu li .current-menu-item a:hover,
#navigation .menu li .current-cat a, #navigation .menu li .current-cat a:hover {
background: #242424;
color: #FFFFFF;
}
#navigation .menu .current_page_item ul li a,
#navigation .menu .current-menu-item ul li a,
#navigation .menu .current-menu-ancestor ul li a,
#navigation .menu .current_page_ancestor ul li a,
#navigation .menu .current-cat ul li a {
background: #FFFFFF;
color: #333333;
}
#navigation .menu .current_page_item ul li a:hover,
#navigation .menu .current-menu-item ul li a:hover,
#navigation .menu .current-menu-ancestor ul li a:hover,
#navigation .menu .current_page_ancestor ul li a:hover,
#navigation .menu .current-menu-ancestor ul .current_page_item a,
#navigation .menu .current_page_ancestor ul .current-menu-item a,
#navigation .menu .current-cat ul li a:hover {
background: #F2F2F2;
color: #000000;
}
#navigation .menu .current_page_item .sub-menu a,
#navigation .menu .current_page_ancestor .sub-menu a,
#navigation .menu .current-menu-item .sub-menu a,
#navigation .menu .current-cat .sub-menu a {
background: #FFFFFF;
color: #333333;
}
#navigation .menu .current_page_item .sub-menu a:hover,
#navigation .menu .current_page_ancestor .sub-menu a:hover,
#navigation .menu .current-menu-item .sub-menu a:hover,
#navigation .menu .current-cat .sub-menu a:hover {
background: #F2F2F2;
color: #000000;
}
.menu {
float: left;
margin-bottom: 0;
}
.menu a {
background: #000000;
text-decoration: none;
font-style: normal;
font-weight: normal;
line-height: 30px;
margin: 0px 1px 0px 0px;
padding: 0px 10px 0px 10px;
}
.menu a, .menu a:link, .menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
color: #999999;
}
.menu a:focus, .menu a:hover, .menu a:active {
background: #000000;
color: #FFFFFF;
outline: 0;
}
.menu li li a, .menu li li a:link, .menu li li a:visited {
background: #FFFFFF;
color: #666666;
margin: 0px;
padding: 0px 10px 0px 10px;
text-decoration: none;
text-transform: none;
text-shadow: none;
border: none;
}
.menu li li a:focus, .menu li li a:hover, .menu li li a:active {
background: #F2F2F2;
color: #333333;
border-bottom: none;
outline: 0;
}
.menu li.sfHover a {
background: #FFFFFF;
color: #333333;
}
.menu li {
margin: 0px;
}
.menu li li {
border: none;
}
.menu li:hover, .menu li.sfHover {
background: none;
border-bottom: none;
outline: 0;
}
.menu li li:hover, .menu li li.sfHover {
padding: 0px;
border: none;
outline: 0;
}
/*** ARROWS **/
.menu a.sf-with-ul {
padding-right: 25px;
min-width: 1px; /* trigger IE7 hasLayout so spans position accurately */
}
.sf-sub-indicator {
position: absolute;
display: block;
right: 10px;
top: 9px; /* IE6 only */
width: 10px;
height: 10px;
text-indent: -9999px;
overflow: hidden;
background: url(images/arrows-ffffff.png) no-repeat -10px -100px; /* 8-bit indexed alpha png. IE6 gets solid image only */
}
a > .sf-sub-indicator { /* give all except IE6 the correct values */
top: 9px;
background-position: 0 -100px; /* use translucent arrow for modern browsers*/
}
/* apply hovers to modern browsers */
a:focus > .sf-sub-indicator,
a:hover > .sf-sub-indicator,
a:active > .sf-sub-indicator,
li:hover > a > .sf-sub-indicator,
li.sfHover > a > .sf-sub-indicator {
background-position: -10px -100px; /* arrow hovers for modern browsers*/
}
/* point right for anchors in subs */
.menu ul ul .sf-sub-indicator, ul.menu ul .sf-sub-indicator {
background-position: -10px 0;
}
.menu ul ul a > .sf-sub-indicator, ul.menu ul a > .sf-sub-indicator {
top: 8px;
background-position: 0 0;
}
/* apply hovers to modern browsers */
.menu ul ul a:focus > .sf-sub-indicator,
.menu ul ul a:hover > .sf-sub-indicator,
.menu ul ul a:active > .sf-sub-indicator,
.menu ul ul li:hover > a > .sf-sub-indicator,
.menu ul ul li.sfHover > a > .sf-sub-indicator {
background-position: -10px 0; /* arrow hovers for modern browsers*/
}
/*** shadows for all but IE6 ***/
.sf-shadow ul ul {
background: none;
padding: 0 8px 9px 0;
-moz-border-radius-bottomleft: 17px;
-moz-border-radius-topright: 17px;
-webkit-border-top-right-radius: 17px;
-webkit-border-bottom-left-radius: 17px;
}
.sf-shadow ul.sf-shadow-off {
background: transparent;
}
Here is a post with 3 demos of upward expanding drop-downs. They've even added a jsFiddle :)
can you maybe provide a link to the live code so i can see exactly how its set up, or you can add the html in to your question too, then i'll be happy to help you.
meanwhile if you just whant a simple example here is one: Link to Drop up