Mobile menu doesn't scroll - html

The mobile page works just like i wanted it to work but the problem is when i open site navigation, main contect is sliding down and navigation is static. i cant scroll navigation.. is it anyway that i could scroll navigation only? the site where is problem is www.budivelik.hr any idea?
body > .main-nav {
position: fixed;
top: 0;
left: -210px;
bottom: 0;
height: 100%;
padding-top: 80px;
margin-top: 0;
width: 210px;
z-index: 101;
background: #333333;
overflow: hidden;
-webkit-box-shadow: inset 0 0 30px rgba(0,0,0,0.4);
box-shadow: inset 0 0 30px rgba(0,0,0,0.4);
z-index: 150;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
.main-nav.active-menu {
left: 0;
}
.main-header .nav-bar {
display: block;
}
body.menu-effect .boxed-view {
-webkit-transition: all 0.4s ease;
-webkit-transform: translate(200px,0);
z-index: 100;
position: relative;
}
body > .main-nav > ul,
body > .main-nav > ul > li {
float: none;
}
body > .main-nav > ul > li > a {
display: block;
background: rgba(0,0,0,0.3);
padding: 20px 11px 18px;
margin-left: 0;
margin-right: 0;
border-bottom-color: rgba(255,255,255,0.1);
}
body .mobile-menu-button {
display: block;
width: 62px;
height: 62px;
margin: auto;
padding: 1px 5px;
font-size: 24px;
position: absolute;
right: 76px;
top: 0;
bottom: 0px;
margin: auto;
text-align: center;
line-height: 62px;
background: url("../images/icons/menu-icon.png") no-repeat 0 0 transparent;
}
body .woocommerce-page .mobile-menu-button{
background: url("../images/icons/white-menu-icon.png") no-repeat 0 0 transparent;
background-size: cover;
right: 132px;
}
.mobile-menu-button:hover {
text-decoration: none;
}
.product .summary{
padding: 0 20px;
}
.main-header .socials{
margin: 12px 0 0;
}
.social-links > li a {
max-height: 48px;
width: 36px;
}
.main-slider .sneakers{
left: 20%;
}
.recommend-block{
margin-top: 40px;
}
.gallery-slider .quarter-size .gallery-photo-desc > div .zoom-image{
transform: scale(0.8) translate(0px, -70%);
}
}
#media screen and (max-width: 992px){
.big-footer .sportify-wrap{
display: none;
}
.big-footer .footer-block{
margin-top: 20px;
}
.contact-form label{
margin-top: 20px;
}
.error-box .sneakers-block{
padding-top: 60px;
}
.new-arrivals > .row > div{
width: 25%;
}
.new-arrivals > .row > div:nth-child(5){
border-top: medium none;
}
.new-arrivals > .row > div:nth-child(5n+1){
border-left: medium none;
}
.new-arrivals > .row > div:nth-child(4n+1){
border-left: 1px solid #e5e5e5;
}
.team-item header a{
width: 50%;
}
.team-list > li{
width: 50%;
}
.shop-slider .round-offer{
left: 50%;
}
.shop-slider .round-offer{
width: 286px;
height: 286px;
left: 40%;
}
.shop-slider .round-offer:before{
width: 334px;
height: 334px;
}
.member-box figure img{
width: 100%;
}
.commentlist > li .children{
margin-left: 20px;
}
.member-box .content{
min-height: 100px !important;
}
}
#media screen and (max-width: 768px){
.main-header .ad{
margin-top: 18px;
}
.main-header .socials{
display: none;
}
.big-footer .footer-block{
padding-bottom: 60px;
}
.big-footer .contact-block{
position: relative;
width: auto;
bottom: auto;
left: auto;
}
.big-footer .contact-block textarea{
margin-top: 30px;
}
.big-footer .contact-block .form-submit{
text-align: center;
}
.filter-box ul li,
.filter-box > div{
width: 100%;
}
.filter-box ul li a{
font-size: 18px;
padding: 10px;
}
.timetable thead tr > th:nth-child(1),
.timetable tbody tr > th{
display: none;
}
.new-arrivals > .row > div{
width: 50%;
}
.new-arrivals > .row > div:nth-child(3),
.new-arrivals > .row > div:nth-child(4),
.new-arrivals > .row > div:nth-child(5){
border-top: medium none;
}
.new-arrivals > .row > div:nth-child(5n+1){
border-left: medium none;
}
.new-arrivals > .row > div:nth-child(2n+1){
border-left: 1px solid #e5e5e5;
}
.about-box header .header-block .entry-header{
position: static;
top: 0;
left: 0;
}
.blog-box figure img{
width: 100%;
}
body .woocommerce-page .mobile-menu-button{
width: 52px;
height: 52px;
right: 160px;
}
.news-block .news-list li .row > div:hover:before{
height: 100%;
}
.commentlist > li .children{
margin-left: 10px;
}
.blog-box .blog-items > div{
width: 100%;
}
}
#media screen and (max-width: 724px){
.main-header .ad{
margin-top: 15px;
}
body .mobile-menu-button {
right: 22px;
}
.team-list > li{
width: 100%;
}
.tp-bullets {
margin-left: 5% !important;
}
}
#media screen and (max-width: 670px){
.woo-container .shopping-cart-wrap .coupon-code-block .coupon-field{
width: 50%;
}
.woo-container .shopping-cart-wrap .coupon-code-block .button{
width: 50%;
}
.update-cart{
float: none;
text-align: right;
margin-bottom: 20px;
}
}
#media screen and (max-width: 640px){
.nav-bar .identity{
text-align: center;
}
.nav-bar .identity img{
max-height: 40px;
max-width: 120px;
}
body .woocommerce-page .mobile-menu-button{
right: 130px;
width: 42px;
height: 42px;
background-position: 0 -2px;
}
body .woocommerce-page .search-block{
display: none;
}
body .woocommerce-page header .col-xs-4{
width: 100%;
}
body .woocommerce-page > header .cart-all{
margin-left: 15px;
}
body .woocommerce-page > header .cart-all i,
body .woocommerce-page > header .cart-all .amount{
width: 50%;
}
body .woocommerce-page > header .col-xs-3{
width: 100%;
}
.show-content > header .col-xs-4{
width: 100%;
}
.show-content > header .ad{
display: none;
}
.page-slider-block ul li .col-xs-6{
width: 100%;
}
.page-slider-box .slider-controls{
bottom: 30%;
}
.checkout_coupon input[type="text"]{
min-width: 120px !important;
width: auto !important;
}
}
#media screen and (max-width: 480px){
.sneakers-block{
display: none;
}
body .woocommerce-page .mobile-menu-button{
right: 10px;
}
.team-item header a{
width: 100%;
text-align: center;
padding: 10px 0 4px 10px;
}
.team-item header a br{
display: none;
}
.classes-box .classes{
width: 100%;
left: 0;
}
.classes-box nav .toggle-content .entry-header{
padding-top: 20px;
margin-top: 12px;
}
.classes-box nav .toggle-content{
position: relative;
left: 0;
width: 100%;
}
.classes-box .classes-content-block .read-more{
position: relative;
bottom: 0;
right: 0;
font-size: 20px;
line-height: 18px;
margin-top: 20px;
padding: 12px 50px 8px 0px
}
.box-header .entry-header{
font-size: 22px;
line-height: 28px;
}
body .mobile-menu-button{
right: 10px;
}
}
This is my CSS for mobile version of site..

