Responsive units not really working - wordpress

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;
}

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.

Scrolling animation for section on Website.

I’m working on my portfolio website and I was wondering how do I make a block of text appeared when I scrolled down the website? So when someone scroll down, say example my About me section to appear on the left.
It depends on what kind of text effecton mouse scroll you are looking for. Here’s a nice little timeline I once used. You can change this to represent what you like:
HTML
<div class="stem-wrapper">
<div class="stem"></div>
<div class="stem-background"></div>
</div>
<header class="section header">
<div class="section-inner">
<div class="master-head">
<h1 class="page-title">Colored Stem</h1>
<p class="page-description">Your bones don't break, mine do. That's clear. Your cells react to bacteria and viruses differently than mine. You don't get sick, I do. That's also clear. But for some reason, you and I react the exact same way to water.</p>
<p class="scroll-button" onClick="$('.post-wrapper .post:first-child .stem-overlay .icon').click();">Ready to go for a ride?</p>
</div>
</div> <!-- section-inner -->
</header> <!-- header -->
CSS
/*========== Global ==========*/
/*========== Basics ==========*/
html,
body {
height: 100%;
}
body {
background: #112C30;
margin: 0px;
padding: 0px;
font-family: sans-serif;
font-size: 15px;
line-height: 26px;
color: #B9CFD0;
font-family: 'Roboto Slab', serif;
overflow-x: hidden;
overflow-y: scroll;
}
a {
color: #B9CFD0;
text-decoration: none;
border-bottom: 1px solid #B9CFD0;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Comfortaa', cursive;
}
/*========== Sections ==========*/
.header {
text-align: center;
position: relative;
z-index: 1;
background-image: linear-gradient(to bottom, #6fc7d4 0%, #39ACBD 100%);
}
.header .master-head {
padding: 7% 30px;
}
.header .page-title {
padding: 0 30px 0 30px;
font-size: 60px;
line-height: 1em;
letter-spacing: 10px;
color: #FFF;
}
.header .page-description {
margin: 30px auto;
max-width: 600px;
font-size: 18px;
line-height: 2em;
color: #FFF;
}
.header .scroll-button {
color: #FFF;
font-size: 20px;
padding: 15px 20px 15px 20px;
display: inline-block;
background: #3093A2;
cursor: pointer;
transition-duration: 0.4s;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.header .scroll-button:hover {
background: #246f7b;
}
.header .scroll-button:active {
background: #194c53;
}
.main-content {
margin: 0px auto;
position: relative;
}
.main-content .section-inner,
.main-content .post-wrapper {
*zoom: 1;
}
.main-content .section-inner:before,
.main-content .post-wrapper:before,
.main-content .section-inner:after,
.main-content .post-wrapper:after {
content: "";
display: table;
}
.main-content .section-inner:after,
.main-content .post-wrapper:after {
clear: both;
}
.footer {
background: #112C30;
padding: 150px 0px 300px 0px;
position: relative;
z-index: 1;
}
.footer .good-bye {
text-align: center;
font-size: 18px;
line-height: 36px;
}
.footer .good-bye p {
display: block;
margin: 0px auto 30px auto;
max-width: 300px;
clear: both;
}
.section .section-inner {
margin: 0px auto;
width: 1024px;
}
#media only screen {
.section .section-inner {
width: auto;
max-width: 1024px;
}
}
/*========== Stem ==========*/
.stem-wrapper {
position: fixed;
top: 0px;
bottom: 0px;
left: 50%;
}
.stem-wrapper.color-yellow .stem-background {
background: #E9E566;
}
.stem-wrapper.color-green .stem-background {
background: #35C189;
}
.stem-wrapper.color-white .stem-background {
background: #FFF;
}
.stem-wrapper .stem,
.stem-wrapper .stem-background {
position: absolute;
top: 0px;
left: -30px;
width: 60px;
}
.stem-wrapper .stem {
background: #1e4f56;
height: 100%;
}
.stem-wrapper .stem-background {
background: #39ACBD;
height: 50%;
transition-duration: 0.5s;
}
.stem-padding,
.single-stem-icon {
width: 60px;
height: 60px;
margin: 0px auto;
background: transparent url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/stem-mask.png) repeat-y top center;
}
.single-stem-icon.scroll-to-top {
cursor: pointer;
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/scroll-to-top-icon.png);
}
/*========== Post wrapper ==========*/
.post-wrapper {
*zoom: 1;
}
.post-wrapper:before,
.post-wrapper:after {
content: "";
display: table;
}
.post-wrapper:after {
clear: both;
}
.post-wrapper .post {
position: relative;
width: 432px;
padding: 0px 0px 60px 0px;
clear: both;
opacity: 1;
-webkit-perspective: 1000px;
perspective: 1000px;
}
.post-wrapper .post.hidden .post-content {
-webkit-transform: translateY(100px) rotateX(30deg);
transform: translateY(100px) rotateX(30deg);
opacity: 0;
}
.post-wrapper .post:hover .post-content,
.post-wrapper .post.active .post-content {
opacity: 1;
}
.post-wrapper .post:hover .post-content .meta,
.post-wrapper .post.active .post-content .meta {
opacity: 1;
-webkit-transform: none;
transform: none;
}
.post-wrapper .post:nth-child(even) {
float: right;
}
.post-wrapper .post:nth-child(odd) {
float: left;
}
.post-wrapper .post:nth-child(even) .stem-overlay {
left: -110px;
}
.post-wrapper .post:nth-child(odd) .stem-overlay {
right: -110px;
}
.post-wrapper .post.music-icon .stem-overlay .icon {
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/music-icon.png);
}
.post-wrapper .post.bitbucket-icon .stem-overlay .icon {
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/bitbucket-icon.png);
}
.post-wrapper .post.m-icon .stem-overlay .icon {
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/m-icon.png);
}
.post-wrapper .post.twitter-icon .stem-overlay .icon {
background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/twitter-icon.png);
}
.post-wrapper .post .stem-overlay {
position: absolute;
top: 0px;
bottom: 0px;
width: 60px;
}
.post-wrapper .post .stem-overlay .icon {
background: transparent no-repeat center center;
height: 60px;
width: 60px;
cursor: pointer;
}
.post-wrapper .post .stem-overlay .stem-mask {
position: absolute;
top: 60px;
bottom: 0px;
left: 0px;
right: 0px;
background: transparent url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/22043/stem-mask.png) repeat-y top center;
}
.post-wrapper .post .post-content {
opacity: .3;
transition-duration: 0.4s;
-webkit-transform: none;
transform: none;
}
.post-wrapper .post .post-content .meta {
color: rgba(255, 255, 255, 0.3);
margin: 0px 0px 15px 0px;
letter-spacing: 1px;
opacity: 0;
transition-duration: 1s;
transition-delay: 0.2s;
-webkit-transform: translateY(-5px);
transform: translateY(-5px);
}
.post-wrapper .post .post-content .post-title {
font-size: 32px;
line-height: 42px;
margin: 0px 0px 15px 0px;
}
/*========== Media queries ==========*/
#media only screen and (max-width: 1080px) {
.main-content,
.main-content .section-inner {
max-width: none;
}
.stem-wrapper {
left: 80px;
}
.stem-padding,
.single-stem-icon {
margin: 0px;
float: left;
margin-left: 50px;
}
.post-wrapper .post,
.post-wrapper .post:nth-child(even),
.post-wrapper .post:nth-child(odd) {
width: auto;
margin-left: 110px;
float: none;
}
.post-wrapper .post .stem-overlay,
.post-wrapper .post:nth-child(even) .stem-overlay,
.post-wrapper .post:nth-child(odd) .stem-overlay {
left: -60px;
right: auto;
}
.post-wrapper .post .post-content {
padding: 0px 50px;
}
}
#media only screen and (max-width: 700px) {
.header .page-title {
font-size: 40px;
}
.post-wrapper .post {
margin-left: 90px !important;
}
.post-wrapper .post .post-content {
padding: 0 25px;
}
.stem-wrapper {
left: 60px;
}
.stem-padding,
.single-stem-icon {
margin-left: 30px;
}
}
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
JavaScript
($) {
$(document).ready(function() {
setupFade();
setupClickToScroll();
setupPostAnimation();
setupScrollToTop();
enableScrollAbortion();
// Trigger window.scroll, this will initiate some of the scripts
$(window).scroll();
});
// Allow user to cancel scroll animation by manually scrolling
function enableScrollAbortion() {
var $viewport = $('html, body');
$viewport.on('scroll mousedown DOMMouseScroll mousewheel keyup', function(e) {
if ( e.which > 0 || e.type === 'mousedown' || e.type === 'mousewheel') {
$viewport.stop();
}

CSS Full width image

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;
}

Overlay text forced out of containing div

I've tried this yesterday and it worked fine for me, it's basic enough, I just want to have a few lines of text overlay a background image (at 'nk'). Somewhere something has gone wrong - when the background image is at full size (which only seems to be possible by adding a png transparent image - full height not full width - to 'fill' it out) then the text seems to be forced from the containing div and its background image.
I'm using a drag and drop builder called Visual Composer, in this you can work with rows - .histy is the class I've attached to the problem div/row
and here is the page with the text problem:
http://dbtest.destinationballybunion.ie/?page_id=2755
Any ideas why now the text is being forced out of the containing div ? Thanks.
CSS for this 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 {
max-width: 98.5%;
padding: 0%;
box-shadow:0 0 3px #EEE;
background:#FFF;
border:#EEE 1px solid;
}
.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 {
background: url('http://dbtest.destinationballybunion.ie/wp-content/uploads/2014/03
/HISTORY-MENU-TOP.jpg');
background-repeat:no-repeat;
background-size: 100% 100%;
background-size: cover;
}
.histy {
background: url('http://dbtest.destinationballybunion.ie/wp-content/uploads/2014/06
/HISTORY-1-NT.jpg');
background-repeat:no-repeat;
background-size: 100% 100%;
background-size: contain;
}
.tourguides {
margin-top: 20px;
}
.walkback {
background-size: 100% 100%;
}
.walktrans {
height:100%;
width:100%;
}
.walktext {
background-color: transparent;
}
.walktext {
margin-top: 2.0vh;
}
.walktext p {
font-size: 24px;
font-size: 2.8vw;
}
.walktext p {
padding-left: 0.8vw;
padding-right: 2.5vw;
}
.walktext a {
color: #BD8346;
}
.walktext a:hover {
color: #827265;
}
.trailmenu h4 {
font-size: 23px;
}
.trailmenu h4 {
overflow: auto;
}
.trailmenu h4 span {
padding-top: 0px;
padding-right: 3px;
}
.trailmenu h4 span{
display: block;
float: left;
}
.trailmenu h4 img{
float: right;
padding-top: 10px;
}​
.trailmenu h4 img {
vertical-align:text-bottom;
}
h5 {
font-size: 21px;
}
h5 {
overflow: auto;
}
h5 span {
padding-top: 0px;
padding-right: 3px;
}
h5 span{
display: block;
float: left;
}
h5 img{
float: right;
padding-top: 20px;
}​
h5 img {
vertical-align:text-bottom;
}

tic tac toe capture css ( assistance )

Just redoing our captcha.
Demo: http://sitehelp.com.au/demos/ttt/422.php
Anyhoo the css is as follows:
.funcaptcha { width: 81px; overflow: hidden; float: left; margin-right: 0px; }
.funcaptcha a { display: inline-block; background: url("http://sitehelp.com.au/demos/ttt/images/ttt-small.png"); margin: 2px 2px 0 0; float: left; }
.funcaptcha a.circle { background-position: 0px -29px; }
.funcaptcha a.cross { background-position: -29px -83px; }
.funcaptcha a.empty { background-position: -0px 0px; }
.funcaptcha a.marked,
.funcaptcha a:hover { background-position: -29px 0px; }
.funcaptcha .box { display: block; cursor: pointer; overflow: hidden; width: 25px; height: 25px; }
Contains php, so unable to do a fiddle. But My css positioning is just off a tad, any suggestions ?
the ttt-small.png is:
So that it can be marked answered....
Bottom layer is 25 pixels tall and the top layer is 26. Sprite needs to be fixed.
Here's an editable jsFiddle with the HTML and CSS: http://jsfiddle.net/WhG5L/

Resources