CSS Full width image - css

I am developing a Wordpress site using a child theme and cornerstone page builder.
Cornerstone allows full width images with no containers for normal pages but not posts. How do I make the post include a full width image?
I want to make this: http://www.crestonsolutions.com/test-post/
Look like this: http://www.crestonsolutions.com/blog/how-to-keep-customers-coming-back-to-your-site/
Here is the CSS I've done to the site:
.x-navbar {
background-color: transparent !important;
border: 0;
}
.x-logobar{
background-color: transparent !important;
}
.masthead {
height:0px;
}
.x-nav-wrap.mobile {
background: rgba(17, 17, 17, 0.60);
margin: 0;
}
.x-btn-navbar.collapsed {
color: white;
}
#media (max-width: 979px){
.x-navbar-inner .x-container.max.width {
width: auto;
max-width: none;
}
.masthead-inline .x-btn-navbar {
margin-right: 15px;
}
.x-navbar .x-brand {
margin-left: 15px;
}
ul#menu-main-menu-1 {
width: 88%;
margin-left: auto;
margin-right: auto;
}
.x-navbar {
background-color: rgba(17, 17, 17, 0.60)!important;
position: fixed;
top: 0;
left: 0;
width: 100%;
}
.x-nav-wrap.mobile.collapse.in {
height: 100%;
position: fixed;
width: 100%;
top: 90px;
}
.x-navbar .x-nav-wrap .x-nav > li > a {
text-align: center;
font-size: 46px;
border: none;
margin-top: 0px;
margin-bottom: 0px;
padding-top: 0px;
padding-bottom: 0px;
}
}
hr.x-hr {
width: 20%;
border-top: 3px solid rgba(0,0,0,0.075);
margin: 0 auto;
}
.single-post .x-navbar {
color: black;
}
.single-post .entry-header {
display: none;
}
.single-post .site > .x-container-fluid {
max-width: 100% !important;
width: 100% !important;
}
.single-post .x-navbar a {
color: black;
}

Related

Why is my mobile nav menu drawer pushing the site view downwards when it is opened?