To scroll navigation only use following css code
#media (max-width: 992px){
body > .main-nav {
overflow: scroll;
}
}

Related

Media Viewport Samsung S8 CSS

I am trying to fix a CSS created by someone else(I took over a job from a other company for my current client)
As for now everything working in my website except on my Samsung Galaxy S8. The footer doesnt follow the rules. I have putted everything I could find online with
#media only screen and (min-width: 360px) and (max-width: 767px) {
/* Your Styles... */
}
But still when I'm going on the website on my S8. The text in a specific part that I want to follow rules..doesnt. (Part is Footer-right2)
On iPad, Desktop its working except this.
Any ideas ?
Here my CSS :
#media and (min-width: 360px) and (max-width: 767px) {
#footer .footer-wrapper .footer-right2 {
text-align: center;
font-size: 0.5em;
font-weight: 300;
padding-left: 15px;
margin:auto;
max-width:200px;
}
#footer .footer-logo {
display: inline-block;
padding-left: 15px;
margin:auto; } }
It's working for other size so here one of them as exemple :
#media (max-width: 768px) {
#header .header-wrapper {
height: 85px; }
#header .header-toggle-menu {
position: fixed;
top: 30px;
right: 15px;
z-index: 7000;
display: block; }
#header .header-toggle-menu span {
display: block;
width: 42px;
height: 7px;
border-radius: 3px;
background-color: #1d1d1d;
transition: background-color 0.175s linear; }
#header .header-toggle-menu span + span {
margin-top: 4px; }
#header .header-menu {
position: fixed;
right: 0;
top: 0;
bottom: 0;
z-index: 6000;
padding: 7px;
width: 300px;
background-color: #08ab0f;
padding-top: 85px;
transform: translateX(300px);
transition: transform 0.225s ease-in-out; }
#header .header-menu a {
display: block;
padding: 7px;
font-size: 0.85em;
font-weight: 900;
color: #ffffff;
transition: none;
background-color: #e13649;
margin-bottom: 7px; }
#header .header-menu a:hover, #header .header-menu a:focus {
color: #ffffff; }
#header.active .header-menu {
transform: translateX(0); }
#header.active .header-toggle-menu span {
background-color: #ffffff; }
#footer .footer-wrapper .form-message {
top: 85px; }
#footer .footer-wrapper .footer-right2 {
text-align: center;
font-size: 0.5em;
font-weight: 300;
padding-left: 15px;
margin:auto;
max-width:200px;
}
#footer .footer-logo {
display: inline-block;
padding-left: 15px;
margin:auto; }
#page {
padding-top: 85px; }
.slider-container {
height: 530px;
background-color: #08ab0f; }
.slider-container .slider-slides {
height: 500px; }
.slider-container .slider-slides .slides-item {
position: relative; }
.slider-container .slider-slides .slides-item .item-left, .slider-container .slider-slides .slides-item .item-right {
position: absolute;
top: 0;
left: 0;
right: auto;
width: 100%;
height: 100%; }
.slider-container .slider-slides .slides-item .item-left {
z-index: 100;
background-color: rgba(0, 0, 0, 0.3);
text-align: center; }
.slider-container .slider-slides .slides-item .item-right {
z-index: 50; }
.slider-container .slider-navigation {
position: absolute;
bottom: 0; }
.single-team_member .team-member-header {
display: block;
align-items: stretch;
justify-content: center;
flex-direction: column;
flex-wrap: nowrap; }
.single-team_member .team-member-header .header-image {
padding: 0; }
.single-team_member .team-member-header .header-image:before {
content: '';
display: block;
padding-bottom: 56.75%; }
.single-team_member .team-member-header .header-content {
background-color: #1d1d1d;
padding: 30px 15px; } }

