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 8605369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T02:48:49+00:00 2026-06-12T02:48:49+00:00

I have an existing Rails site which is rendering very poorly on iPhone and

  • 0

I have an existing Rails site which is rendering very poorly on iPhone and iPad. I’m unable to pinch the screen and zoom in or out, the images are huge and off the page, and the background does not stretch across the entire width.

At the moment I don’t need the entire site for mobile but I would like the homepage to automatically shrink so that the whole page renders on an iPhone and is sized to automatically fill the screen. Also, I’d like the user to be able to zoom in and out (just like on any other site).

Is there a CSS hack that I can use for this? A piece of code which recognizes the page is being accessed by an iPhone and to render the page according to X & Y dimensions? Something I can just paste into the stylesheet? I wanted to do this without supporting completely new views or html for the mobile device. I’m using Rails and SCSS.

Posted is the SCSS for the homepage:

.main#home {
    background-image:url(blue-back.jpg); 
    width:100%; 
    position:relative;

    #airplane {
        position:absolute; 
        top:-441px; 
        left:40px; 
        font-size:24px; 
        color:white;

        #banner {
            position:absolute; 
            left:0; 
            top:0; 
            background-image: url(home-banner.png); 
            width:590px;
            height:104px; 
            background-repeat:no-repeat;
        }
        #plane {
            position:absolute; 
            left:587px; 
            top:-19px; 
            background-image: url(airplane.png); 
            width:59px;    
            height:39px; background-repeat:no-repeat;
        }
    }
    #welcome {
        position:absolute; 
        top:-327px; 
        left:0px; 
        padding:31px 39px 60px 39px; 
        background-color:$white;    
        @include border-radius(6px); 
        @include box-shadow(0 0 5px rgba(0, 0, 0, 0.5)); 
        width:440px;

        h2 {
            line-height:1.4; 
            font-size:23px; 
            color:$textfont; 
            text-align:center;
        }
        .button-wrapper {
            position:absolute; 
            width:520px; 
            left:0; 
            bottom:-33px; 
            text-align:center;

            div {
                display: inline-block; 
                text-align: center;
            }
        }
    }
    #bottom-actions {
        text-align:center; 
        padding:30px 225px 60px; 
        display:inline-block;

        button { 
            margin: 0 8px; 
            float:left;
        }
    }
}
#grass {
    height:44px; 
    width:100%; 
    border-bottom:15px solid $white; 
    background-image: url(grass.jpg); 
    background-repeat:repeat-x;
}
#home-over {
    position:absolute; 
    top:-13px; left:22px;
}
#vimeo-video {
    text-align: center;

    .vim-video {
        position: relative; 
        border: 12px ridge #253032;
    }
}
#why-use {
    h3 {
        color:$white; 
        font-family:$lobster; 
        width:100%; 
        text-align:center; 
        padding:30px 0 25px 0; 
        @include text-shadow;
    }
    #why-use-wrapper {
        display:inline-block; 
        width:100%;

        .block {
            background-color:$backgray; 
            margin-right:30px; 
            padding:25px; 
            width:270px; 
            position:relative; 
            float:left; 
            @include border-radius(4px);

            img {
                width:100%;
            }
            h4 {
                margin:8px 0 4px; 
                color:$blue
            }
            p {
                line-height:1.5; 
                color:#333333; 
                font-size:14px;
            }
        }
        .block.last {
            margin-right:0px;
        }
    }
}
  • 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-06-12T02:48:50+00:00Added an answer on June 12, 2026 at 2:48 am

    Look into CSS Media Queries, which allow different CSS to be applied depending on the size of the screen.

    Here is an example of css using a media query to set the font size of a h2:

    @media all and (max-width: 1000px) and (min-width: 700px) {
      h2 {
         font-size: 12px;
      }
    }
    

    Here is a good overview with examples of how it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing Ruby on Rails project. How do I find out which
I'm new to rails, and have taken some existing site for new enhancements. I
I have an existing rails backend website which makes json calls to server. Now,I
I have an existing Rails 3 application, to which I am adding a JSON
I have an existing rails application to which i am adding a new controller
I'm new to Rails, but I have an existing Rails application for which I
I have an existing Ruby On Rails, which works fine (I inherited it). I
I have an existing Rails 3.1 application with a model Products with price, description,
I have an existing project written in Ruby on Rails. It is sort of
I have existing Linux shared object file (shared library) which has been stripped. I

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.