CSS - Weird flex + bootstrap's dropdown-menu interaction on mobile < 767px - css

I've been stuck for about a week on this and i really need help. Searched everywhere but to no avail. The problem i am facing is that my flex items get pushed horizontally when i open a dropdown-menu that's togglable from another item on the list. Screenshot describing the problem : http://imgur.com/H6FUf3o
I am using rails and react.
the header.html.erb
<nav data-behavior="animated-navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid col-md-10 col-md-offset-1">
<div class="navbar-header">
<%= link_to root_path, class: "navbar-brand", id: "logo" do %>
<%= image_tag('logo.png', width: 55) %>
<% end %>
</div>
<ul class="nav navbar-nav filter-links">
<li>
<% if user_signed_in? %>
<%= nav_link_to "Home", root_path %>
<% else %>
<%= nav_link_to "Staff pick", root_path %>
<% end %>
</li>
<li><%= nav_link_to "Top stories", top_stories_path %></li>
<% if user_signed_in? %>
<li><%= nav_link_to "Bookmarks", dashboard_bookmarks_path %></li>
<% else %>
<li>Bookmarks</li>
<% end %>
</ul>
<div class="folding-nav">
<ul class="nav navbar-nav navbar-right">
<li class="main-searchbar">
<%= react_component('SearchContainer') %>
</li>
<% if user_signed_in? %>
<li class="new-post-button"><%= link_to "Write a story", new_post_path, class: "button" %></li>
<li id="notifications">
<%= react_component('NotificationsContainer', {}) %>
</li>
<%= render 'layouts/avatar_dropdown' %>
<% else %>
<li class="new-post-button"><%= link_to "Write a story", new_post_path, class: "button", data: { behavior: 'trigger-overlay' } %></li>
<li class="sign-in-button"><%= link_to "Sign in / Sign up", new_user_session_path, class: 'button green-border-button', data: { behavior: 'trigger-overlay' } %></li>
<% end %>
</ul>
</div>
</div>
</nav>
the header.scss
body {
padding-top: 0;
}
.container-fluid, .container {
padding: 0;
}
.navbar-header {
padding: 8px 0;
border-bottom: 1px solid $super-light-gray;
}
.navbar-fixed-top {
position: relative;
}
.navbar-nav, .navbar-nav > li {
display: inline-block;
}
.navbar-nav {
margin: 5 10px;
}
.navbar-nav > .open > a {
background-color: $white !important;
}
.navbar-nav > li > a {
padding: 7px 24px;
}
/** Navbar animation **/
nav.navbar {
transition: 0.3s transform;
&.is-inView {
transform: translateY(0);
}
&.is-hidden {
transform: translateY(-100%);
}
}
.navbar-admin {
ul.nav.navbar-nav > li > a {
color: #fff;
border: none;
}
}
nav.navbar {
margin-bottom: 0;
border-radius: 0;
border-color: $super-light-gray;
&.navbar-default {
background-color: $greenlight;
}
.navbar-brand {
height: 40px;
}
.regular-nav {
color: $white;
}
.filter-links {
margin-left: 9px;
li > a {
text-decoration: none;
font-family: 'CaviarBI';
font-size: 18px;
color: $white;
font-weight: 400;
&.active {
font-size: 25px;
}
}
}
.folding-nav {
position: absolute;
top: 3px;
right: 0;
}
.navbar-right {
margin: 0;
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-end;
align-content: stretch;
align-items: flex-start;
}
.navbar-right > li {
order: 0;
flex: 0 1 auto !important;
align-self: auto !important;
}
.new-post-button {
display: none;
}
.new-post-button a {
transition: all .1s;
color: $light-gray;
font-family: 'Caviar';
font-weight: 600;
background-color: $white;
}
.new-post-button:hover {
a {
color: $greenlight;
border-color: $border-hover-color;
background-color: $white;
}
}
.new-post-button,
.sign-in-button {
margin-top: 5px;
margin-right: 10px;
.button {
padding: 0.6em 1em 0.7em 1em;
}
}
.account {
padding-top: 5px;
}
a.avatar-wrapper {
padding: 0;
display: inline;
float:none;
margin: 3px 15px 0 10px;
}
a.avatar-wrapper img.avatar-image {
border: 1.5px solid $border-color;
transition: all .1s;
}
a.avatar-wrapper:hover img.avatar-image, .open a.avatar-wrapper img.avatar-image {
border: 1.5px solid $border-hover-color;
}
.nav-dropdown {
background: #fff;
#include border-radius($popover);
box-shadow: 0 1px 2px rgba(0,0,0,.25),0 0 1px rgba(0,0,0,.35);
border: none;
top: 134%;
right: 20px;
a {
color: $light-font-color;
&:hover {
background-color: $white;
color: rgba(0,0,0,0.8);
}
}
.nd-main {
font-size: 16px;
font-weight: 100px;
line-height: 1.4;
}
.nd-sub {
font-size: 14px;
font-weight: 100;
line-height: 1.4;
}
.dropdown-arrow-top {
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
z-index: 20;
border-bottom: 10px solid #fff;
position: absolute;
right: 10px;
top: -10px;
}
.dropdown-arrow-bottom {
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
z-index: 10;
border-bottom: 11px solid rgba(0, 0, 0, 0.11);
position: absolute;
right: 8px;
top: -11px;
}
}
#logo {
width: 128px;
margin-left: 15px;
img {
top: 5px;
height: 31px;
}
span {
right: 0;
text-transform: uppercase;
font-weight: bold;
}
}
}
/* Small devices (tablets, 768px and up) */
#media (min-width: $screen-sm-min) {
body {
padding-top: 67px;
}
.navbar-header {
border-bottom: none;
}
.navbar-fixed-top {
position: fixed;
}
nav.navbar {
padding: 5px 0;
.filter-links {
margin-top: 16px;
margin-left: 0;
}
#logo {
width: 138px;
margin-left: 0;
}
.new-post-button {
display: inline-flex;
}
}
}
/* Medium devices (desktops, 992px and up) */
#media (min-width: $screen-md-min) {
nav.navbar {
#logo {
width: 150px;
}
}
}
/* Large devices (large desktops, 1200px and up) */
#media (min-width: $screen-lg-min) {
}
#media (max-width: 767px){
.navbar-nav
.open .dropdown-menu {
background-color: $white;
box-shadow: 0 1px 2px rgba(0,0,0,.25),0 0 1px rgba(0,0,0,.35);
clear:both;
}
}
The dropdown-menu is for notifications, done with react. Here's what react renders :
render () {
return (
<div className="notification-container">
<a className={`dropdown-toggle ${this.state.newNotificationCount > 0 ? 'active' : ''}`}
onClick={() => this.handleMarkAsTouched()}
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{this.renderNotificationIcon()}
</a>
<div
className="dropdown-menu"
ref={(ref) => {this.dropdownRef = ref}}
>
<span className="dropdown-arrow-top"></span>
<span className="dropdown-arrow-bottom"></span>
<div className="notification-header">
<span>Notifications</span>
<a className="pull-right mark-all-as-read"
onClick={(e) => this.handleMarkAllAsRead(e)}>
Mark All as Read
</a>
</div>
<ul
onScroll={() => this.handleScroll()}
ref={(ref) => {this.notificationsListRef = ref}}
className="notifications-list">
{this.renderNotificationItems()}
{this.loadMoreButton()}
</ul>
</div>
</div>
);
}
lastly the notifications.scss :
#notifications {
a.dropdown-toggle.active {
background-color: rgba($accent-color, 0.8);
}
a.dropdown-toggle {
display: inline-block;
width: 40px;
height: 40px;
padding: 0;
margin-top: 5px;
position: relative;
background-color: white;
border: 1.5px solid $border-color;
transition: all .1s;
#include border-radius($round);
i.fa-bell-o,
span#new-notifications-count {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 1.3em;
}
#bell {
color: $light-font-color;
}
span#new-notifications-count {
color: $white;
}
}
a.dropdown-toggle:hover {
border: 1.5px solid $border-hover-color;
#bell{
color: $greenlight;
}
}
}
.notification-container {
.dropdown-menu {
width: 360px;
margin-top: 9px;
}
.notification-header {
padding: 4px 20px;
border-bottom: 1px solid $light-border-color;
color: $font-black;
}
.mark-all-as-read {
cursor: pointer;
color: $light-font-color;
&:hover,
&:active {
color: $accent-color;
}
}
.notifications-list {
overflow: hidden;
overflow-y: scroll;
max-height: 440px;
list-style: none;
padding: 0;
}
.load-more {
text-align: center;
}
.dropdown-arrow-top {
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
z-index: 20;
border-bottom: 10px solid #fff;
position: absolute;
right: 10px;
top: -10px;
}
.dropdown-arrow-bottom {
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
z-index: 10;
border-bottom: 11px solid rgba(0, 0, 0, 0.11);
position: absolute;
right: 8px;
top: -11px;
}
}
.notifications-list {
.avatar-image {
margin-right: 18px;
vertical-align: baseline;
}
li {
padding: 8px 0;
border-bottom: 1px solid $light-border-color;
&.unread-notification {
border-left: 2px solid $accent-color;
}
}
li > a {
color: $light-font-color;
display: block;
padding: 3px 0 3px 20px;
clear: both;
white-space: nowrap;
font-weight: normal;
transition: color 200ms;
&:hover {
color: $font-black;
}
}
.notification-metadata {
display: inline-block;
}
.fa {
margin-right: 8px;
}
.fa-heart-o {
color: #e81c4f;
}
.fa-user {
color: lightblue;
}
.fa-commenting-o {
color: $light-font-color;
}
}
// Bell Animation for "No Notifications"
.no-notifications {
margin: 10px 11px 8px 10px;
padding: 10px;
text-align: center;
position: relative;
.speech-bubble {
border: $border-color 1px solid;
padding: 10px;
#include border-radius($radius);
width: 170px;
margin: 0 auto;
color: $light-font-color;
}
.speech-arrow-top {
width: 0;
height: 0;
border-left: 11px solid transparent;
border-right: 11px solid transparent;
z-index: 20;
border-top: 10px solid #fff;
position: absolute;
right: 46.7%;
top: 36.5%;
}
.speech-arrow-bottom {
width: 0;
height: 0;
border-left: 12px solid transparent;
border-right: 12px solid transparent;
z-index: 10;
border-top: 11px solid $border-color;
position: absolute;
right: 46.3%;
top: none;
}
.ringer {
margin: 0 auto;
width: 50px;
margin-top: 20px;
}
}
.bell-jar,.mouth,.eye{opacity:0.2;fill:$black;}
.blink, {
animation: blink 5s step-start 0s infinite;
}
#keyframes blink {
53% {
opacity: 0.2;
}
55% {
opacity: 0.0;
}
57% {
opacity: 0.2;
}
59% {
opacity: 0.0;
}
61% {
opacity: 0.2;
}
}
#media (max-width: 767px){
a.dropdown-toggle {
float:right;
}
}