CSS: Slider overlaps Drop down Menu on Mobile - Z-Index issue?

Update:
I'm sure this will be easy fix for advanced members. I have created drop down menu with the 'nav' element. For some reason as hard as I try, I cannot get the menu to overlap the slider images below it when you expand it on mobile. I've tried lowering the Z-index on the slider and raising it on the menu. What am I doing wrong? Thanks in advance:
UPDATE: Here is a fiddle link as requested by a comment which includes the HTML. https://jsfiddle.net/wknow6cv/#&togetherjs=ADxkd31O6q
#import 'https://fonts.googleapis.com/css?family=Alegreya+Sans';
* {
margin: 0;
padding: 0;
border: 0;
overflow-x: hidden;
}
html,body
{
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
body {
background: #F5F5F5;
color: #67727A;
font-family: 'Alegreya', Sans-serrif;
margin: 0;
}
h3 {
font-size: 150%;
line-height: 155%;
padding: 5% 0;
font-weight: 400;
}
p{
font-size: 120%;
line-height: 150%;
padding: 3%;
text-indent: 2%;
text-align: center;
}
img{
max-width: 100%;
height: auto;
width: auto;
margin-bottom: -4px;
}
header{
background-color: #6991AC;
width: 100%;
height: 120px;
}
h1{
position:absolute;
right: 600px;
top:30px;
}
#top-left-menu {
right: 0px;
}
#logo{
margin: 20px;
float: left;
width: 380px;
height: 60px;
background: url(img/RD.png) no-repeat center;
left: 0px;
top: 0px;
}
p {
font-size: 1.4vw;
}
h3{
font-size: 1.5vw;
}
/*--- Start Navigation --*/
nav{
float: right;
padding: 25px 20px 0 0; /*--top right bottom left--*/
}
#menu-icon{
display: hidden;
width: 40px;
height: 40px;
background: url(img/nav.png) center;
}
a:hover#menu-icon {
border-radius: 4px 4px 0 0;
}
ul{
list-style-type: none;
}
nav ul li {
font-family: 'Alegreya Sans', Sans-serrif;
font-size: 150%;
display: inline-block;
/*makes the links go left from right instead of up and down*/
float: left;
padding: 10px;
}
nav ul li a {
text-decoration: none;
color: #F5F5F5;
}
nav ul li a:hover {
color: #C3D7DF;
}
/*.current{
color: #C3D7DF;
}
/*--End Navigation--*/
.one-fourth {
width: 25%;
float: left;
text-align: center;
font-family: Arial;
color: #F0F0F0;
}
#cloud {
background-color: #C3D7DF;
}
#lock {
background-color: #6991AC;
}
#headset {
background-color: #C3D7DF;
}
#truck {
background-color: #6991AC;
}
.one-fourth i { /*--Icons at one fourth blocks--*/
color: #F0F0F0;
font-size: 410%;
padding: 13% 0 4% 0;
}
article {
float: left;
margin: 0 auto;
width: 50%;
height: auto;
}
#sec-1 {
background-color: #FFFFFF;
}
aside {
float: right;
margin: 0 auto;
width: 50%;
height: auto;
}
.one-third {
width: 33.3333333%;
float: left;
text-align: center;
color: #FFFFFF
}
#google{
background-color: #A2B1C1;
}
#marketing {
background-color: #BEB9AD;
}
#customers {
background-color: #AADCD2;
}
/*--Start Footer--*/
footer {
background-color: #4682B4;
width: 100%;
}
.social {
list-style-type: none;
text-align: center;
}
.social li {
display: inline;
}
.social i { /*--icons--*/
font-size: 220%;
padding: 3% 3% 3% 2%;
color: #C3D7DF;
}
.social i:hover {
color: F5F5F5;
}
footer.second { /*--Socket--*/
border-top: 1px solid #AADCD2;
background-color: #544B59;
max-height: 55px;
text-align: center;
margin: 0;
}
footer.second p {
padding: 5px 0 9px 0;
text-align: center;
}
.carouselbox {
font-family: helvetica,sans-serif;
font-size: 14px;
width: 100px;
position: relative;
margin: 1em;
border: 1px solid #ccc;
box-shadow: 2px 2px 10px #ccc;
overflow: hidden;
}
.content {
margin: 0;
padding: 0;
}
.content li {
font-size: 100px;
margin: 0;
padding: 0;
width: 100%;
list-style: none;
text-align: center;
}
.new-inner {
height: 800px;
width: 100%;
float: left;
background-color: #FFFAFA;
font-family: Arial;
}
.nip1 {
width: 40%;
}
/*---------Insert Slideshow stuff below------*/
.cycle-slideshow{
width: 100%;
display: block;
position: relative;
margin: 0 auto;
overflow: hidden;
}
.cycle-prev, .cycle-next {
font-size: 200%;
color: #FFF;
top: 50%;
display: block;
position: absolute;
z-index: 9999;
cursor: pointer;
}
.cycle-prev {left: 10%;}
.cycle-next {right: 10%}
.cycle-pager{
width: 100%;
text-align: center;
display: block;
position: absolute;
bottom: 20px;
z-index: 9999;
cursor: pointer;
}
.cycle-pager span {
text-indent: 100%;
white-space: normal;
width: 12px;
height: 12px;
display: inline-block;
border: 1px solid #FFF;
border-radius: 50%;
margin: 0 10px;
}
.cycle-pager .cycle-pager-active {background: #FFF;}
/*------------MEDIA QUERIES ARE NOW STARTING-------------*/
#media screen and (max-width: 768px){
p {
font-size: 250%;
}
h3{
font-size: 260%;
}
header{
width: 100%;
}
#logo {
margin: 15px 0 20 -25px;
background: url(img/RD_mobile.png) no-repeat center;
float: left;
width: 170px;
height: 60px;
}
#menu-icon {
display: inline-block;
}
nav ul, nav:active ul {
display: none;
z-index: 1000;
position: absolute;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}
nav:hover ul {
display: block;
}
nav li {
text-align: center;
width: 100%;
padding: 10px 0;
}
.one-fourth {
float: left;
width: 100%;
font-size: 30%;
}
.one-fourth i {
font-size: 500%;
padding: 4% 0 1% 0;
}
article {
width: 100%;
}
aside {
width: 100%;
}
.hand-mobile {
display: none;
}
.social i {
font-size: 100%;
}
}
Maybe try to change the media queries nav to position: relative;
EDIT:
Try this instead, change the display: none to inline:
nav ul, nav:active ul {
display: inline;
z-index: 1000;
position: relative;
padding: 20px;
background: #6991AC;
right: 20px;
top: 60px;
border: 1px solid #FFF;
border-radius: 2px 0 2px 2px;
width: 50%;
}

