ios 4 website issue media query or viewport - ios4

i have programmed a website, for a client and now im developing a smartphone template.
I used max-device-width as media query to separate smartphone and tablet.
Everythng is working fine, but iphone 4 zooms the website.
I dont know if i defined viewport wrong or is a bug?
Website is:http://mksgmbh.com
I used following Viewport
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densityDpi=device-dpi' name='viewport' />
<meta name="viewport" content="width=device-width" />
I tried to set initial-scale to 1 but it doesnt work too.

As I look at the site now you have mulitple viewport tags. Try removing them all and replacing them with either
<meta name="viewport" content="width=device-width, initial-scale=1.0">
or if you want to prevent user zooming:
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0">
UPDATE
Also, in you media queries you use max-device-width, e.g.
#media only screen and (max-device-width: 760px) {
...
}
Unless you are trying to target specific devices, you could try just
#media only screen and (max-width: 760px) {
...
}
Device width and width aren't the same thing and for responsive design, width will usually get the results you want. This link has some more background info about the differences
Hope this helps!

Related

I can not match the width of my website with mobiles screen

I have a website which I used the meta name="viewport" content="width=device-width" in it . but the width of that is not match with the width of mobile devices (just mobiles ) . what should i do to match it with the mobiles screen ?
Try adding a style that sets the width dependent on the screen:
body {
width: auto;
}
If you're designing for only mobile devices the W3 site has good tutorials: W3.CSS
<!DOCTYPE html>
<html>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3pro.css">
<body>
<!-- Content here -->
</body>
</html>

Twitter card not working

My meta tags for twitter in site:
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="....">
<meta property="twitter:title" content=".....">
<meta property="twitter:description" content="test description">
<meta property="twitter:image" content="....">
I even tried with twitter:image:url and also allowed twitter bot in robot.txt but no luck till now
Use name instead of property in you meta tags Like :
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="....">
<meta name="twitter:title" content=".....">
<meta name="twitter:description" content="test description">
<meta name="twitter:image" content="....">
May I know where did you test if the twitter card is working or not?
Did you check with https://cards-dev.twitter.com/validator?
Also, sometimes the placement of the meta tags do matter, place them early in the head section but after the og (open graph) meta-tags.
Let me know what error you get(if any) on the card validator.
If none of the above works, try changing twitter:image to twitter:image:src and make sure that the image fulfills the size requirements:
smallest size supported
summary: 144x144px
summary_large_image: 300x157px
Largest size supported
In both cases the maximum is 4096x4096px and at most 5MB.
Twitter share url
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:site" content="....">
<meta property="twitter:title" content=".....">
<meta property="twitter:description" content="test description">
<meta property="twitter:image" content="....">
Share Url : SHARE
It will work only on https
Twitter's card validator would return No meta tags found for me until I added the Content-Type: text/html header to the server's response.
From what I gather, Twitterbot doesn't even try to parse the page unless the server responds with the Content-Type it expects to see, which is text/html in this case.

How to make google to point in results to subdirectory?

For most keywords google search results point to main page of my website (like example.com). But I would prefer google to point to pages with stuff specific for the keyword (i.e. keyword "product1" pointed to example.com/product1.html). Pages for specific products are well optimized for the adequate keywords, but results point to main page.
Is it any way to change that?
UPDATE:
My site is about window blinds. I've got main page that contains a general information (i.e. example.com) and many other pages that contain specific information (i.e. example.com/roller_blimds.html). If someone types "roller blinds" in google search box at this moment in results there is link to main page (example.com), and I would prefer it was a link to file connected to rollers: example.com/roller_blinds.html.
I'm not sure if i got your point correctly, but here's some help.
First of all i would like you to try search for Paraleb on google.
This is my own website, and here's the search result
http://i.stack.imgur.com/obXGL.png
As you can see it has the main domain/directory paraleb.com listed at the top, and below it there are subpages, like About, Clients, Contact us, Work.
What i did here is not that hard, i just used metatags on all pages, but make sure to use different keywords and description for each page.
(ex: in the html code of the contact us/or your product's page, but the meta description, a breif description about your product, its title, and the relevant keywords).
Helpful meta-tags i'm using:
<title>Paraleb | Creative Digital Agency</title>
<meta name="description" content="Creative Digital Agency">
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="#paraleb">
<meta name="twitter:title" content="Home">
<meta name="twitter:description" content="Creative Digital Agency">
<meta name="twitter:creator" content="#Paraleb">
<meta name="twitter:image" content="/static/img/social/twitter_360.png">
<meta property="og:title" content="Home" />
<meta property="og:type" content="article" />
<meta property="og:url" content="" />
<meta property="og:image" content="/static/img/social/facebook_og_720.png" />
<meta property="og:description" content="Creative Digital Agency" />
<meta property="og:site_name" content="Paraleb" />

How do I disable auto arrangement of website components on browser zoom?

I am developing a website using Bootstrap v3.3.5. I want the website to zoom in and zoom out like it is an image and not auto arrange itself. How do I do that?
You can achieve this by disabling the responsiveness of bootstrap
Steps to disable page responsiveness
Omit the viewport <meta>
<meta name="viewport" content="width=device-width, initial-scale=1">
Override the width of the .container for each grid
If using navbars, remove all navbar collapsing and expanding behavior.

How to specify your webpage's language so Google Chrome doesn't offer to translate it

I have a page that Google Chrome insists on thinking is in French.
Here's a snapshot of it:
http://yootles.com/outbox/overcleverchrome.html
Note that I'm including a meta http-equiv tag to tell it that it's in fact in English:
<meta http-equiv="Content-language" content="en">
But it doesn't help.
Is there anything else I can do to prevent this?
Google Chrome currently requires several tags to make an (HTML5) document opt out of translation. Before doing this, you should be sure that you know your audience's language, as otherwise it will prevent foreign sites from properly translating your site.
The relevant tags are:
<meta charset="UTF-8" />
<meta name="google" content="notranslate" />
<meta http-equiv="Content-Language" content="en_US" />
And here is a full example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="google" content="notranslate" />
<meta http-equiv="Content-Language" content="en_US" />
</head>
<body>
Dies ist ein Test Deutsch
</body>
I found a post which might help you: http://www.blogsdna.com/4593/how-to-stop-google-from-translating-your-website-or-webpage.htm
You can either use a meta tag:
<meta name="google" value="notranslate">
Or you can use a class:
<span class="notranslate"></span>
I hope that answered your question.
EDIT: I Just checked my blog which I offer in German and English. On each language version Chrome doesn't ask me for translation: http://kau-boys.de
I checked my source code and the multilanguage plugin only included this code:
<meta http-equiv="Content-Language" content="en_US" />
So maybe your locale needs to have a subregion, like US in this example.
You guys should be referencing http://support.google.com/webmasters/bin/answer.py?hl=en&answer=79812 and not guessing what works
<meta name="google" content="notranslate" />
Adding <meta name="google" value="notranslate"> (not W3C by the way) or <meta name="google" content="notranslate"> doesn't avoid the annoying translate popups.
BUT I have tried the following and it seems to work:
You can avoid translation of the page by adding class="notranslate" to the <body> tag!
I have success with <meta name="google" content="notranslate" />
remember to open the page in a new tab or a new window after insert
<meta name="google" value="notranslate">
otherwise it looks not work, but it actually works well.
On an older version of Chrome (18.x), the Content-Language meta tag seems to have no effect on the translation popup, unless it is lowercased:
<meta http-equiv="content-language" content="en" />
(to be clear --http-equiv="Content-Language" did not work; neither did name="content-language")

Resources