Building a mock website for a family member (placeholder photos). When I open the navigation menu, it pushes the screen down instead of simply opening to the right. Seems to translate the view vertically. How can I get it to just open smoothly to the right without pushing the screen view down?
1a) Screen before opening https://i.stack.imgur.com/UfuZi.png
1b) screen when I click nav menu https://i.stack.imgur.com/yfzS3.png
1c) screen when I scroll up after opening the nav menu https://i.stack.imgur.com/9cI5i.png
Here is the css for the navbar:
NAV HEADER CSS
#media only screen and (max-width: 768px) {
body .site-nav__thumb-menu {
position: absolute;
top: 20px;
bottom: unset;
left: unset;
right: unset;
padding-top: 6px;
}
.site-nav__thumb-menu span.icon-menu-label {
display: none;
}
.site-nav__thumb-menu button svg {
color: #000;
box-shadow: none !important;
}
.site-nav__thumb-menu--inactive {
transform: unset;
}
.slide-nav__wrapper {
transform: translateX(-100%) !important ;
background-color: #fff;
}
.slide-nav__dropdown .slide-nav__sublist-header {
text-decoration: none;
}
.slide-nav__overflow--thumb {
width: 100%;
background-color: #000;
height: 100%;
}
.js-menu--is-open .slide-nav__wrapper {
transform: translateX(0) !important ;
}
.site-nav__thumb-menu button {
background-color: unset !important;
padding: 0;
text-align: left;
width: auto;
min-width: auto;
box-shadow: none !important;
}
nav.slide-nav__wrapper .slide-nav {
padding-bottom: 15px;
}
.slide-nav__overflow--thumb {
left: 0;
right: 0;
bottom: unset;
top: 100px;
position: absolute;
max-height: unset;
}
.header-item.mobile-ac.header-item--icons {
flex: unset;
position: absolute;
right: 10px;
top: 8px;
}
header.site-header.small--hide {
display: block !important;
}
.header-wrapper.header-wrapper--overlay {
transition: .5s ease;
}
.header-wrapper.header-wrapper--overlay.sticky {
position: fixed;
width: 100%;
background-color: #fff;
z-index: 99;
}
.header-wrapper.header-wrapper--overlay.sticky .announcement {
display: none;
}
body .header-wrapper--overlay.sticky + .site-nav__thumb-menu {
position: fixed;
top: -18px;
z-index: 9999;
}
.slide-nav a, .slide-nav button {
color: #000;
text-align: left;
z-index: 9999 !important;
}
.slide-nav .search-modal__wrapper {
border: unset;
}
.slide-nav .search-modal__wrapper {
border: unset;
background: #f1f1f1;
padding: 5px 15px;
}
.search-mobc {
padding: 8px 16px;
display: none;
}
nav.slide-nav__wrapper .slide-nav form button {
float: right;
}
nav.slide-nav__wrapper .slide-nav form button svg {
width: 25px;
height: 40px;
}
.slide-nav__overflow {
transition: .5s ease;
}
.slide-nav__overflow--thumb.sticky {
top: 70px;
position: fixed;
z-index: 9999;
}
.slide-nav__link, .slide-nav__sublist-link {
padding: 16px 20px;
}
.slide-nav__overflow--thumb nav.slide-nav__wrapper {
width: 303px;
height: 100%;
overflow-y: auto;
}
.slide-nav a, .slide-nav button {
color: #000 !important;
}
.slide-nav__overflow--thumb .slide-nav__dropdown {
background-color: #fff;
}
.slide-nav__overflow--thumb.js-menu--is-open {
background-color: #000;
height: 100% !important;
}
.slide-nav__wrapper .slide-nav__item {
border-bottom: 1px solid #ccc;
padding: 7px 0;
}
.site-nav__thumb-menu .site-nav__thumb-cart {
display: none;
}
.account-links-m a.slide-nav__link {
border: 2px solid #000;
width: 140px;;
margin: 0 auto;
font-size: 16px;
font-family: Titling !important;
text-transform: uppercase;
display: none;
}
'Slide out menu css'
.slide-nav__overflow--thumb nav.slide-nav__wrapper {
width: 303px;
height: 100%;
overflow-y: auto;
}
.slide-nav a, .slide-nav button {
color: #000 !important;
}
.slide-nav__overflow--thumb .slide-nav__dropdown {
background-color: #fff;
}
.slide-nav__overflow--thumb.js-menu--is-open {
background-color: #000;
height: 100% !important;
}
.slide-nav__wrapper .slide-nav__item {
border-bottom: 1px solid #ccc;
padding: 7px 0;
}
There are several methods to achieve such a thing. I would recommend to remove. the top attribute which would resolve your problem.
What you are doing is :
and what you want is :
Ensuring both your top menu and your floating menu are top:0; should do the work.

Search on mobile is driving me insane. Mag glass on click search box

I have some code below that i feel like should work just well but it appears to be breaking when i deploy.
All the code here: https://jsfiddle.net/82pmjqgn/
The search blob box just appearing over the content and not hidden. It should be hidden until it's clicked and then appear underneath. Here are some images for more reference. Any help would be greatly appreciated.
// Search
.block-search .amsearch-close,
.block-search .amsearch-loupe {
top: 43px;
}
#media (min-width: 768px) {
.block-search .form .search-autocomplete {
top: 43px;
}
.block-search .amsearch-close,
.block-search .amsearch-loupe {
top: 30%;
}
}
.form .search-autocomplete {
top: 88px;
margin-left: 0;
margin-right: 0;
}
.block-search {
.label {
display: inline-block;
float: none;
}
input {
border-radius: 50px;
height: 40px;
padding-left: 20px;
padding-right: 44px;
}
.control {
border-top: 0;
clear:none;
margin: 0;
padding: 0;
}
.action.search {
background: #5a5a5a;
border-radius: 50px;
height: 34px;
right: 4px;
top: 3px;
width: 34px;
}
.search-autocomplete ul:not(:empty) {
border-color: #c2c2c2;
border-top: 1px solid #c2c2c2;
}
.search-autocomplete ul {
li {
border-color: #c2c2c2;
&:hover {
background-color: #e5e5e5;
}
.amount {
color: #444;
}
}
.selected {
background-color: #e5e5e5;
}
}
}
This is how it currently looks.
How it should look.