Z-index/layering issues

z-index doesn't seem to work for me. I've googled but can't seem to find the problem.
I want the .navigation css class to have a lower z-index than the css class .mobilenav and .mobilenavclosed so that these classes are layered above the other.
How can I accomplish this? I have tried both changing the position of the elements and changing the z- index but nothing seems to work.
Thank you!
This is my html
<div class="navWrapper" ng-controller="NavController">
<section class="navigation">
<div class="nav-container">
<button ng-click="openHamburger()" class="hamburger"><span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span></button>
<nav>
<ul class="nav-list" ng-repeat="navitem in navitems">
<li>
{{navitem.title}}
</li>
</ul>
</nav>
</div>
</section>
<div ng-class="{'mobilenav': isOpen, 'mobilenavclose': isClosed}">
<button ng-click="closeHamburger()" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
</button>
<div class="menuwrapper">
<button class="optionwrapper" ng-repeat="navitem in navitems">
<div class="navicon"></div>
<p>{{navitem.title}}<p>
</button>
</div>
</div>
This is my css
#keyframes active {
from {
border-bottom: 0px solid #5aaafa;
}
to {
border-bottom: 5px solid #5aaafa;
}
}
body,
html {
height: 100%;
margin: 0 auto;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
color: red;
}
.menuwrapper {
display: none;
}
button.btn.btn-default {
display: none;
}
.navWrapper {
height: 100vh;
width: 100vw;
}
.activeindicator {
width: 100%;
height: 10%;
background: #5aaafa;
}
.hamburger {
display: none;
}
.close {
display: none !important;
}
.navhidden {
display: none !important;
}
.navigation {
width: 100%;
height: 50px;
background: #333;
color: white;
position: relative;
z-index: 1;
}
.navigation a {
color: white;
text-decoration: none;
font-weight: 300;
}
.navigation a:hover {
color: #ffffff;
text-decoration: none;
border-bottom: 5px solid #5aaafa;
}
.nav-container {
margin: 0 auto;
padding: 0px 0px;
height: 100%;
position: relative;
}
nav {
display: inline-block;
font-size: .9em;
text-transform: uppercase;
font-weight: 700;
height: 100%;
position: absolute;
left: 23vw;
right: 23vw;
}
nav ul {
list-style: none;
text-align: left;
margin: 0;
padding: 0px;
height: 100%;
display: inline-block;
}
nav ul li {
float: none;
height: 100%;
}
nav ul li a {
display: block;
color: #a9a9a9;
padding: 0 20px;
background: #333;
height: 100%;
padding-top: 17px;
}
nav ul li a:hover,
nav ul li a:focus,
nav ul li a:active {
text-decoration: none;
color: #ffffff;
border-bottom: 5px solid #5aaafa;
animation: active;
animation-duration: 0.2s;
animation-timing-function: linear;
}
nav ul li > a:hover {
color: #ffffff;
}
nav ul li > a:not(:only-child):after {
padding-left: 4px;
content: ' ▾';
}
/* Mobile navigation */
.nav-mobile {
display: none;
position: absolute;
top: 0;
right: 0;
background: #262626;
height: 100%;
width: 70px;
}
#media only screen and (max-width: 1389px) {
nav {
left: 20vw;
right: 20vw;
}
}
#media only screen and (max-width: 1250px) {
nav {
left: 17vw;
right: 17vw;
}
}
#media only screen and (max-width: 1172px) {
nav {
left: 15vw;
right: 15vw;
}
}
#media only screen and (max-width: 1075px) {
nav {
left: 12vw;
right: 12vw;
}
}
//*IPAD VIEW
#media only screen and (max-width: 1000px) {
#keyframes openHamburger {
from {
width: 0vw;
}
to {
width: 40vw;
}
}
#keyframes closeHamburger {
from {
width: 40vw;
}
to {
width: 0vw;
}
}
nav ul,
nav li,
nav a {
display: none;
}
.hamburger {
display: inline;
background: none;
border: 0px;
height: 100%;
width: 8%;
padding: 0px;
}
.mobilenav.mobilenavclose {
height: 100vh;
background: #5aaafa;
width: 0vw;
margin: 0px;
animation: closeHamburger;
animation-duration: 0.7s;
position: relative;
z-index: 10;
}
.menuwrapper {
height: 32vw;
width: 33vw;
display: block;
position: inherit;
padding: 0px;
margin:0 auto;
top: 32vh;
}
.mobilenav {
height: 100vh;
background: #5aaafa;
width: 40vw;
margin: 0px;
animation: openHamburger;
animation-duration: 0.7s;
position: relative;
z-index: 10;
}
.navicon {
height: 7vw;
width: 7vw;
border: 2px solid white;
border-radius: 17vw;
margin: auto;
}
.optionwrapper {
text-align: center;
display: table-cell;
background: none;
border: none;
height: 11vw;
width: 11vw;
p {
color: white;
margin: 0px;
padding-top: 5%;
text-transform: uppercase;
font-size: 0.7em;
}
}
button.btn.btn-default {
display: inline !important;
background: none;
border: 0px;
top: 2%;
right: 5%;
position: absolute;
color: white;
font-size: 20px;
}
}
//*MOBILE VIEW
#media only screen and (max-width: 600px) {
#keyframes openHamburger {
from {
width: 0vw;
}
to {
width: 90vw;
}
}
#keyframes closeHamburger {
from {
width: 90vw;
}
to {
width: 0vw;
}
}
.mobilenav.mobilenavclose {
height: 100vh;
background: #5aaafa;
width: 0vw;
margin: 0px;
animation: closeHamburger;
animation-duration: 0.7s;
position: relative;
}
.mobilenav {
height: 100vh;
background: #5aaafa;
width: 90vw;
margin: 0px;
animation: openHamburger;
animation-duration: 0.7s;
position: relative;
}
.menuwrapper {
height: 78vw;
width: 72vw;
display: block;
position: inherit;
padding: 0px;
margin:0 auto;
top: 24vh;
}
.optionwrapper {
text-align: center;
display: table-cell;
background: none;
border: none;
height: 26vw;
width: 24vw;
p {
color: white;
margin: 0px;
padding-top: 10%;
text-transform: uppercase;
font-size: 0.8em;
}
}
.navicon {
height: 17vw;
width: 17vw;
border: 2px solid white;
border-radius: 17vw;
margin: auto;
}
}
if you want them to be layered, your bottom layer needs to be relative, but .mobilenav and .mobilenavclosed should be position: absolute; ? At least that's how the layering I do is done.
.mobilenav.mobilenavclose {
height: 100vh;
background: #5aaafa;
width: 0vw;
margin: 0px;
animation: closeHamburger;
animation-duration: 0.7s;
position: absolute;
z-index: 10;
}
as well .navigation shouldn't need a z index since it is too be the bottom?

