background disapear on mobile devices - css

I have this form here that disappear when I am on a mobile device. I really do not understand why? Can anybody help me figure that out? I have gone through the code, but I cannot find any solution on this.
.customclass h3{
margin: 0 0 20px 0;
font-family: 'Open Sans';
font-weight: 300;
color: #444;
text-transform: none;
font-size: 24px;
line-height: 30px;
}
#form_over .formResponsive .formHorizontal .formControls {
margin-left: 0
}
#form_over .formResponsive .formHorizontal .formControlLabel {
float: none;
width: auto;
padding: 0px;
text-align: left;
margin-bottom: 5px
}
#form_over .formResponsive input[type="text"] {
height: 35px;
padding-left: 10px;
font-size: 15px
}
#form_over .formResponsive .formHorizontal .rsform-block {
margin-bottom: 0
}
#form_over .formResponsive .formBody #tilmeld {
font-weight: 900;
font-size: 18px;
border-radius: 4px;
background-color: #166687;
background-image: none;
line-height: 50px;
padding-left: 25px;
padding-right: 25px;
width: 98% !important;
max-width: 98% !important;
border: none;
text-shadow: none;
-webkit-appearance: none
}
#form_over .formResponsive .formBody #modtag {
font-weight: 900;
font-size: 18px;
border-radius: 4px;
background-color: #166687;
background-image: none;
line-height: 50px;
padding-left: 25px;
padding-right: 25px;
width: 98% !important;
max-width: 98% !important;
border: none;
text-shadow: none;
-webkit-appearance: none;
background-color: #F1A900;
}
#form_over .formResponsive input {
width: 92%
}
#form_over .formResponsive {
margin-bottom: 0
}

In your custom.css file you have following code:
#media only screen and (max-width: 767px) { /* mobile devices */
.customclass {
position: relative;
top: 0px;
right: 0%;
z-index: 100;
height: 74%;
background: white;
padding: 0 50px;
}
}
As you can see the styles for the form are overridden when the screen is 767px wide or less. Just remove background: white; and you'll be fine.

Related

Mkdocs with material theme: extra css not working on mobile devices