Responsive units not really working

I am working on a page that I'm trying to make responsive. I'm using background images and trying to lay them out one under the other but when adding the margin-top property using responsive units (vh, em, rem, %) my background image moves but there's a big variation on where the images should be on a laptop screen and an Ipad screen.
LINK:
http://dbtest.destinationballybunion.ie/?page_id=3733
As I've said I tried using all the responsive units and i keep getting the same variation in results. Is there a way this can be fixed without using media queries ?
PS I am using a drag and drop Wordpress plugin called Visual Composer
CSS FOR THE PAGE:
#container {
margin: 0%;
}
#container text area {
margin: 5%;
}
wrapper {
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
entry {
box-shadow: 0 0 0px rgba(0, 0, 0, 0);
padding: 0px;
}
entry-header.style {
position: absolute;
left: -9999px;
}
.entry-content a img, #attachment-nav a img {
background: none repeat scroll transparent;
border: 0px solid #EEEEEE;
box-shadow: 0 0 0px #EEEEEE;
max-width: 98.5%;
padding: 0%;
}
.entry-content a:hover img, #attachment-nav a:hover img {
background: transparent repeat scroll 0 0;
}
.entry-title {
display:none;
}
.single .entry, .page .entry, .error404 .entry {
margin-bottom: 5.1% !important;
padding: 0;
}
#site-title {
height:100%;
width:100%;
}
#site-title, #site-description {
line-height: 100%;
}
#site-title {
margin: 0 0;
}
#site-title img {
margin: 0;
}
#site-title img {
padding: 0;
}
#access {
position: relative;
margin-top:-0.5%;
}
.tearhist {
background-size: 100% 100%;
background-size: contain;
background-repeat:no-repeat;
}
.tearhist {
position: absolute;
margin-top: -11.000em;
z-index: 100;
}
.tearytext {
position: absolute;
margin-top: 2.500em;
margin-right: 2.500em;
}
.tearytext h4 {
font-size: 24px;
font-size: 1.100em;
line-height: 100%;
}
.histmainb {
background-size: 100% auto;
background-repeat:no-repeat;
}
.histmainb {
position: relative;
}
.histblocka {
background-image: url('http://dbtest.destinationballybunion.ie/wp-content/uploads
/2014/10/HISTOBACK-1-SMALL.png');
background-size: auto auto;
background-size: contain;
background-repeat:no-repeat;
}
.histblocka {
position: absolute;
}
.histblocka p {
margin-right: 23.000em;
margin-left: 3.500em;
}
.histblocka h2 {
margin-top: 3.500em;
margin-left: 3.000em;
}
.histblocka h2 {
text-shadow: 0px 2px 3px #666;
}
.histblocka p {
font-size: 1.000em;
}
.histblocka h2 {
font-size: 1.000em;
}
.nublockb {
position: absolute;
margin-top: 21.000em;
}
.nublockb {
background-image: url('http://dbtest.destinationballybunion.ie/wp-content/uploads
/2014/10/HISTOBACK-3-SMALL.png');
background-size: auto auto;
background-size: contain;
background-repeat:no-repeat;
}

Getting CSS error when testing Rails app with Capybara

I'm getting an error I can't correct when testing with Rspec and Capybara in my rails app.
Failure/Error: visit('/')
ActionView::Template::Error:
Invalid CSS after " text-indent:": expected expression (e.g. 1px, bold), was "}"
It says the error is occurring in app/assets/stylesheets/application.css. I have nothing in there as of yet and cannot locate the issue. I think the error(based on what I've read) may have something to do with my css or scss file extensions. I've tinkered with them a bit with no change so here I am asking for help.
My registration_spec.rb
require 'spec_helper'
describe "Signing Up" do
it "allows a user to sign up for the site and creates the object in the database" do
expect(User.count).to eq(0)
visit('/')
expect(page).to have_content("Sign Up")
click_link "Sign Up"
fill_in "First Name", with: "John"
fill_in "Last Name", with: "Smith"
fill_in "Password", with: "password123"
fill_in "Password Confirmation", with: "password123"
click_button "Sign Up"
expect(User.count).to eq(1)
end
end
Here's my style.css
#about {
background: #efeddf;
padding: 20px;
border: 2px solid #57645d;
}
#about-content {
text-align: left;
}
#article-image {
float: left;
}
#article-links {
list-style-type: none;
}
#article-links a {
font-weight: bold;
color: #3f4944;
text-decoration: none;
}
#article-links img {
margin-right: 20px;
}
#article-show {
background: #efeddf;
padding: 20px;
border: 2px solid #57645d;
}
.bit-5 {
background: white;
padding: 20px;
text-align: center;
border: 2px solid #57645d;
color: #606e67;
float: right;
display: block;
}
.bit-75 {
background: white;
padding: 20px;
text-align: left;
border: 5px solid #57645d;
color: #606e67;
text-indent:
}
.clearfooter {
height: 330px;
clear: both;
}
#contact {
background: #efeddf;
padding: 20px;
border: 2px solid #57645d;
}
#contact-content {
text-align: left;
}
footer {
position: relative;
width: 100%;
height: 330px;
background: #3f4944;
}
html,body {
background: #efeddf;
height: 100%;
}
#title a {
color: #555;
text-decoration: none !important;
}
#main-header {
height: 180px;
background: #57645d;
position: fixed;
top: 0px;
margin: auto;
z-index: 100000;
width: 100%;
}
#main-nav ul {
text-align: center;
margin-top: 120px;
}
#main-nav ul li {
padding-left: 10px;
display: inline-block;
margin-right: 20px;
}
#main-nav ul li a {
text-decoration: none;
color: #efeddf;
font-size: x-large;
}
#new-article-path a {
font-weight: bold;
color: #3f4944;
}
#recent-article li {
list-style: none;
}
#recent-article li a {
color: #57645d;
text-decoration: none;
}
My grid(lemonade.css)
*,
*:after,
*:before {
margin: 0;
padding: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
/* Set the width of the grid */
.frame {
margin: auto;
width: 1100px;
margin-top: 200px;
min-height: 100%;
margin-bottom: -330px;
position: relative;
}
/* Attribute selector */
[class*='bit-'] {
float: left;
padding: 0.3em;
}
/* Floats last ".bit-" to the right */
[class*='bit-']:last-of-type {
float: right
}
/* Clearfix */
.frame:after {
content: "";
display: table;
clear: both
}
/* Main Widths */
.bit-1 { width: 100% }
.bit-2 { width: 50% }
.bit-3 { width: 33.33% }
.bit-4 { width: 25% }
.bit-5 { width: 20% }
.bit-6 { width: 16.6666666667% }
.bit-7 { width: 14.2857142857% }
.bit-8 { width: 12.5% }
.bit-9 { width: 11.1111111111% }
.bit-10 { width: 10% }
.bit-11 { width: 9.09090909091% }
.bit-12 { width: 8.33% }
.bit-75 { width:75%}
.bit-25 { width:25%}
/* Landscape mobile & down */
#media (max-width: 30em) {
.bit-1,
.bit-2,
.bit-3,
.bit-4,
.bit-5,
.bit-6,
.bit-7,
.bit-8,
.bit-9,
.bit-10,
.bit-11,
.bit-12 {
width: 100%;
}
}
/* Portrait tablet to landscape */
#media (min-width: 30em) and (max-width: 50em) {
.bit-4,
.bit-6,
.bit-8,
.bit-10,
.bit-12 {
width: 50%
}
.bit-1,
.bit-2,
.bit-3,
.bit-5,
.bit-7,
.bit-9,
.bit-11 {
width: 100%
}
}
/* Landscape to small desktop */
#media (min-width: 50em) and (max-width: 68.750em) {
.bit-2,
.bit-7 {
width: 100%
}
.bit-4,
.bit-8,
.bit-10,
.bit-12 {
width: 50%
}
}
Im still pretty new at all this so any help/and or criticisms would be appreciated. Thanks.
Your style.css is invalid which is causing following error:
Failure/Error: visit('/') ActionView::Template::Error: Invalid CSS
after " text-indent:": expected expression (e.g. 1px, bold), was "}"
In your style.css, for class .bit-75, you forgot to set value of text-indent property
.bit-75 {
background: white;
padding: 20px;
text-align: left;
border: 5px solid #57645d;
color: #606e67;
text-indent: // <-- set a value here for eg : 10px;
}