How do I create a mobile nav-bar (position: fixed) with an <img> tag right under it?

I am working on a mobile responsive website.
I have the navigation menu with the fixed position.
Right after I close the nav-menus div I have an image that has to be right under it. The thing is that the image goes under the fixed div of the menu.
What is the solution for this?
I want the yellow banner to be fully visible under the nav bar. now it's just under + behind it.
This is an example of what I have :
HTML code:
<!DOCTYPE html>
<html >
<body style="height:100%;">
<div data-role="panel" id="menu" class="" style="padding: 45px 0; margin: 0; " >
<div class="ui-panel-inner">
// the main menu in the background
</div>
</div>
<div id="superDiv" style="background-color: white; -webkit-transition: width 2s; transition: width 2s; height: 130%; ">
<div class="main" style="height: 100%;">
<div class="sidebar">
// menu items
</div>
<div class="header_space"></div> // I used this but it's now working good with precentages..
<img src="banner.png" id="mob-banner"/> // this is the banner
<div class="dynamicPage">
// content of the page..
</div>
</div>
</div>
</body>
</html>
The CSS code:
/******************/
/*** MOBILE ******/
/****************/
.header_space{
display: none;
height: 5.1%;
}
#mob-menu-btn{
display: none;
}
.sub-menu{
display: none;
}
#mob-home-btn{
display: none;
}
#mob-logo{
display: none;
}
#mob-banner{
display: none;
}
.makeFixed{
position: fixed;
}
/*****************************************************************/
#media (max-width: 604px) {
.main{
width: 100%;
/*overflow: hidden;*/
overflow-x: hidden;
}
.sidebar{
float: initial;
width: 100%;
padding: 0;
position: fixed;
z-index: 100;
background-image: url('top_background.png');
text-decoration: none;
}
.header_space{
display: inherit;
height: 4.7%;
}
.sports{
/*display: none;*/
padding: 0 ;
background-color: #fff;
margin: 0;
width:100%;
}
.list{
width: 100%;
overflow: hidden;
overflow-y: auto;
top: -10%;
overflow: hidden;
overflow-y: auto;
height: 880%;
display: none;
}
.sports li{
list-style-image:none;
list-style-type: none;
border-bottom: 2px solid #eeeeee;
margin-bottom: 0px;
margin-left: 0px;
/*padding-top: 15px;
padding-bottom: 15px;*/
padding-left: 10px;
width:100%;
font-family: arial;
text-decoration: none;
overflow: hidden;
/*height: 27px;*/
z-index: 100;
}
.sports a li {
text-decoration: none;
}
.sports2{
display: none;
margin-bottom: 0;
overflow: hidden;
}
.sub-menu{
display: inherit;
float: left;
cursor: pointer;
width: 30px;
/*margin-right: 20px;*/
position: relative;
bottom: 7px;
z-index: 900;
position: relative;
top: 7px;
padding-right: 17px;
}
.sports2 li{
list-style-image:none;
list-style-type: none;
border-bottom: 0px solid #eeeeee;
margin-bottom: 0px;
margin-left: 0px;
/*padding-top: 15px;
padding-bottom: 15px;*/
padding-left: 0px;
width:100%;
font-family: "arial";
text-decoration: none;
overflow: hidden;
}
.sports2 div{
padding: 15px 0;
}
#mob-menu-btn{
float: right;
width: 10%;
display: inherit;
cursor: pointer;
margin-top: 0.8%;
}
#mob-home-btn{
display: inherit;
cursor: pointer;
margin-top: 0.8%;
width: 10%;
float: left;
}
#mob-logo{
display: inherit;
text-align: center;
margin: 0.2% auto;
width: 30%;
}
#mob-banner{
display: inherit;
}
.banner{
display: none;
}
.content{
width:100%;
background-color: white;
}
.logo{
padding-top: 1px;
}
#cat-header{
display: none;
}
.line{
display: none;
}
.table {
width: 100%;
}
#top-pages{
display: none;
}
.top-pages{
display: none;
}
.category-link{
float:left;
padding-top: 25px;
width: 510px;
padding: 15px 0;
}
.content h1 {
color:#031c3f;
font-size:24px;
text-align: left;
font-family: "UScoreRGK";
margin-left: 7px;
}
.content p {
margin-left: 10px;
margin-right: 10px;
}
#active_line{
margin-left: 10px;
margin-right: 10px;
}
#menu {
z-index: 0;
top: 0px;
position: absolute;
/*right: 0px!important;
left: auto!important;*/
}
#menu li {
list-style: none!important;
}
}
#media (min-width : 414px) and (max-width : 533px) {
.category-link{
width: 460px;
}
}
#media (min-width : 375px) and (max-width : 414px) {
.category-link {
width: 340px;
}
.wcmText ul, ol{
margin: 0 0 1em -2.5em;
}
.wcmText p{
margin-top: 0;
}
.wcmText h1, h2{
margin-top: 0;
margin-bottom: 0;
font-size: 110%;
}
}
#media (min-width : 360px) and (max-width : 375px) {
.category-link {
width: 282px;
}
.sidebar{
height: 38px;
}
}
#media (min-width : 320px) and (max-width : 360px) {
.wcmText ul, ol{
margin: 0 0 1em -2.5em;
}
.wcmText p{
margin-top: 0;
}
.wcmText h1, h2{
margin-top: 0;
margin-bottom: 0;
font-size: 110%;
}
}
#media (min-width : 240px) and (max-width : 320px) {
.sidebar{
background-image: url('top_background-320-2.png');
height: 52px;
}
#mob-menu-btn {
width: 7%;
margin-top: 4.8%;
margin-right: 4%;
}
#mob-home-btn {
width: 7%;
margin-top: 4.8%;
margin-left: 4%;
}
#mob-logo {
margin: 2% auto;
width: 45%;
}
.header_space {
height: 52px;
}
.list {
width: 99.5%;
overflow: hidden;
overflow-y: auto;
top: -9%;
overflow: hidden;
overflow-y: auto;
height: 803%;
}
.sports li {
width: 96%;
}
.content h1 {
color:#031c3f;
font-size:24px;
text-align: left;
font-family: "UScoreRGK";
margin-left: 7px;
}
.content p {
margin-left: 10px;
margin-right: 10px;
}
.category-link{
float:left;
padding-top: 25px;
width: 230px;
padding: 15px 0;
}
}
It looks like the only thing you are missing to make the ".header_space" work is to add
style="height: 100%;" to your HTML tag
<html style="height: 100%;">
or in your CSS
html { height:100% }
all your height properties, for example "height:100%" on the BODY tag, are not working.
although, i don't think your solution is an elegant one.
I would prefer to add
#media (max-width: 604px) {
/* lets say 50px is the height of your mobile menu */
#mob-banner { margin-top: 50px; }
}
to the the media query that handles your mobile views, instead of
<div class="header_space"></div>

