Web page moves horizonatally in the Iphone 7 - html

I see that the website home page horizontally moves when a user scrolls the page.
Below is the URL:
https://tandcity.dk/da/
I have tried the below CSS
body{
overflow: hidden;
}
html{
overflow: hidden;
}
I added some meta tags. You can check on view source.
Can someone please help me to fix this.

Remove this from body tag:
body {
/* overflow: hidden; */
/* width: 100vw; */
/* height: 100vh; */
}
For Mobile:
On this class .vc_grid.vc_row.vc_grid-gutter-15px .vc_pageable-slide-wrapper remove margin-right: -15px replace with margin-right: 0px if you want to.
Afrter that replace .vc_grid.vc_row.vc_grid-gutter-15px .vc_grid-item , padding-right: 15px; with padding-right: 0px;
Remember for this mobile chages to take affect you have to add it within an #media query.
Example: Where you add the custom css, add this before the closing tag
#media (max-width: 480px) {
.vc_grid.vc_row.vc_grid-gutter-15px .vc_pageable-slide-wrapper {
margin-right: 0px;
}
.vc_grid.vc_row.vc_grid-gutter-15px .vc_grid-item {
padding-right: 0px;
}
}
For iphone 7 :
/* Portrait and Landscape */
#media only screen
and (min-device-width: 414px)
and (max-device-width: 736px)
and (-webkit-min-device-pixel-ratio: 3) {
.vc_grid.vc_row.vc_grid-gutter-15px .vc_pageable-slide-wrapper {
margin-right: 0px;
}
.vc_grid.vc_row.vc_grid-gutter-15px .vc_grid-item {
padding-right: 0px;
}
}

Related

How can i use containers for sites that are close to the edge?

.container {
padding-left: 15px;
padding-right: 15px;
margin-left: auto;
margin-right: auto;
}
/* Small */
#media (min-width: 768px) {
.container {
width: 750px;
}
}
/* Medium */
#media (min-width: 992px) {
.container {
width: 970px;
}
}
/* Large */
#media (min-width: 1200px) {
.container {
width: 1170px;
}
}
I tend to use containers everywhere To middle content in different devices and keep it balanced (media) like min-width 1200px {width: 1200px}etc. However when I try to style a site that begins from the edges. it comes in the middle which does not help in these kinds of sites.
what should I do?
If you are going to say get rid of containers, I do not know how to work without them Can you tell me what to do instead of the containers that I tend to use?

Use Mobile menu (burger) on mobile and tablet sizes for a foundation 5 site

I'm sure this has been asked but I can't seem to find an example that isn't using SASS. I just have a regular CSS file that I'm working with. I want the burger menu to change to the horizontal menu on the larger size.(#media only screen and (min-width: 64.063em)) I've seen a few posts saying to update the settings.scss file like this(http://foundation.zurb.com/forum/posts/1483-customize-topbar-breakpoint-in-scss) but again I'm not using SASS for this project. I just can't seem to figure out what is triggering the menu to change from mobile to desktop: media queries or javascript.
If you want to use CSS you can override the Foundation CSS in a separate CSS file (ie:styles.css) section that follows the foundation.css
Demo on Codeply
#media only screen and (max-width: 64.063em) {
.top-bar {
overflow: hidden;
height: 2.8125rem;
line-height: 2.8125rem;
position: relative;
background: #333;
margin-bottom: 0;
}
.top-bar-section {
left: 0;
position: relative;
width: auto;
transition: left 300ms ease-out;
}
.top-bar-section ul {
padding: 0;
width: 100%;
height: auto;
display: block;
font-size: 16px;
margin: 0;
}
.top-bar .toggle-topbar.menu-icon {
top: 50%;
margin-top: -16px;
display:block;
}
.top-bar .title-area {
float: none;
}
}
http://codeply.com/go/OtVVMn0n6V
If you don't want to use SASS, then you'd better change foundation.css file.
Around line 1682 change it from
meta.foundation-mq-topbar {
font-family: "/only screen and (min-width:40.063em)/";
width: 40.063em;
}
to
meta.foundation-mq-topbar {
font-family: "/only screen and (min-width:64.063em)/";
width: 64.063em;
}
Also around line 2006, change it from
#media only screen and (min-width: 40.063em) {
To
#media only screen and (min-width: 64.063em) {