Related

Isolating styles defined inside a DIV so they do not affect the rest of the webpage

I'm running an email ticket system. This does list various html-emails, each one inside its DIV. Thus, the DIV does contain html code with its own css styles. My problem is that these css styles do overwrite the appearance of the overall website. Is there a solution that the css styles in these emails / inside the DIV can be isolated in order to not affect the rest of the website?
<html>
<head>
<link rel="stylesheet" href="https://www.myserver.com/assets/css/custom.css">
.......
</head>
<body>
<div>
some content
</div>
<div class="container clientmail>
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<head>
<style type="text/css">
p{margin:10px 0;padding:0;}
… lots more of styles …
</style>
</head>
<body>
… the message …
</body>
</html>
</div>
</body>
</html>
.clear,
.clear_both {
clear: both
}
#ul_attachment_list,
.ul-attachments,
ul.editticket-ul {
list-style: none!important
}
body {
font-size: 12px!important
}
.h2,
h2 {
font-size: 20px!important
}
.h3,
h3 {
font-size: 12px!important
}
.nav>li>a {
font-size: 14px!important;
font-weight: 500!important
}
p {
margin: 0 0 2px!important
}
.container {
width: auto!important;
max-width: 98%!important;
margin-bottom: 20px;
margin-left: 20px!important;
margin-right: 20px!important
}
.header {
padding: 5px 15px!important
}
.clientmail {
/* max-width: 95%!important;*/
margin-right: 40px!important;
}
.clientmail .content {
/*all: initial; /* blocking inheritance for all properties */
/*all: unset; /* allowing inheritance within #mydiv */
}
.clientmail .content * {
/*all: initial; /* blocking inheritance for all properties */
}
/* To the Developer:
// ---------------------------------------------------------------------------------
// <div class="container clientmail "> .... <div class="content"> is used to display html emails which have their own stylesheet. This stylesheets do affect the aperance of the rest of the page.
// Is there a way to isolate this stylesheet in order that they do not afect anything outside the div?
// ---------------------------------------------------------------------------------
*/
.adminmail {
/* max-width: 95%!important;*/
margin-left: 40px!important
}
.adminmail .panel-heading {
background: #ddd!important
}
.sec1 {
background: #F8F8F8;
min-height: 50px
}
.sec1 .navbar.navbar-inverse {
background: #F8F8F8!important;
border: 0!important
}
.sec2 .navbar.navbar-inverse {
background: 0 0!important;
border: 0!important
}
.sec2 .container {
border: 1px solid #ddd;
padding-left: 10px;
padding-right: 10px;
box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
border-radius: 4px
}
.lstsec .panel-heading,
.sec3 .panel-heading {
color: #333;
background-color: #f5f5f5;
border-color: #ddd
}
.sec3 .container {
padding: 0!important
}
.sec4 {
margin: 5px 0
}
.panel-body,
.panel-heading {
padding: 2px 15px 1px!important
}
.clientmail .panel-body,
.adminmail .panel-body {
height:auto;
/* max-height:150px; */
overflow:scroll;
resize:vertical;
}
.header>.pull-right,
.panel-heading>h2>.pull-right {
margin-top: -3px!important
}
.well {
margin-bottom: 10px!important
}
.attachmentslist>ul {
margin-left: -15px
}
.lstsec .table {
margin-top: 20px
}
.formsec {
background-color: #F5F5F5;
padding: 9px;
border-radius: 3px;
border: 1px solid #e3e3e3;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
margin-top: 0!important;
margin-bottom: 2px!important
}
.form-group {
margin-bottom: 8px!important
}
.adminmail>form>.form-group {
margin-top: 10px!important
}
.form-control {
padding: 2px 2px 2px 5px!important
}
input.form-control,
select.form-control {
height: auto!important
}
input[type="file"] {
display: inline!important;
overflow:hidden;
margin-left: 20px;
}
textarea.form-control {
min-height: 100px!important
}
textarea.single_line {
display: block;
width: 100%;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
font-size: 14px;
padding: 2px 2px 2px 5px
}
.form_field_label {
display: inline-block;
min-width: 120px;
font-weight: 600
}
.display_none,
i.icon-mergetickets,
i.syncemail-icon {
display: none
}
.navbar {
margin-top: 12px!important;
margin-bottom: 10px!important
}
.btn {
padding: 3px 10px!important
}
.btn-primary {
min-width: 140px;
}
table.dataTable thead td,
table.dataTable thead th {
padding: 2px 4px!important
}
table.dataTable tbody td,
table.dataTable tbody th {
padding: 4px 2px 2px 16px!important
}
table.dataTable td:first-child{
padding: 2px 2px 2px 2px!important;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_desc_disabled {
padding-left: 16px!important;
background-position: center left!important
}
.dataTables_filter {
padding-top: 6px!important;
padding-bottom: 6px!important
}
.dataTables_length {
padding-top: 10px!important;
padding-bottom: 10px!important
}
#dataTable tr {
cursor: pointer
}
.fixed_date_time_width{
width:98px !important;
}
.list-group-item {
padding: 6px 12px !important;
}
.modal-body .list-group-item {
max-height:46px;
overflow:hidden;
}
.hading>h2 {
margin-top: 10px!important;
margin-bottom: 2px!important
}
.h1,
.h2,
.h3,
h2,
h3 {
margin-top: 5px!important;
margin-bottom: 5px!important
}
label {
margin-bottom: 1px!important
}
.deleted {
text-decoration: line-through
}
.deleteitsmall {
margin-left: 20px;
padding: 0 6px!important;
font-size: 12px!important;
background-color: #F66!important
}
table.archived-list tbody tr:hover,
table.templates-table tbody tr:hover,
table.ticket-list tbody tr:hover,
ul.single-list-group>li:hover {
background-color: #eee!important
}
.col-md-1,
.col-md-10,
.col-md-11,
.col-md-12,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9 {
padding-right: 0!important;
padding-left: 0!important
}
.col-50p {
width: 50%;
float: left;
position: relative
}
h5.archived-list-h5,
h5.ticket-list-h5 {
position: absolute;
right: 360px;
z-index: 9999;
float: right;
margin-top: -25px;
}
#mergeTicket{
margin-right: 40px!important;
}
.col-50p:first-child {
padding-left: 0;
padding-right: 15px
}
.col-50p:last-child {
padding-left: 15px;
padding-right: 0
}
.description_text {
width: 100%!important
}
.price {
max-width: 80px;
text-align: right;
margin-left: 8px
}
.percent {
display: inline !important;
max-width: 40px;
text-align: right;
margin-left: 8px
}
table.archived-list tr td.archived-list-td1,
table.ticket-list tr td.ticketlist-td1 {
text-align: left;
padding-left: 4px!important
}
.grandtotal {
font-size: 14px;
font-weight: 700;
padding-right: 5px
}
.subtotal {
font-size: 14px;
color: #555;
padding-right: 5px
}
button.deleteitsmallbtn {
color: #fff
}
h2.archived-list-h2 {
float: left
}
.clear {
padding: 0!important;
margin: 0!important;
line-height: 0
}
.single-modal-content1,
.single-modal-content2 {
height: 100%;
background-color: #eee!important
}
.single-p-section {
margin-top: 15px;
margin-bottom: 15px
}
.single-modal-dialog {
height: 95%
}
iframe#upload_target {
width: 100%;
height: 100%
}
#attach_file {
height: 80%
}
#media (min-width:668px) {
.col-md-1,
.col-md-10,
.col-md-11,
.col-md-2,
.col-md-3,
.col-md-4,
.col-md-5,
.col-md-6,
.col-md-7,
.col-md-8,
.col-md-9 {
padding-left: 15px!important;
padding-right: 15px!important
}
.col-md-10:first-child,
.col-md-11:first-child,
.col-md-1:first-child,
.col-md-2:first-child,
.col-md-3:first-child,
.col-md-4:first-child,
.col-md-5:first-child,
.col-md-6:first-child,
.col-md-7:first-child,
.col-md-8:first-child,
.col-md-9:first-child {
padding-left: 0!important;
padding-right: 15px!important
}
.col-md-10:last-child,
.col-md-11:last-child,
.col-md-1:last-child,
.col-md-2:last-child,
.col-md-3:last-child,
.col-md-4:last-child,
.col-md-5:last-child,
.col-md-6:last-child,
.col-md-7:last-child,
.col-md-8:last-child,
.col-md-9:last-child {
padding-left: 15px!important;
padding-right: 0!important
}
.col-md-6 {
width: 50%!important;
float: left!important
}
}
#media (max-width:667px) {
h5.archived-list-h5,
h5.ticket-list-h5 {
right: 50px;
}
}
#media only screen and (min--moz-device-pixel-ratio:2),
only screen and (-o-min-device-pixel-ratio:2/1),
only screen and (-webkit-min-device-pixel-ratio:2),
only screen and (min-device-pixel-ratio:2) {
body {
font-size: 200%
}
}
.alert-error {
color: #a84c3d;
background-color: rgba(255, 212, 212, .69);
border-color: #e9cdc6
}
label.editAgent {
font-weight: 400!important
}
.editAgent span {
float: right;
margin-top: 3px;
margin-left: 5px
}
.desc_css {
width: initial;
float: left
}
.display_unset {
display: unset
}
.note-editable {
height: 50px!important
}
.list-group>li:hover,
.modal-content:hover {
background-color: #eee!important
}
#myModal2 .modal_dialog {
width: 850px;
height: 100%
}
#myModal2 .modal_content {
width: 900px;
height: 100%
}
#myModal2 .upload_target_file {
width: 100%;
height: 100%
}
#myModal2 .modal_body {
height: 80%
}
.loading {
display:none;
position: fixed;
top: 0; right: 0;
bottom: 0; left: 0;
background: rgba(38, 17, 17, 0.16);
}
.loader {
display:none;
left: 50%;
margin-left: -4em;
font-size: 10px;
border: .8em solid rgb(102, 116, 170);
border-left: .8em solid rgba(58, 166, 165, 1);
animation: spin 1.1s infinite linear;
}
.loader, .loader:after {
border-radius: 50%;
width: 8em;
height: 8em;
display: block;
position: absolute;
top: 50%;
margin-top: -4.05em;
}
.body_blocked
{
z-index: 2;
opacity: 0.6;
pointer-events: none;
}
#keyframes spin {
0% {
transform: rotate(360deg);
}
100% {
transform: rotate(0deg);
}
}
.description_css
{
white-space: pre-line;
}
.attachment_file_input
{
color:white;
width:90px;
}
.temp_attach
{
display:inline-flex;
}
.comments
{
padding: 10px;
}
You are using the HTML style tag. What you want is either to assign a class to your div and put the css for that class in a .css file, or use the HTML style attribute on the div.
https://www.w3schools.com/TAGs/tag_style.asp
https://www.w3schools.com/TAGS/att_style.asp
<div style="margin:10px 0;padding:0;">