How to make a transparent header?

I'm trying to make the header of my site transparent using rgba code. But it doesn't work. Could you please help me to fix this problem?
Thanks in advance!
There is the header code:
/*==================== 3. Header ====================*/
.site {
margin: 0 auto;
width: 100%;
position: relative;
}
.site.full-banner {
padding-top: 0;
}
.site-main {
margin-bottom: 70px;
}
body.page-template-page-landing-php {
overflow: hidden;
}
.landing.site-main {
margin: 0;
padding: 0;
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
overflow: hidden;
}
.archive.woocommerce-page .site-main {
margin-bottom: 80px;
}
.site-header {
width: 100%;
z-index: 10000;
}
.full-banner .site-header {
position: absolute;
top: 0;
}
.site-header.header-1{
background: url('../images/header_bg.png') !important;
}
.site-header.header-2 {
background: rgba(218, 202, 202, .5);
}
.header-relative .site-header {
position: relative;
}
.header-absolute .site-header {
position: absolute;
}
/*========== 3.1 Header Top ==========*/
.header-top {
line-height: 15px;
min-height: 35px;
}
.header-2 .header-top {
min-height: 36px;
}
.site-header,
.site-header a,
.toplinks a,
.mini-cart .mobile-hide .subtotal .amount {
color: #dadada;
}
.header-2 .header-top {
border-bottom: 1px solid #242424;
-webkit-box-shadow: 0 1px 0 rgba(128,128,128,.15);
-moz-box-shadow: 0 1px 0 rgba(128,128,128,.15);
box-shadow: 0 1px 0 rgba(128,128,128,.15);
}
.header-2 .header-container {
min-width: 750px;
}
.main-header.fixed {
position: fixed;
background: rgba(218, 202, 202, .5);
width: 100%;
height: 77px;
left: 0; top: -7px;
z-index: 10000;
}
.main-header.fixed .navbar {
background: none;
}
.main-header.fixed .header-top {
display: none;
}
#primary {
width: 75%;
margin: 0;
float: left;
}
.full-width #primary {
width: 100%;
float: none;
}
#primary {
width: 100%;
}
.left-sidebar #primary {
width: 75%;
float: right;
}
.right-sidebar #primary {
width: 75%;
float: left;
}
.entry-header,
.entry-content,
.entry-summary,
.entry-meta {
margin: 0 auto;
width: 100%;
}
.entry-header h1 {
font-size: 15px;
}
In CSS 3, they introduced opacity.
opacity: 0.9;
It takes values from 0.0(invisible) to 1.0(opaque).
Let me know if it doesn't work for you. :-)
P.S. Not sure what the browser compatability is like, but so far it's working for me.

Resources