Go Back   CodingForums.com > :: Client side development > General web building > Building for mobile devices

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-27-2011, 05:04 PM   PM User | #1
kikibu
New to the CF scene

 
Join Date: Jun 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
kikibu is an unknown quantity at this point
[mobile] Scale to device width not working

Hello all. I hope you can help me with the following problem with the mobile version of http://thekind.tk, my band's website.

(direct link for desktops)

As you can probably see, the website isn't that big but on my ipod 4G it appears zoomed out. Of course the first thing I tried was putting this line between my <head>:
Code:
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
But somehow this doesn't do anything for me. Even if I play with the parameters such as putting the scale at 2 or 3, the whole meta thing doesn't seem to affect my site's viewport at all.

Any ideas on how to solve this?

Last edited by kikibu; 06-28-2011 at 01:10 AM..
kikibu is offline   Reply With Quote
Old 06-27-2011, 09:35 PM   PM User | #2
emericana
New Coder

 
Join Date: Jun 2010
Posts: 37
Thanks: 4
Thanked 0 Times in 0 Posts
emericana is an unknown quantity at this point
Try this:

<meta name="viewport" content="width=device-width; minimum-scale=1.0; maximum-scale=1.0" />
emericana is offline   Reply With Quote
Old 06-28-2011, 12:58 AM   PM User | #3
kikibu
New to the CF scene

 
Join Date: Jun 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
kikibu is an unknown quantity at this point
Thanks. I tried a lot of combinations including your suggestion, which is actually in the current version online.

Somehow the <meta> line doesn't do anything for my site. I use it right here:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width; minimum-scale=1.0; maximum-scale=1.0" /> 
<title>THE KIND</title>
Any idea why?
kikibu is offline   Reply With Quote
Old 06-28-2011, 02:44 PM   PM User | #4
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
I believe the margin you left on the body element is the what's causing the issues.
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Old 06-28-2011, 05:05 PM   PM User | #5
kikibu
New to the CF scene

 
Join Date: Jun 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
kikibu is an unknown quantity at this point
Quote:
Originally Posted by Apostropartheid View Post
I believe the margin you left on the body element is the what's causing the issues.
Without margins and center aligns it looks like this

I have tried to set the scale to 2 manually, or a defined width of 320, that all doesn't do anything when I visit the site on my ipod.
kikibu is offline   Reply With Quote
Old 06-28-2011, 08:24 PM   PM User | #6
kikibu
New to the CF scene

 
Join Date: Jun 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
kikibu is an unknown quantity at this point
This is how it looks like with no margins set anywhere, also the DIV Align center is out. Unfortunately it still doesn't work.

I tried removing everything except for The Kind logo and that also doesn't work. I have a feeling that I am overlooking something very simple but can't find what it is!
kikibu is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 06:15 PM.


Advertisement
Log in to turn off these ads.