I'm using Mkdocs with material theme for products documentation on my company. I'd made some customize on the original theme using the extra.css file.
When people navigate on my site on web browser it's working ok.
When they navigate on mobile devices, the extra.css is not working, or having a very strange behavior.
On the images of mobile devices, the left side is when I open the menu. The right side is when I click in a link in the menu.
Here is my extra.css file.
.md-header__button.md-logo :-webkit-any(img,svg) {
display: block;
width: auto;
height: 2rem;
fill: currentColor;
}
.md-nav--primary {
font-size: .75rem;
line-height: 1.5;
background-color: #0000cc;
border-color: #eee;
border-width: thin;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
padding-top: .6rem;
padding-bottom: .6rem;
}
.md-header {
background-color: #0000cc;
}
input.md-search__input {
width: 100%;
height: 1.8rem;
padding-left: 2.2rem;
font-size: .8rem;
opacity: 1;
background-color: rgba(0,0,0,1);
border-radius: 16px;
text-align: left;
letter-spacing: 0px;
color: #ffffff;
opacity: 1;
}
.md-search__input:hover {
background-color: rgba(0,0,0,1);
}
.md-search-result__teaser {
display: -webkit-box;
max-height: 2rem;
color: #00348b;
margin: .5em 0;
overflow: hidden;
font-size: .64rem;
line-height: 1.6;
text-overflow: ellipsis;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
[data-md-toggle=search]:checked~.md-header .md-search__input {
text-overflow: clip;
background-color: var(--md-default-bg-color);
border-radius: .1rem .1rem 0 0;
color: #00348b;
}
.md-search-result__meta {
padding: 0 .8rem;
color: #00348b;
font-size: .64rem;
line-height: 1.8rem;
scroll-snap-align: start;
}
.md-nav--primary, .md-nav--secondary {
font-size: .75rem;
line-height: 1.5;
background-color: #eee;
-moz-border-radius: 8px;
border-radius: 8px;
padding-top: .6rem;
padding-bottom: .6rem;
background: #00348B 0% 0% no-repeat padding-box;
}
.md-nav__title {
display: block;
padding: 0 .6rem;
overflow: hidden;
font-weight: 700;
text-overflow: ellipsis;
color: #ffffff;
}
.md-nav__item .md-nav__link--active {
text-align: left;
font: normal normal normal 14px/18px Open Sans;
letter-spacing: 0.35px;
color: #FFFFFF;
opacity: 1;
}
.md-nav__item--nested>.md-nav__link {
color: #FFFFFF;
}
.md-nav__link {
display: block;
margin-top: .625em;
overflow: hidden;
text-overflow: ellipsis;
cursor: pointer;
transition: color 125ms;
scroll-snap-align: start;
text-align: left;
letter-spacing: 0.33px;
color: #FFFFFF;
opacity: 1;
}
.md-nav__link[data-md-state=blur] {
color: #d5d5d5;
}
.md-footer {
color: #FFFFFF;
background : #00348B 0% 0% no-repeat padding-box;
}
.md-float-right {
height: 100%;
margin: 430px 0 0 650px;
display: inline-block;
align-items: flex-end;
position: fixed;
}
p {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
text-align: justify;
}

CSS: How to create a button with an arrow placedo on the right

I need to reproduce following button:
I have already tried to create it, but the arrow on the right is not the same as in the picture. How can I reproduce the same white arrow?
.sBtn {
display: inline-block;
background: #908589;
border: 0;
color: #fff;
font-weight: 700;
font-size: 1.2em;
letter-spacing: 0.04em;
line-height: 2.5em;
padding: 0 0 0 1em;
outline: none;
text-decoration: none;
margin-top: 14px;
}
...and so on...
https://jsfiddle.net/jobgaraux/h81z00jL/1/
Here I made it for you jsFiddle
Edited HTML:
<span class="arrowBtn"> <span class="icon"></span></span>
You can create CSS3 arrow from borders:
.sBtn-go .arrowBtn .icon {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 0;
height: 0;
border-style: solid;
border-width: 15px 0 15px 13px;
border-color: transparent transparent transparent white;
}
may be this will help youl
.sBtn {
display: inline-block;
background: #908589;
border: 0;
color: #fff;
font-weight: 700;
font-size: 1.2em;
letter-spacing: 0.04em;
line-height: 2.5em;
padding: 0 0 0 1em;
outline: none;
text-decoration: none;
margin-top: 14px;
}
.arrowBtn {
display: inline-block;
line-height: 2.5em;
text-align: center;
background: #333;
color: white;
font-size: 1em;
width: 2.5em;
transition: margin 200ms;
margin-left: .75em;
position:relative;
left:2px;
}
.sBtn-go .arrowBtn {
background-color: #B6AFB1;
}
.sBtn-go .arrowBtn:hover {
}
.sBtn-go .arrowBtn {
background-color: desaturate(darken(#F8AD6C,5%),5%);
}
<button class="sBtn sBtn-go" name="search">Search<span class="arrowBtn">&#x25BA</span></button>
.sBtn {
display: inline-block;
background: #908589;
border: 0;
color: #fff;
font-weight: 700;
font-size: 1.2em;
letter-spacing: 0.04em;
line-height: 2.5em;
padding: 0 0 0 1em;
outline: none;
text-decoration: none;
margin-top: 14px;
}
.arrowBtn {
display: inline-block;
line-height: 2.5em;
text-align: center;
background: #333;
color: white;
font-size: 1em;
width: 2.5em;
transition: margin 200ms;
margin-left: .75em;
}
.sBtn-go .arrowBtn {
background-color: #B6AFB1;
}
.sBtn-go .arrowBtn:hover {
}
.sBtn-go .arrowBtn {
background-color: desaturate(darken(#F8AD6C,5%),5%);
}
<button class="sBtn sBtn-go" name="search">Search<span class="arrowBtn">&#x25BA</span></button>

body.class background image size

hi all i am having problems with background images and i wonder can someone help.
i created a template that i am working from now the pages that i create from the template i am giving them class names so i can change the background of them which is working fine, but the problem is when the page re-sizes it goes back to the original background i will paste my css see if anyone can help thanks.
/*!
* Start Bootstrap - Business Casual Bootstrap Theme (http://startbootstrap.com)
* Code licensed under the Apache License v2.0.
* For details, see http://www.apache.org/licenses/LICENSE-2.0.
*/
body {
font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-o-background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
background-position: center center;
-webkit-background-size: cover;
background-image: url(../img/event%20places%20pictures/3arena.jpg);
color: #000;
}
h1,
h2,
h3,
h4,
h5,
h6 {
text-transform: uppercase;
font-family: "Josefin Slab","Helvetica Neue",Helvetica,Arial,sans-serif;
font-weight: 700;
letter-spacing: 1px;
text-align: left;
}
p {
line-height: 1.6;
color: #000;
}
hr {
max-width: 400px;
border-color: #000000;
}
.brand,
.address-bar {
display: none;
}
.navbar-brand {
text-transform: uppercase;
font-weight: 900;
letter-spacing: 2px;
}
.navbar-nav {
text-transform: uppercase;
font-weight: 500;
letter-spacing: 3px;
}
.img-full {
min-width: 100%;
}
.brand-before,
.brand-name {
text-transform: capitalize;
}
.brand-before {
margin: 15px 0;
}
.brand-name {
margin: 0;
font-size: 4em;
}
.tagline-divider {
margin: 15px auto 3px;
max-width: 250px;
border-color: #999999;
}
.box {
margin-bottom: 20px;
padding: 30px 15px;
background-color: rgba(255,255,255,0.6);
}
.intro-text {
text-transform: uppercase;
font-size: 1.25em;
font-weight: 400;
letter-spacing: 1px;
}
.img-border {
float: none;
margin: 0 auto 0;
border: #999999 solid 1px;
}
.img-left {
float: none;
margin: 0 auto 0;
}
.navbar-footer {
background: rgba(255,255,255,0.8);
}
footer p {
margin: 0;
padding: 50px 0;
}
#media screen and (min-width:768px) {
.brand {
display: inherit;
margin: 0;
padding: 30px 0 10px;
text-align: center;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
font-family: "Josefin Slab","Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 5em;
font-weight: 700;
line-height: normal;
color: #fff;
background-color:rgba(51,51,51,0.7);
text-shadow: 2px 2px #000;
}
.top-divider {
margin-top: 0;
}
.img-left {
float: left;
margin-right: 25px;
}
.address-bar {
display: inherit;
margin: 0;
padding: 0 0 40px;
text-align: center;
text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
text-transform: uppercase;
font-size: 1.25em;
font-weight: 400;
letter-spacing: 3px;
color: #fff;
background-color: rgba(51,51,51,0.7);
text-shadow: 2px 2px #000;
}
.social{
background-color: rgba(51,51,51,0.7);
display: inherit;
margin: 0;
padding-bottom:20px
}
.social li{
display:inline;
}
.fb-share-button{
position:relative
top:-7px;
}
.fb-like > span {
vertical-align: baseline !important;
}
.navbar {
border-radius: 0;
}
.navbar-header {
display: none;
}
.navbar {
min-height: 0;
}
.navbar-default {
border: none;
background:rgba(255,255,255,0.8);
}
.nav>li>a {
padding: 25px;
}
.navbar-nav>li>a {
line-height: normal;
}
.navbar-nav {
display: table;
float: none;
margin: 0 auto;
table-layout: fixed;
font-size: 1.15em;
}
}
#media screen and (min-width:1200px) {
.box:after {
content: '';
display: table;
clear: both;
}
/* start of css for each of the venue pages*/
body.gallery{
background-image:url(../img/event%20places%20pictures/3arena.jpg)
}
body.academy{
background-image:url(../img/event%20places%20pictures/the%20academy.jpg)
}
body.vicar{
background-image:url(../img/event%20places%20pictures/vicar%20st.jpg)
}
body.Ambassador{
background-image:url(../img/event%20places%20pictures/Ambassador.jpg)
}
body.aviva{
background-image:url(../img/event%20places%20pictures/aviva.jpg)
}
body.arena{
background-image:url(../img/event%20places%20pictures/02-Arena.jpg))
}
body.croke{
background-image:url(../img/event%20places%20pictures/croke%20park.jpg)
}
body.gaiety{
background-image:url(../img/event%20places%20pictures/gaiety-theater.jpg)
}
body.gate{
background-image:url(../img/event%20places%20pictures/gate%20theatre.jpg)
}
body.grand{
background-image:url(../img/event%20places%20pictures/grand%20social.jpg)
}
body.laughter{
background-image:url(../img/event%20places%20pictures/laughter%20lounge.jpg)
}
body.marlay{
background-image:url(../img/event%20places%20pictures/marlay%20park.jpg)
}
body.olympia{
background-image:url(../img/event%20places%20pictures/the-olympia-photo.jpg)
}
body.rds{
background-image:url(../img/event%20places%20pictures/rds.jpg)
}
body.button{
background-image:url(../img/event%20places%20pictures/The_Button_Factory.jpg)
}
body.whelans{background-image:url(../img/event%20places%20pictures/whelans.jpg)
}
body.signup{background-image:url(../img/bianca%20photos/IMG-20150717-WA0024.jpg)
}
body.events{
background-image:url(../img/bianca%20photos/10402046_118490843153454`enter code here`3_1165711705389334252_n.jpg)
}
.events-box{
background-color: rgba(255,255,255,0.9);
}
You've placed those background images within a media query targeting min-width:1200px, so at any width under 1200px that won't apply and you'll just see the default body background image.
So just remove those background rules from the media query.
You forgot to close media query bracket }.

Button result not as desired

Why is it that when I test my page out on Chrome Canary emulating the iPad I get this result,
But when testing it out on the real device I get this
I'm trying to achieve the top one, but can't for some reason. Any ideas? Also is Chrome Canary reliable? Here's the CSS
#import url(http://fonts.googleapis.com/css?family=Open+Sans:300);
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: #fff;
color: #7b8993;
font: 300 87.5%/1.5em 'Open Sans', sans-serif;
}
.form-wrapper {
padding-top: 10%;
border-radius: 2px;
margin: 50px auto;
position: relative;
width: 375px;
}
form {
padding: 30px 20px 0;
}
.form-item {
margin-bottom: 10px;
width: 100%;
}
.form-item input {
border: 1px solid #ccc;
border-radius: 2px;
color: #000;
font-family: 'Open Sans', sans-serif;
font-size: 1em;
height: 50px;
padding: 0 16px;
transition: background 0.3s ease-in-out;
width: 100%;
}
.form-item input:focus {
outline: none;
border-color: #9ecaed;
box-shadow: 0 0 10px #9ecaed;
}
.button-panel {
margin: 20px 0 0;
width: 100%;
}
.button-panel .button {
background: #009dff;
border: none;
border-radius: 2px;
color: #fff;
cursor: pointer;
height: 50px;
font-family: 'Open Sans', sans-serif;
font-size: 1.2em;
letter-spacing: 0.05em;
text-align: center;
text-transform: uppercase;
transition: background 0.3s ease-in-out;
width: 100%;
}
.button:hover {
background: #00c8ff;
}
#media only screen
and (max-width : 320px) {
.form-wrapper {
padding-top: 10%;
border-radius: 2px;
margin: 50px auto;
position: relative;
width: 320px;
}
}
.cent {
text-align: center;
color: #000;
}
.view {
text-align: center;
text-decoration: none;
color: #7b8993;
padding-top: 5px;
}
#ref {
text-align: center;
text-decoration: none;
color: #7b8993;
padding-top: 8px;
font-size: 16px;
}
#ref:hover {
text-align: center;
text-decoration: none;
color: #009dff;
-webkit-animation: hue 60s infinite linear;
padding-top: 8px;
font-size: 16px;
}
You need to add the following to the button element in order to remove the default styling.
-webkit-appearance: none;

