Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 988459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T05:38:23+00:00 2026-05-16T05:38:23+00:00

I’m having trouble getting my mobile web app to render properly on my iPhone

  • 0

I’m having trouble getting my mobile web app to render properly on my iPhone 4. According to Wikipedia, the iPhone 4 has 960 width x 680 height pixels and the other iPhones have something like 480 width x 340 pixels.

With my current build, the images and CSS styling look really tiny on the iPhone 4.

Here is my code:

<!DOCTYPE html>
<html>
<head>
    <title>mobile</title>
    <link rel="stylesheet" type="text/css" href="iphone.css" media="only screen and (max-width: 480px)" />
     <link rel='stylesheet' href='highRes.css' media='only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)' />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="explorer.css" media="all" />
    <![endif]-->
</head>
<body>
    <div class="nav">
        <div id="threeButtons">
            <div class="navButton" id="friends">
                Friends
            </div>
            <div class="navButton" id="nearby">
                Nearby
            </div>
            <div class="navButton" id="me">
                Me
            </div>
        </div>
        <div id="settingsButton">
        </div>
    </div>
</body>
 </html>

And here is my CSS:

body {
background-color: #ddd; /* Background color */
color: #222;            /* Foreground color used for text */
font-family: "Lucida Grand"; 
font-size: 14px;
margin: 0;              /* Amount of negative space around the outside of the body */
padding: 0;             /* Amount of negative space around the inside of the body */
display: block;

}

div.nav {
    text-shadow: 0px 1px 0px #fff;
    background-image: -webkit-gradient(linear, left top, left bottom, 
                                       from(#e1f7ff), to(#a1d2ed));
    height: 50px;
}

    #threeButtons {
        float: left;
        margin-left: 20px;
        margin-top: 10px;
        margin-bottom: 5px;
    }
        div.navButton {
            float: left;
            height: 30px;
            font-weight: bold;
            text-align: center;
            color: white;
            text-shadow: rgba(0,0,0,0.6) 0px -1px 0px;
            line-height: 28px;
            border-width: 0 8px 0 8px;
            -webkit-border-image: url(images/button.png) 0 8 0 8;

        }

    #settingsButton {
        float: left;
        background-image: url('images/settings.png');
        height: 30px;
        width: 29px;
        margin: 10px 0 5px 60px;
    }

Does anyone have an explanation on how to build for the iphone 4? Should I use these media parameters to reference the CSS:

<link rel="stylesheet" type="text/css" href="iphone.css" media="only screen and (max-width: 480px)" />
     <link rel='stylesheet' href='highRes.css' media='only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2)' />

or should I hardcode the body pixel width in the CSS?

I just checked out this article: http://menacingcloud.com/?c=highPixelDensityDisplays

but I want to hear what other people have done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T05:38:24+00:00Added an answer on May 16, 2026 at 5:38 am

    Try this <meta> tag

    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I want to count how many characters a certain string has in PHP, but
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.