angular: Jumping scrollbar in scroll panel of editText

My app has collapsible panel. It contains scroll panel with EditText (is generated by *ngFor). I was trying selve this by adding:
html {
overflow-y: scroll; /*not working*/
}
and another sollutions which i found in this article, but it is not working.
Im also using AutosizeModule to resize EditText (ngx-autosize).
This problem looks like that:
Component:
#Component({/* typical content */})
export class AnswerDialogComponent implements OnInit {
constructor() {
}
answerText: string[] = [/*string values */'];
ngOnInit() {
}
trackByIndex(index: number): any {
return index;
}
}
MyHtml:
<div id="answerDialog">
<h3>Answers:</h3>
<hr>
<nav>
<ul>
<li *ngFor="let i of answerText; let index =index; trackBy: trackByIndex;">
<textarea autosize name="Text" class="input" [(ngModel)]="answerText[index]" ></textarea>
</li>
</ul>
</nav>
</div>
my CSS:
#answerDialog {
display: block;
margin-top: -50px;
width: 300px;
border: 1px solid #8BC3A3;
border-radius: 10px 0 0 10px;
background: #fefefe;
max-height: 595px;
height: auto;
position: fixed;
right: 510px;
z-index: 1;
padding-bottom: 10px;
border-right: 0;
}
hr {
margin-top: 5px;
}
h3 {
font-size: 20px;
text-align: center;
margin-bottom: 15px;
font-family: Helvetica, Arial, sans-serif;
}
.input {
border-radius: 5px;
background: #f8f8f8;
border: 1px solid rgba(0, 0, 0, 0.075);
color: #727272;
width: 90%;
height: auto;
vertical-align: middle;
resize: none;
outline: none;
margin-bottom: 5px;
margin-top: 5px;
}
.input:hover {
border: 1px solid #8BC3A3;
}
.input:focus {
outline: none;
border: 1px solid #8BC3A3;
}
nav ul {
overflow-y: auto;
max-height: 505px;
height: auto;
}
html {
overflow-y: scroll; /*not working*/
}
::-webkit-scrollbar {
width: 10px;
}
::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 8px;
}
::-webkit-scrollbar-thumb {
background: #8BC3A3;
border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
background: #555;
}

