Making Bootstrap's modal-fullscreen not quite fullscreen - bootstrap-modal

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/

Related

ul not taking 100% I want my Ul to occupy full height

I want my ul to get the full height of the div but its not taking the divs entire height so I need to change the ul to take full height of the div
.header-wrapper {
display: inline-flex;
width: 100%;
height: 50px;
top: 0;
left: 0;
position: fixed;
background: linear-gradient(base.$secondaryColor, base.$primaryColor);
}
.top-nav-bar {
height: 100%;
float: right;
background-color: green;
li {
display: inline-flex;
list-style-type: none;
color: base.$whiteColor;
margin-left: 10px;
margin-right: 10px;
align-items: center;
justify-content: center;
background-color: red;
height: 50px;
width: 100px;
cursor: pointer;
&:hover {
color: base.$blackColor;
background-color: base.$whiteColor;
}
}
}
Here is my code

How to change scroll bar margin in QListWidget

I need that scroll bar in QListWidget have
margin = 6;
you should use a stylesheet, for example look at this :
QScrollBar:horizontal {
background: transparent;
height: 10px;
margin: 0;
}
QScrollBar:vertical {
background: transparent;
width: 10px;
margin: 0;
}
QScrollBar::handle:horizontal {
background: #374146;
min-width: 16px;
border-radius: 5px;
}
QScrollBar::handle:vertical {
background: #374146;
min-height: 16px;
border-radius: 5px;
}
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal,
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
background: none;
}
QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal,
QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {
border: none;
background: none;
}
QListWidget QScrollBar::handle:horizontal {
background-color:rgb(0, 170, 171);
}
QListWidget QScrollBar::handle:vertical {
background-color:rgb(0, 170, 171);
margin:2;
}
output
I set margin 2, margin 6 looks like this

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

Is it possible to set transition delay on :after?

How to set transition delay on li:after so that it aligns with transition for li:hover? Seems like it doesn't work when transition: all 0.3s; is set, because it appears instantly.
Here is the Fiddle
Maybe if you do something like this, where you first set up the :after and then show it on :hover
body {
background-color: #f01;
}
ul {
background-color: #fff;
}
li {
position: relative;
list-style-type: none;
display: inline;
line-height: 2em;
padding: 5px;
transition: all 1s;
}
li:hover {
background-color: #414C52;
transition: all 1s;
}
li:after {
top: 25px;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-color: rgba(136, 183, 213, 0);
border-top-color: #414C52;
margin-left: -10px;
transition: all 1s;
border-width: 10px;
opacity: 0;
}
li:hover:after {
opacity: 1;
transition: all 1s;
}
a {
padding: 12px 10px color: #333;
}
<ul class="nav navbar-nav">
<li>asdfasdf</li>
<li class="active">ffffft</li>
</ul>
yes, it should do it but you need an inital li:after before your li:hover:after