Mobile/Desktop media query not working on cell phone

Last night I worked on making my site mobile optimized. When a user is on a device with less than 684px it should show the mobile nav div and hide the sidebar div. I have tested this as working on my computer (by shrinking chrome like an accordion). I also checked https://www.google.com/webmasters/tools/mobile-friendly/?url=www.kisnardonline.com to see my status, but it says my site is not mobile friendly(I realize my links together is likely valid/viewport too). I will make the links more spread once I get it working overall. Thanks for any help!
Here is my code(http://www.kisnardonline.com/wp-content/themes/mytheme/style.css):
#wrapper {
display: block;
min-width: 684px;
max-width: 1200px;
width: 98%;
margin: 0px auto; }
#media screen and (max-width: 684px) {
#wrapper {
min-width: 0px; /* show under 684px - mobile */
}
}
#content {
width: 74%;
float: right; }
#media screen and (max-width: 684px) {
#content {
width: 100%; /* show under 684px - mobile */
}
}
#mobilenav {
display: none;
margin: 15px auto;
padding: 10px 10px 10px 10px;
border-radius:20px;
border:3px solid #a1a1a1;
background:#1C2939; }
#media screen and (max-width: 684px) {
#mobilenav {
display: block; /* show under 684px - mobile */
}
}
#sidebar {
display: block;
width: 23%;
min-width: 170px;
max-width: 210px;
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
float: left; }
#media screen and (max-width: 684px) {
#sidebar {
display: none; } /* hide under 684px - mobile */
}
Here is my desktop (greater than 684px view):
Here is my desktop (less than 684px view):
Here is my mobile view(Samsung Galaxy S6):
For responsive pages you need to add a viewport tag which tells the device how to display the content:
<meta name="viewport" content="width=device-width, initial-scale=1">
For your other question, the "request desktop site" won't work the way you have it set up. That feature is for if you have 2 separate sites(one for mobile and one for desktop). For instance the mobile site would be m.kisnardonline.com and would have different files than the desktop site.

How to edit css margin-top for a text in mobile version

I want to edit the margin-top of a text in the mobile device. I have come this far but I know there is something crazy in the code:
.Foljoss {
padding-left: 18px;
background: #fff;
}
#media screen and
(max-width: 768px; margin-top:17px)
It is the last part in which I dont get it. How can I adjust the top margin for the <div class="Foljoss"> on the mobile version? Notice that the #media screen-part is not correct.
You need to wrap the css inside a selector inside the media query.
#media screen and (max-width: 768px) {
.Foljoss {
margin-top: 17px;
}
}
body {
background-color: lightgreen;
}
.show-on-mobile {
display: none;
}
#media screen and (max-width: 568px) {
.show-on-mobile {
display: block;
}
.hide-on-mobile {
display: none;
}
body {
background-color: lightblue;
}
}
<div class="show-on-mobile">Only visible when width is <= 568px</div>
<div class="hide-on-mobile">Disappears when screen width > 568px</div>
/* 767 is max for mobile */
#media screen and (max-width: 767px) {
.Foljoss {
margin-top: 17px;
}
}

Iphone responsive website issue

I am creating a new website, here is the www.qldmetals.com
Everything seems to be fine on website except its responsiveness on iPhone. In iPhone the logo sits over the navigation menu. I tried the following media query, but it doesn't seems to be working for me i.e
#media only screen
and (min-device-width : 320px)
and (max-device-width : 568px) { .logo a.brand { display: block !important; }}
I'm confuse, Is this error because of display method or anything else (like I have to use media query for any other class)
I appreciate your help and your valuable time.
Thank you.
I have seen your website and after that i have created some of my own style element which i am sharing it's only for media screen max width 480px
Following Code
#media (max-width:480px){
.logo a.brand {
display: block !important;
height: auto;
line-height: 30px;
margin: 0;
overflow: hidden;
padding: 0;
width: auto;
}
.logo a.brand img {
float: none;
height: auto;
margin: 2px 8px 2px 0;
width: 100%;
}
header .logo{
float: none;
max-height: none;
text-align: center;
width: 100%;
}
}