ul below the input element is not occupying the same width of the input element

I have a input text and below this input text I want to have a div with a green color that has some text. But I want that this green area to occupy the same with of the input element, but it is not working. Do you know what is not correct?
.main-search {
width: 100%;
position: relative;
background-color: yellow;
}
.search {
margin: 20px auto;
width: 100%;
font-size: 0.85em;
float: left;
background-color: white;
padding: 50px;
border-radius: 4px;
}
.search_auto_complete {
background-color: green;
text-align: left;
color: gray;
font-size: 1.1em;
border: 1px solid black;
z-index: 10;
position: fixed;
width: inherit;
padding: 0 !important;
}
.search_auto_complete li {
padding: 10px;
background-color: $color-white;
border-bottom: 1px solid $color-gray;
}
.auto_complete_category {
background-color: $color-light-plus !important;
color: $color-gray-plus-plus;
font-weight: bold;
}
.auto_complete_category:hover {
background-color: $color-light-plus !important;
cursor: auto !important;
color: $color-gray-plus-plus !important;
}
.events_auto_complete li:hover {
background-color: $color-primary;
cursor: pointer;
color: $color-white;
}
.search_events_box button {
border-left: none;
color: #fff;
font-weight: 700;
padding: 17px;
}
.input_search_event {
position: relative;
border: 1px solid red;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
outline: 0;
}
input {
padding-left: 40px !important;
}
input {
padding: 15px;
width: 100%;
}
.content {
float: left;
width: 100%;
}
.div {
width: 60%;
margin: 0 auto;
padding: 20px 0;
}
<section class="content main-search">
<div class="div">
<h1>Title</h1>
<div class="search">
<div class="input_search">
<input id="auto" value="category" type="text">
<ul class="search_auto_complete">
<li class="auto_complete_category">Categories</li>
<li>Category 1</li>
</ul>
</div>
</div>
</div>
</section>
Example: https://jsfiddle.net/k9uL4zon/
Add position: relative to your container .input_search and replace position: fixed with position: absolute and width: inherit with width: 100% for your element .search_auto_complete. Demo:
.input_search {
position: relative; /* new */
}
.main-search {
width: 100%;
position: relative;
background-color: yellow;
}
.search {
margin: 20px auto;
width: 100%;
font-size: 0.85em;
float: left;
background-color: white;
padding: 50px;
border-radius: 4px;
}
.search_auto_complete {
background-color: green;
text-align: left;
color: gray;
font-size: 1.1em;
border: 1px solid black;
z-index: 10;
position: absolute;
width: 100%;
padding: 0 !important;
}
.search_auto_complete li {
padding: 10px;
background-color: $color-white;
border-bottom: 1px solid $color-gray;
}
.auto_complete_category {
background-color: $color-light-plus !important;
color: $color-gray-plus-plus;
font-weight: bold;
}
.auto_complete_category:hover {
background-color: $color-light-plus !important;
cursor: auto !important;
color: $color-gray-plus-plus !important;
}
.events_auto_complete li:hover {
background-color: $color-primary;
cursor: pointer;
color: $color-white;
}
.search_events_box button {
border-left: none;
color: #fff;
font-weight: 700;
padding: 17px;
}
.input_search_event {
position: relative;
border: 1px solid red;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
outline: 0;
}
input {
padding-left: 40px !important;
}
input {
padding: 15px;
width: 100%;
}
.content {
float: left;
width: 100%;
}
.div {
width: 60%;
margin: 0 auto;
padding: 20px 0;
}
<section class="content main-search">
<div class="div">
<h1>Title</h1>
<div class="search">
<div class="input_search">
<input id="auto" value="category" type="text">
<ul class="search_auto_complete">
<li class="auto_complete_category">Categories</li>
<li>Category 1</li>
</ul>
</div>
</div>
</div>
</section>