h1 tag positioning on mobile browser

I cant seem to figure out why the h1 tag is showing differently on mobile browsers.
The site is www.jd-financialservices.co.uk When I view the site on my desktop everything is fine. When I view it on my Nexus 4 however, the 10px gap between h1 and the .topbar div has gone. It's the same on Opera, Firefox and Chrome.
Can anyone help please?
Thank you in advance.
I would advise against using position:relative; and negative top on all of your elements.
With some minor changes to your css you will probably find that it fixes itself: here is my updated version of your css. See if that fixes things.
I updated: aside nav h1 .welcome and footer. By changing some of the header elements to use position:absolute and then using margin to space elements out. You will probably find the css is more compatible cross-browser/device.
#font-face { font-family: 'Constantia'; src: url('constantia/constantia.eot'); src: url('constantia/constantia.eot?#iefix') format('embedded-opentype'), url('constantia/constantia.svg#Constantia') format('svg'), url('constantia/constantia.woff') format('woff'), url('constantia/constantia.ttf') format('truetype'); font-weight: normal; font-style: normal;}
* {
margin-top: 0px;
margin-bottom: 0px;
}
html {
font-family: 'droid sans';
-webkit-font-smoothing: antialiased;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
}
body {
width: 940px;
margin: 0 auto;
}
li {
list-style: none;
}
a {
text-decoration: none;
color: #ffffff;
}
a:hover {
text-decoration: underline;
}
header a:hover {
text-decoration: none;
}
h1 {
font-family: 'Constantia', helvetica;
position: absolute;
top: 20px;
}
header {
height: 140px;
position: relative;
margin-bottom: 40px;
}
nav {
width: 660px;
height: 30px;
background-color: #00788a;
position: absolute;
font-size: 1.2em;
bottom: 0;
right: 0;
}
nav li a {
color: #ffffff;
}
nav a:hover {
text-decoration: underline;
}
nav ul {
padding-left: 0px;
}
nav ul li {
display: inline;
line-height: 30px;
vertical-align: middle;
color: #ffffff;
padding-left: 70px;
padding-right: 65px;
}
aside {
height: 600px;
width: 240px;
float: left;
background-color: #00788a;
color: #ffffff;
clear: both;
position: relative;
text-align: center;
margin-bottom: 30px;
}
article a {
color: #00788a;
}
.contain {
width: 940px;
}
footer {
height: 100px;
clear: both;
background-color: #00788a;
color: rgba(255,255,255,0.5);
position: relative;
font-size: 0.85em;
padding: 0 10px;
line-height: 1.5em;
margin-top: 40px;
}
footer li {
display: inline;
border-left: 2px solid rgba(255,255,255,0.5);
padding: 0 5px;
}
footer li:first-child {
border: none;
}
footer ul {
padding-left: 0;
text-align: center;
}
.foot_fade {
color: rgba(255,255,255,0.5);
}
.first_initial {
font-size: 110px;
color: #00788a;
font-weight: lighter;
}
.second_initial {
font-size: 101px;
color: #00788a;
font-weight: lighter;
position: relative;
top: -6px;
}
.rest_of_title {
font-size: 26px;
position: relative;
left: -73px;
top: 20px;
font-weight: lighter;
}
header a {
color: #000000;
}
.header_background {
float: right;
position: relative;
z-index: -1;
}
.topbar {
width: 940px;
height: 30px;
background-color: #00788a;
}
.call_now {
padding: 10px 50px 10px 50px;
font-size: 1.5em;
line-height: 1.5em;
border-bottom: 5px solid #ffffff;
text-shadow: 2px 2px 2px #2a2a2a;
}
.home_service {
padding: 10px 40px 10px 40px;
font-size: 1.45em;
line-height: 1.5em;
border-bottom: 5px solid #ffffff;
text-shadow: 2px 2px 2px #2a2a2a;
}
.service_list {
font-size: 1.25em;
line-height: 3em;
text-align: left;
padding-top: 35px;
padding-left: 20px;
text-shadow: 2px 2px 2px #2a2a2a;
}
.welcome {
width: 660px;
float: right;
padding: 0px 0px 0px 40px;
font-size: 0.9em;
line-height: 2em;
color: #2a2a2a;
position: relative;
/* top: -95px; */
text-align: justify;
}
.services {
width: 660px;
float: right;
padding: 0px 0px 0px 40px;
position: relative;
top: -95px;
}
.services a {
text-decoration: none;
position: absolute;
top: 151px;
left: 0;
width: 275px;
color: #ffffff;
background-color: rgba(0,0,0,0.5);
padding: 10px 0 10px 10px;
}
.services div {
margin-bottom: 15px;
}
.services div:last-child {
margin-bottom: 0;
}
.savings_pic {
position: relative;
height: 190px;
width: 285px;
}
.retire_pic {
position: absolute;
top: 0;
right: 0;
height: 190px;
width: 285px;
}
.protection_pic {
position: relative;
height: 190px;
width: 285px;
}
.insurance_pic {
position: absolute;
top: 205px;
right: 0;
height: 190px;
width: 285px;
}
.mortgage_pic {
position: relative;
height: 190px;
width: 285px;
}
.retire {
width: 300px;
float: right;
margin: 0 0 10px 10px;
}
/*.shadow {
box-shadow: 0 0 3px 1px rgba(42,42,42,0.5);
margin: 3px 0;
}*/
.overlay {
background-color: rgba(0, 0, 0, 0.5);
bottom: 54px;
color: #FFFFFF;
padding: 10px;
position: relative;
width: 265px;
}
.overlay a {
text-decoration: none;
color: #ffffff;
}
.overlay a:hover {
}
.left {
float: left;
}
.right {
float: right;
}
.regulation {
font-style: italic;
color: #9a9a9a;
font-size: 0.9em;
}
.smallprint {
width: 520px;
font-size: 0.9em;
text-align: center;
position: absolute;
right: 210px;
top: 30px;
}
.copyright {
width: 310px;
margin: 0 auto;
}
.scapa {
position: absolute;
bottom: 0;
right: 10px;
font-size: 0.9em;
}

Resources