Website not rendering correctly in IE - Just cannot get it right. :(

I have been trying to days now to get this website completed ... however, when viewing it in IE (compatibility mode) the header is all messed up. :(
The website is here: http://nageela.einfal.com/
This is actually the first design I've converted into a Wordpress theme, so it's been very challenging.
If anyone has any suggestions, I'd really appreciate it, I've grown so very frustrated with this! I'm not an IE user myself, though the client is it seems.
Thanks,
Jennifer
Your layout breaks mostly because of positioning issues in IE7 (and IE6). See the attached css, the lines I have changed is marked /*FIXED*/.
/*
Theme Name: Camp Negeela
Author: Mafiakitty Web Design & Development
Author URI: http://www.mafiakitty.com/
Description: Custom Theme
Version: 1.0
Tags: custom, canada, mafiakitty, design, creative
*/
* {
margin: 0;
padding: 0;
outline: none;
}
a:link, a:visited, a:active {
color: #630001;
}
a:hover {
color: #134077;
}
html, body {
height: 100%;
}
body {
background-color: #f7921e;
font-family: Verdana, Arial, Helvetica, san-serif;
font-size: 12px;
color: #666;
line-height: 1.8;
}
.newcampers {
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/campers.png);
width: 518px;
height: 19px;
margin-left: 58px;
cursor: default;
top: 230px;
position: absolute;
}
.bed {
background-color: #e4e2d6;
margin: 0 auto 0 auto;
border-left: 1px solid #333333;
border-right: 1px solid #333333;
}
#wrapper {
position: relative;
width: 960px;
margin-left: auto;
margin-right: auto;
}
.floatleft {
float: left;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/left.png);
margin-top: 0;
width: 43px;
height: 182px;
margin-left: 1px;
position: absolute; /* FIXED */
}
.floatright {
float: right;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/leaves-top.png);
background-repeat: no-repeat;
margin-top: 0;
width: 488px;
height: 334px;
right: -10px;
position: absolute;
}
.photo {
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/photo.png) no-repeat;
width: 275px;
height: 263px;
margin-right: 62px;
margin-top: 50px;
position: absolute; /* FIXED */
right: 0;
}
.board {
float: right;
background: url(http://nageela.einfal.com/wp-content/themes/nageela//img/bg.png);
margin-top: -10px;
width: 379px;
height: 500px;
}
.board div.video {
float: right;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/video.png);
background-repeat: no-repeat;
width: 62px;
height: 108px;
margin-top: 207px;
margin-right: 175px;
}
.board a {
display: block;
width: 100%;
height: 100%;
text-decoration: none;
cursor: pointer;
}
.board div.free {
float: right;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/free.png);
background-repeat: no-repeat;
width: 141px;
height: 74px;
margin-top: -215px;
margin-right: 135px;
}
.board div.pic {
float: right;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/pic.png);
background-repeat: no-repeat;
width: 61px;
height: 13px;
margin-top: 136px;
margin-right: 272px;
}
.board div.sign {
float: right;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/sign.png);
background-repeat: no-repeat;
width: 138px;
height: 46px;
margin-top: -203px;
margin-right: 15px;
}
#header {
height: 262px;
background: #e4e2d6 url(http://nageela.einfal.com/wp-content/themes/nageela/img/hdbg.jpg);
margin-top: 0;
padding: 0;
}
/*FIXME*/
a.logo {
width: 570px;
height: 76px;
margin-top: 37px;
margin-left: 0px;
background: url(http://nageela.einfal.com/wp-content/themes/nageela/img/logo.png);
position: absolute;
float: left;
left: 55px; /* FIXED */
}
a.logo span {
display: none;
}
#content {
width: 520px;
float: left;
margin-left: 24px;
padding-top: 5px;
clear: both;
padding-left: 10px;
/*margin-top: -52px; FIXED*/
display: inline;
}
.post {
width: 520px;
margin-bottom: 50px;
margin-top: 0px;
}
.post h2 a {
color: #24446b;
font-weight: normal;
text-decoration: none;
font-size: 24px;
}
.post span.post-info {
color: #CCCCCC;
font-size: 10px;
padding-bottom: 10px;
width: 560px;
float: left;
}
.post p {
line-height: 22px;
margin-bottom: 10px;
}
.post div.cats {
border-top: 1px solid #ececec;
padding-top: 10px;
}
#sidebar {
width: 379px;
float: right;
margin-right: 0px;
}
#footer {
clear: both;
width: 960px;
height: 350px;
background: #e4e2d6 url(http://nageela.einfal.com/wp-content/themes/nageela/img/footer.jpg);
margin-bottom: 0px;
padding: 0px;
margin-left: 0px;
}
/*
.comments template styles
*/
.comments {
float: left;
padding: 0;
}
.comments input[type=text], textarea {
width: 350px;
}
textarea {
width: 450px;
}
.comments fieldset {
padding: 20px;
border: 1px solid #CCC;
margin: 10px 0 20px 0;
}
.comments p {
padding: 0 0 10px 0;
}
.comments h2 {
padding: 0 0 15px 0;
}
.aligncenter, div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.alignleft {
float: left;
}
.alignright {
float: right;
}
img.avatar {
float: right;
}
.newspaper {
float: right;
background: url(img/newspaper.png) bottom;
background-repeat: no-repeat;
width: 382px;
height: 350px;
padding-bottom: 0px;
margin: 0px;
}
.inner {
width: 382px;
height: 300px;
text-align: center;
margin-bottom: 0px;
padding-bottom: 0px;
}
#dropmenu, #dropmenu ul {
top: -80px;
list-style-type: none;
list-style-position: outside;
position: relative;
line-height: 1.5em;
z-index: 200;
width: 100%;
font-weight: bold;
}
#dropmenu {
position: absolute;
top: 180px;
}
#dropmenu a {
display: block;
padding: 0.25em 1em;
color: #f7921e;
text-decoration: none;
}
#dropmenu a:hover {
background: #711a19;
color: #fff;
}
#dropmenu li {
float: left;
position: relative;
}
#dropmenu ul {
position: absolute;
display: none;
width: 12em;
top: 1.9em;
left: -1px;
}
#dropmenu ul a {
border-left: 1px solid #c8c8c8;
background: #10253a;
}
#dropmenu li ul {
border-top: 1px solid #c8c8c8;
width: 14.1em;
}
#dropmenu li ul a {
width: 12em;
height: auto;
float: left;
border-bottom: 1px solid #c8c8c8;
}
#dropmenu ul ul {
top: auto;
}
#dropmenu li ul ul {
left: 12em;
margin: 0px 0 0 10px;
}
#dropmenu li:hover ul ul, #dropmenu li:hover ul ul ul, #dropmenu li:hover ul ul ul ul {
display: none;
}
#dropmenu li:hover ul, #dropmenu li li:hover ul, #dropmenu li li li:hover ul, #dropmenu li li li li:hover ul {
display: block;
}
#contact-area {
width: 300px;
margin-left: 320px;
float: right;
position: absolute;
bottom: 40px;
}
#contact-area input, #contact-area textarea {
background-color: #61502c;
padding: 1px;
width: 125px;
font-family: Helvetica, sans-serif;
font-size: 1.2em;
margin: 5px 0px 5px 0px;
border: 2px solid #61502c;
color: #372d24;
}
#contact-area textarea {
height: 90px;
}
#contact-area textarea:focus, #contact-area input:focus {
border: 2px solid #630001;
}
#contact-area input.submit-button {
width: 61px;
height: 13px;
float: right;
background: url(img/submit.png) 0 0 no-repeat;
border: 0px;
cursor: pointer;
text-indent: -9999px;
}
label {
float: left;
text-align: right;
margin-right: 15px;
width: 100px;
padding-top: 5px;
font-size: 1.2em;
color: #e4e2d6;
}
#contact-area .formin {
background: url(img/form.png);
width: 137px;
height: 37px;
position: absolute;
top: -53px;
left: 50px;
}
.contactin {
background: url(img/contact.png);
width: 270px;
height: 39px;
position: absolute;
top: -54px;
margin-left: -258px;
}
.contactin p {
float: left;
margin: 18%;
border: 0px ;
width: 80%;
display: inline;
font-family: Helvetica, sans-serif;
font-size: 1.2em;
line-height: 2.2;
color: #ffffff;
}
.contactin a:link {
color: #f6d60b;
}
/* rotator in-page placement */
div#rotator {
height: 245px;
position: absolute; /* FIXED */
left: 640px; /* FIXED */
top: 65px; /* FIXED */
}
/* rotator image style */
div#rotator ul li img {
border: 1px solid #ccc;
padding: 4px;
background: #FFF;
}
/* rotator css */
div#rotator ul li {
float: right;
position: absolute;
list-style: none;
}
div#rotator ul li.show {
z-index: 500
}