Sub menu inside responsive menu

Hey I'm having some issues with my mega menu. Im trying to mimic Newegg's style. I want a small sub menu to show up on hover. Here is my codepen: https://codepen.io/iamgonge/pen/vxEEeN
I'm trying to make the sub menu line up with the caret in each menu link. right now it stays in the same spot,When I change it from Absolute it pushes everything down on hover.
/* Body */
body {
margin: 0px;
padding: 0px;
font-family: Helvetica;
background-color: #fff;
}
header {
min-height: 450px;
}
header.dd-blue {
background-color: #fff;
}
/* Nav */
nav {
position: relative;
}
header.dd-blue nav {
background-color: #4F96BA;
}
ul.main-nav {
list-style-type: none;
padding: 0px;
font-size: 0px;
max-width: 1000px;
margin: 0 auto;
}
ul.main-nav h2 {
font-size: .9em;
font-weight: 300;
}
ul.main-nav>li {
display: inline-block;
padding: 0;
}
ul.main-nav>li>a {
display: block;
padding: 20px 30px;
position: relative;
color: #fff;
font-size: 15px;
font-weight: 400;
box-sizing: border-box;
}
ul.main-nav>li:hover {
background-color: #f9f9f9;
}
ul.main-nav>li:hover>a {
color: #333;
font-weight: 400;
}
ul.main-nav>li ul.sub-menu-lists {
margin: 0px;
padding: 1px;
list-style-type: none;
display: block;
}
ul.main-nav>li ul.sub-menu-lists>li {
padding: 0 0px;
margin-top: 2px;
}
ul.main-nav>li ul.sub-menu-lists>li>a {
font-size: .84em;
font-weight: 500;
}
.sub-menu-head {
margin: 10px 0;
border-bottom: 1px solid #4F96BA;
width: 100%;
}
#media only screen and (min-width: 769px) {
/* Desktop */
ul.main-nav {
display: block;
position: relative;
}
.sub-menu-block {
padding: 15px;
}
/* Sub-menu */
ul.main-nav>li>div.sub-menu-block {
visibility: hidden;
background-color: #f9f9f9;
position: absolute;
margin-top: 0px;
width: 100%;
color: #333;
left: 0;
box-sizing: border-box;
z-index: 3;
font-size: 16px;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
opacity: 0;
/*CSS animation applied for sub menu : Slide from Top */
-webkit-transition: all 0.4s ease 0s;
-o-transition: all 0.4s ease 0s;
transition: all 0.4s ease 0s;
-webkit-transform: rotateX(90deg);
-moz-transform: rotateX(90deg);
-ms-transform: rotateX(90deg);
transform: rotateX(90deg);
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
}
ul.main-nav>li:hover>div.sub-menu-block {
background-color: #fff;
visibility: visible;
opacity: 1;
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
}
ul.main-nav>li>div.sub-menu-block>* {
-webkit-transition-property: opacity;
-moz-transition-property: opacity;
-o-transition-property: opacity;
transition-property: opacity;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
transition-duration: 0.4s;
opacity: 0;
}
ul.main-nav>li:hover>div.sub-menu-block>* {
opacity: 1;
}
.sub-menu-head {
font-size: 20px;
}
header.dd-blue ul.main-nav>li>a {
border-right: 1px solid #666;
}
/* List Separator: Inner Border */
ul.main-nav>li>a:after {
content: '';
width: 1px;
height: 62px;
position: absolute;
right: 0px;
top: 0px;
z-index: 2;
}
header.dd-blue ul.main-nav>li>a:after {
background-color: #999;
}
/* Drop Down/Up Arrow for Mega Menu */
ul.main-nav>li>a.mega-menu>span {
display: block;
vertical-align: middle;
}
ul.main-nav>li>a.mega-menu>span:after {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #fff;
content: '';
background-color: transparent;
display: inline-block;
margin-left: 10px;
vertical-align: middle;
}
ul.main-nav>li:hover>a.mega-menu span:after {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 0px solid transparent;
border-bottom: 5px solid #666;
}
}
.sub-menu-lists li {
line-height: 1;
}
/* 5 Columns */
.col-xs-15, .col-sm-15, .col-md-15, .col-lg-15 {
position: relative;
min-height: 1px;
padding-right: 10px;
padding-left: 10px;
}
.col-xs-15 {
width: 20%;
float: left;
}
#media (min-width: 768px) {
.col-sm-15 {
width: 20%;
float: left;
}
}
#media (min-width: 992px) {
.col-md-15 {
width: 20%;
float: left;
}
}
#media (min-width: 1200px) {
.col-lg-15 {
width: 20%;
float: left;
}
}
/* end 5 columns */
#rds-font {
font-size: 15px;
}
a, a:active, a:visited, a:link {
color: #599ab9;
text-decoration: none;
}
a:hover {
color: black;
}
#left-border {
border-left: 1px solid #666;
}
/* Hover dropdown */
.dropdown ul.dropdown-menu {
margin-top: 0;
}
.hover_drop_down:hover ul.dropdown-menu {
margin-top: 2px;
}
.hover_drop_down:hover ul.dropdown-menu {
display: inline-block;
position: absolute;
top: 25px;
left: 90%;
z-index: 1;
}
.dropdown-menu>li>a {
display: block;
margin: 10px: padding-bottom: 10px;
font-size: 13px;
font-weight: 500;
line-height: 1;
color: #599ab9;
}
<header class="dd-blue">
<nav role="navigation">
<ul class="main-nav">
<li class="top-level-link">
<a class="mega-menu" id="left-border"><span>Main 1</span></a>
<div class="sub-menu-block">
<div class="row">
<div class="col-xs-15">
<h2 class="sub-menu-head">Header 1</h2>
<ul class="sub-menu-lists">
<li class="hover_drop_down">
Item with sub-menu<span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>Item X</li>
</ul>
</li>
<li class="hover_drop_down">
Item with sub-menu<span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>Item X</li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!--end of sub-menu-block -->
</li>
</ul>
</nav>
</header>
Set position: absolute; display: inline-block; and remove any left and top values so that the element will display where it is in the DOM.
/* Body */
body {
margin: 0px;
padding: 0px;
font-family: Helvetica;
background-color: #fff;
}
header {
min-height: 450px;
}
header.dd-blue {
background-color: #fff;
}
/* Nav */
nav {
position: relative;
}
header.dd-blue nav {
background-color: #4F96BA;
}
ul.main-nav {
list-style-type: none;
padding: 0px;
font-size: 0px;
max-width: 1000px;
margin: 0 auto;
}
ul.main-nav h2 {
font-size: .9em;
font-weight: 300;
}
ul.main-nav>li {
display: inline-block;
padding: 0;
}
ul.main-nav>li>a {
display: block;
padding: 20px 30px;
position: relative;
color: #fff;
font-size: 15px;
font-weight: 400;
box-sizing: border-box;
}
ul.main-nav>li:hover {
background-color: #f9f9f9;
}
ul.main-nav>li:hover>a {
color: #333;
font-weight: 400;
}
ul.main-nav>li ul.sub-menu-lists {
margin: 0px;
padding: 1px;
list-style-type: none;
display: block;
}
ul.main-nav>li ul.sub-menu-lists>li {
padding: 0 0px;
margin-top: 2px;
}
ul.main-nav>li ul.sub-menu-lists>li>a {
font-size: .84em;
font-weight: 500;
}
.sub-menu-head {
margin: 10px 0;
border-bottom: 1px solid #4F96BA;
width: 100%;
}
#media only screen and (min-width: 769px) {
/* Desktop */
ul.main-nav {
display: block;
position: relative;
}
.sub-menu-block {
padding: 15px;
}
/* Sub-menu */
ul.main-nav>li>div.sub-menu-block {
visibility: hidden;
background-color: #f9f9f9;
position: absolute;
margin-top: 0px;
width: 100%;
color: #333;
left: 0;
box-sizing: border-box;
z-index: 3;
font-size: 16px;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
border-bottom: 1px solid #ccc;
opacity: 0;
/*CSS animation applied for sub menu : Slide from Top */
-webkit-transition: all 0.4s ease 0s;
-o-transition: all 0.4s ease 0s;
transition: all 0.4s ease 0s;
-webkit-transform: rotateX(90deg);
-moz-transform: rotateX(90deg);
-ms-transform: rotateX(90deg);
transform: rotateX(90deg);
-webkit-transform-origin: top center;
-ms-transform-origin: top center;
transform-origin: top center;
}
ul.main-nav>li:hover>div.sub-menu-block {
background-color: #fff;
visibility: visible;
opacity: 1;
-webkit-transform: rotateX(0deg);
-moz-transform: rotateX(0deg);
-ms-transform: rotateX(0deg);
transform: rotateX(0deg);
}
ul.main-nav>li>div.sub-menu-block>* {
-webkit-transition-property: opacity;
-moz-transition-property: opacity;
-o-transition-property: opacity;
transition-property: opacity;
-webkit-transition-duration: 0.4s;
-moz-transition-duration: 0.4s;
-o-transition-duration: 0.4s;
transition-duration: 0.4s;
opacity: 0;
}
ul.main-nav>li:hover>div.sub-menu-block>* {
opacity: 1;
}
.sub-menu-head {
font-size: 20px;
}
header.dd-blue ul.main-nav>li>a {
border-right: 1px solid #666;
}
/* List Separator: Inner Border */
ul.main-nav>li>a:after {
content: '';
width: 1px;
height: 62px;
position: absolute;
right: 0px;
top: 0px;
z-index: 2;
}
header.dd-blue ul.main-nav>li>a:after {
background-color: #999;
}
/* Drop Down/Up Arrow for Mega Menu */
ul.main-nav>li>a.mega-menu>span {
display: block;
vertical-align: middle;
}
ul.main-nav>li>a.mega-menu>span:after {
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 5px solid #fff;
content: '';
background-color: transparent;
display: inline-block;
margin-left: 10px;
vertical-align: middle;
}
ul.main-nav>li:hover>a.mega-menu span:after {
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-top: 0px solid transparent;
border-bottom: 5px solid #666;
}
}
.sub-menu-lists li {
line-height: 1;
}
/* 5 Columns */
.col-xs-15, .col-sm-15, .col-md-15, .col-lg-15 {
position: relative;
min-height: 1px;
padding-right: 10px;
padding-left: 10px;
}
.col-xs-15 {
width: 20%;
float: left;
}
#media (min-width: 768px) {
.col-sm-15 {
width: 20%;
float: left;
}
}
#media (min-width: 992px) {
.col-md-15 {
width: 20%;
float: left;
}
}
#media (min-width: 1200px) {
.col-lg-15 {
width: 20%;
float: left;
}
}
/* end 5 columns */
#rds-font {
font-size: 15px;
}
a, a:active, a:visited, a:link {
color: #599ab9;
text-decoration: none;
}
a:hover {
color: black;
}
#left-border {
border-left: 1px solid #666;
}
/* Hover dropdown */
.dropdown ul.dropdown-menu {
margin-top: 0;
}
.hover_drop_down:hover ul.dropdown-menu {
position: absolute;
display: inline-block;
z-index: 1;
left: auto;
top: auto;
}
.caret-right {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-left: 5px solid;
border-left-color:#1c2b36;
border-bottom: 5px solid transparent;
border-top: 5px solid transparent;
}
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<header class="dd-blue">
<nav role="navigation">
<ul class="main-nav">
<li class="top-level-link">
<a class="mega-menu" id="left-border"><span>Main 1</span></a>
<div class="sub-menu-block">
<div class="row">
<div class="col-xs-15">
<h2 class="sub-menu-head">Header 1</h2>
<ul class="sub-menu-lists">
<li class="hover_drop_down">
Item with sub-menu<span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>Item X</li>
</ul>
</li>
<li class="hover_drop_down">
Item with sub-menu<span class="caret"></span>
<ul class="dropdown-menu" role="menu">
<li>Item X</li>
</ul>
</li>
</ul>
</div>
</div>
</div> <!--end of sub-menu-block -->
</li>
</ul>
</nav>
</header>

Div is not full width without putting the main div over the next?

I am working on a project where I am making two divs that are full width the main one comes first and the second div comes after the main div.
Main Div CSS:
*{
margin:0px;
padding:0px;
}
div.main{
top: -100px;
/*background: url(img/bg.jpg) no-repeat center center fixed #000000;*/
/*background: url(http://www.deliciousfood4u.com/wp-content/uploads/2012/05/food_steak_desktop_1302x1020_wallpaper-420339.jpg) no-repeat center center fixed #324a6f;*/
background-size: cover;
background-repeat: no-repeat;
margin-left: -1px;
position: absolute;
}
html, body, .main, #wrappertwo { height: 100%; min-height: 100%; }
.main { margin: 0 auto; oveflow: hidden; width: 100%; background-color: gray;}
I would like my end website to work similar to this website here: http://www.whitmansnyc.com/
You can see all the code here: http://jsfiddle.net/QFRB8/
Here you go, I'm sure you will have much better use than me. Just edit the box in there and delete it to have a full width with main and second div.
http://jsfiddle.net/tS9fX/
html:
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Blah</title>
<link type="text/css" rel="stylesheet" media="all" href=
"style.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css.css" />
<link type="text/css" rel="stylesheet" media="screen" href="css_002.css" />
</head>
<body class="user_suscriptions index">
<div id="wrapper">
<h1 class="logo">Title</h1>
<h2>another title</h2>
<div class="field form_suscription">
<form novalidate="novalidate" method="post" id="new_user_suscription" data-remote=
"true" class="simple_form new_user_suscription" action="/user_suscriptions"
accept-charset="UTF-8" name="new_user_suscription">
<div style="margin:0;padding:0;display:inline">
<input type="hidden" value="✓" name="utf8" /> <input type="hidden"
value="1Oz4NpXl188INQoGZkqy4LaItW/6sxtsNNruWFBJQEM=" name=
"authenticity_token" />
</div>
<div class="error_message"></div>
<div class="input email required user_suscription_email">
<input type="email" size="50" placeholder="Your email address ;)" name=
"user_suscription[email]" id="user_suscription_email" class=
"string email required left" autofocus="autofocus" />
</div><input type="submit" value="Subscribe!" name="commit" class=
"btn green-btn" />
</form>
<div class="clear"></div><small>blahb</small>
</div>
<div class="clear"></div>
<div class="content">
<div class="left">
<h2 class="logo">test subject</h2>
</div>
<div class="right">
<h2>Blah title.</h2>
<p>Blah</p>
</div>
<div class="clear"></div>
</div>
<div class="content">
<div class="block">
<h3>blag</h3>
<p>blag</p>
</div>
<div class="block">
<h3>blag</h3>
<p>blag</p>
</div>
<div class="block">
<h3>blag</h3>
<p>blag</p>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
</body>
</html>
CSS:
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section,
summary {
display: block;
}
audio,
canvas,
video {
display: inline-block;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden] {
display: none;
}
html {
font-family: sans-serif; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
-ms-text-size-adjust: 100%; /* 2 */
}
body {
margin: 0;
}
a:focus {
outline: thin dotted;
}
a:active,
a:hover {
outline: 0;
}
h1 {
font-size: 2em;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
mark {
background: #ff0;
color: #000;
}
code,
kbd,
pre,
samp {
font-family: monospace, serif;
font-size: 1em;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
q {
quotes: "\201C" "\201D" "\2018" "\2019";
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 0;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0; /* 1 */
padding: 0; /* 2 */
}
button,
input,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 2 */
margin: 0; /* 3 */
}
button,
input {
line-height: normal;
}
button,
html input[type="button"], /* 1 */
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; /* 2 */
cursor: pointer; /* 3 */
}
button[disabled],
input[disabled] {
cursor: default;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
input[type="search"] {
-webkit-appearance: textfield; /* 1 */
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box; /* 2 */
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
textarea {
overflow: auto; /* 1 */
vertical-align: top; /* 2 */
}
table {
border-collapse: collapse;
border-spacing: 0;
}
body {
font: 14px "Lato", sans-serif;
background: url(http://i.imgur.com/oRLPdXl.jpg) no-repeat center center fixed;
background-size: cover;
color: #FFF; }
#bgMax {
min-height: 100%;
min-width: 1400px;
width: 100%;
height: auto;
position: fixed;
top: 0;
left: 0; }
a {
text-decoration: none;
color: white; }
p {
font-size: 16px;
line-height: 30px; }
li {
list-style: none; }
.clear {
clear: both;
visibility: hidden; }
.bgFade {
background-color: white; }
input[type="text"], input[type="email"] {
border: none;
padding: 14px;
font-size: 16px;
border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-moz-border-radius: 3px; }
input[type="text"]:focus, input[type="email"]:focus {
border-color: red;
outline: none; }
.green-btn {
background: url("http://printgram.noflagra.com/wp-content/themes/Printgram/css/images/comofunciona-bg.png") repeat scroll 0 0 transparent;
color: white;
padding: 16px;
font-weight: bold;
display: inline-block;
width: initial;
border: none;
border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-moz-border-radius: 3px;
transition: 0.2s all ease-out;
-webkit-transition: 0.2s all ease-out;
-moz-transition: 0.2s all ease-out;
-o-transition: 0.2s all ease-out; }
.green-btn:hover {
background: #34da97; }
.green-btn:active {
background: #08b16d; }
::-webkit-scrollbar {
width: 15px;
margin-left: 10px;
background: white;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.25); }
::-webkit-scrollbar-thumb {
border: solid 0 transparent;
border-right-width: 3px;
border-left-width: 4px;
-webkit-border-radius: 9px 6px;
-webkit-box-shadow: inset 0 0 0 1px #a1a1a1, inset 0 0 0 6px #a1a1a1; }
::-webkit-scrollbar-thumb:hover {
-webkit-box-shadow: inset 0 0 0 1px gray, inset 0 0 0 6px gray; }
::-webkit-scrollbar-track-piece {
background: transparent none;
border: solid 4px transparent;
border-right-width: 8px;
margin: 4px; }
#-webkit-keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(30px); }
100% {
opacity: 1;
-webkit-transform: translateY(0); } }
#-moz-keyframes fadeInUp {
0% {
opacity: 0;
-moz-transform: translateY(30px); }
100% {
opacity: 1;
-moz-transform: translateY(0); } }
#-o-keyframes fadeInUp {
0% {
opacity: 0;
-o-transform: translateY(30px); }
100% {
opacity: 1;
-o-transform: translateY(0); } }
#keyframes fadeInUp {
0% {
opacity: 0;
transform: translateY(30px); }
100% {
opacity: 1;
transform: translateY(0); } }
#-webkit-keyframes fadeIn {
0% {
opacity: 0; }
100% {
opacity: 1; } }
#-moz-keyframes fadeIn {
0% {
opacity: 0; }
100% {
opacity: 1; } }
#-o-keyframes fadeIn {
0% {
opacity: 0; }
100% {
opacity: 1; } }
#keyframes fadeIn {
0% {
opacity: 0; }
100% {
opacity: 1; } }
.logo {
font-family: "Pacifico", cursive;
color: white;
font-weight: normal;
margin: 0; }
.content {
width: 1000px;
margin: 0 auto;
padding: 100px 0px; }
.left {
float: left; }
.right {
float: right; }
header .content {
padding: 0; }
header .language {
float: right;
margin-top: 15px; }
header .language .social {
float: left;
margin-right: 10px; }
header .language .social .fb, header .language .social .tw {
float: left;
margin: 0 5px; }
header .language .select {
float: left;
background: white;
border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-moz-border-radius: 3px;
padding: 1px 9px; }
header .language .select a {
font-weight: bold;
font-size: 12px;
color: #999999; }
.info {
animation: fadeInUp 1s 1;
-moz-animation: fadeInUp 1s 1;
-webkit-animation: fadeInUp 1s 1;
-o-animation: fadeInUp 1s 1;
width: 910px;
margin: 0 auto;
padding: 120px 0px 190px 0px;
text-align: center; }
.info small {
color: white;
display: block;
font-size: 15px;
margin: 5px;
text-shadow: 0px 1px 1px #353535;
-webkit-text-shadow: 0px 1px 1px #353535;
-o-text-shadow: 0px 1px 1px #353535;
-moz-text-shadow: 0px 1px 1px #353535; }
.info .logo {
font-size: 70px; }
.info h2 {
color: white;
font-size: 30px;
font-weight: 300;
text-align: center;
margin: 40px 0px;
text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
-webkit-text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
-o-text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3);
-moz-text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.3); }
.info .field {
margin: 50px 0px 10px 0px;
animation: fadeInUp 1s 1;
-moz-animation: fadeInUp 1s 1;
-webkit-animation: fadeInUp 1s 1;
-o-animation: fadeInUp 1s 1;
width: 570px;
margin: 0 auto; }
.info .field input {
width: 400px;
margin: 10px 0px; }
.info .field .btn {
margin: 10px 0px; }
.info .field .green-btn {
width: initial; }
.info .social {
margin: 0px 0px 60px 0px; }
.about {
background: url("http://printgram.noflagra.com/wp-content/themes/Printgram/css/images/comofunciona-bg.png") repeat scroll 0 0 transparent; }
.about .logo {
color: white;
font-size: 50px; }
.about p {
font-weight: bold; }
.about h2 {
font-size: 22px; }
.about .left {
float: left;
width: 50%;
margin-top: 50px;
text-align: center; }
.about .right {
width: 50%;
float: right;
color: white;
font-weight: 300; }
.demo .content {
padding: 130px 0px 150px 0px;
text-align: center; }
.demo h2 {
font-size: 30px; }
.demo .social {
margin-top: 20px;
display: inline-block; }
.demo .social .fb, .demo .social .gp, .demo .social .tw {
float: left;
margin: 0 5px; }
.features {
background: url("http://printgram.noflagra.com/wp-content/themes/Printgram/css/images/porque-bg.png") repeat scroll 0 0 transparent;
overflow: hidden; }
.features .content {
padding: 100px 0px;
margin: 0 auto; }
.features .block {
float: left;
width: 30%;
margin: 15px;
text-align: center;
position: relative; }
.features .block h3 {
font-size: 22px; }
.features .block p {
padding: 0px 20px; }
.features .feature1, .features .feature2, .features .feature3, .features .feature4, .features .feature5, .features .feature6 {
width: 152px;
height: 153px;
margin: auto; }
.features .feature1 {
background: url("http://printgram.noflagra.com/wp-content/uploads/2012/08/2-tralha1.png") no-repeat scroll center center transparent;
}
.features .feature2 {
background: url("http://printgram.noflagra.com/wp-content/uploads/2012/08/1-instagram1.png") no-repeat scroll center center transparent;
}
.features .feature3 {
background: url("http://printgram.noflagra.com/wp-content/uploads/2012/08/3-foto1.png") no-repeat scroll center center transparent;
}
footer {
background: url("http://printgram.noflagra.com/wp-content/themes/Printgram/css/images/footer-bg.png") repeat scroll 0 0 transparent;
border-top: 10px solid #464646;
color: white;
height: 100%;
}
footer .content {
width: 600px;
padding: 40px 0px;
text-align: center; }
footer .content .logo {
font-size: 25px;
font-weight: 300; }
footer .content p, footer .content a {
font-weight: 700; }
footer .content ul {
text-align: center;
padding: 0px;
display: block;
margin-bottom: 50px; }
footer .content ul li {
display: inline-block; }
footer .content ul a {
border-radius: 3px;
-webkit-border-radius: 3px;
-o-border-radius: 3px;
-moz-border-radius: 3px;
background: #0cad6c;
padding: 3px 7px;
margin: 3px; }
#media only screen and (max-width: 480px) {
header .content {
padding: 0;
margin-top: 0;
margin-bottom: 0; }
#bgMax {
left: 50%;
margin-left: -200px; }
#wrapper {
width: inherit; }
.content, .info {
margin: 20% auto;
width: 85%;
overflow: hidden; }
.info {
margin: 12% auto;
padding-top: 50px;
padding-bottom: 50px; }
.info .logo {
font-size: 55px; }
.info h2 {
font-size: 20px; }
.info small {
font-size: 11px; }
.info .field {
width: 100%; }
.info .field input, .info .field .green-btn {
padding: 12px;
font-size: 12px;
margin-top: 0px;
margin-bottom: 5px; }
.info .field input {
width: 90%%; }
.about {
font-size: 12px;
text-align: center; }
.about .left, .about .right {
width: auto; }
.about .left {
float: inherit;
margin: 0; }
.about .left h2 {
font-size: 40px; }
.about .right h2 {
font-size: 18px; }
.about .right p {
font-size: 14px;
line-height: 28px; }
.demo .content {
padding: 50px 0px; }
.demo .social {
width: 100px; }
.features {
font-size: 12px; }
.features .content {
width: 80%;
padding: 50px 0px; }
.features .block {
width: auto;
float: inherit;
margin: 55px 0px; }
.features .block h3 {
font-size: 18px; }
.features .block p {
line-height: 28px;
font-size: 14px; }
footer .content {
margin: 20% auto;
width: 85%;
overflow: hidden;
margin: 5% auto; } }
#media only screen and (min-width: 481px) and (max-width: 1024px) {
header .content {
padding: 0;
margin-top: 0;
margin-bottom: 0; }
#wrapper {
width: inherit; }
.content, .info {
margin: 15% auto;
width: 70%;
overflow: hidden; }
.info {
margin: 8% auto;
padding-top: 50px;
padding-bottom: 50px; }
.info .field {
width: 420px; }
.info .field input {
width: 50%; }
.about {
text-align: center; }
.about .left, .about .right {
width: auto; }
.about .left {
float: inherit;
margin: 0; }
.demo .content {
padding: 50px 0px; }
.features .content {
width: 80%;
padding: 50px 0px; }
.features .block {
width: auto;
float: inherit;
margin: 55px 0px; }
footer .content {
margin: 15% auto;
width: 70%;
overflow: hidden;
margin: 5% auto; } }
.error {
color: white;
text-shadow: 0px 1px 1px #353535;
-webkit-text-shadow: 0px 1px 1px #353535;
-o-text-shadow: 0px 1px 1px #353535;
-moz-text-shadow: 0px 1px 1px #353535;
animation: fadeInUp 1s 1;
-moz-animation: fadeInUp 1s 1;
-webkit-animation: fadeInUp 1s 1;
-o-animation: fadeInUp 1s 1;
font-weight: bold; }
.exist, .succesfull {
color: #5f5f5f;
font-size: 16px;
font-weight: normal;
width: 270px;
padding: 12px 10px;
margin: 0 auto;
border-radius: 5px;
background: white;
animation: fadeInUp 1s 1;
-moz-animation: fadeInUp 1s 1;
-webkit-animation: fadeInUp 1s 1;
-o-animation: fadeInUp 1s 1; }
.temp {
display: none;
color: #cccccc; }

Resources