Solved

Web Site on iPhone Doesn't Take the Whole Screen

Posted on 2013-12-10
7
393 Views
Last Modified: 2013-12-12
I am trying to create a web site using responsive design. I have a test page set up at http://www.romancestuck.com/test-pages/iphone-font-sizes-with-changes.htm. When I go to it on my iPhone, it just shows the content in a very narrow column on the left side of the screen instead of using the full width of the screen. Could you let me know why this is?

Thanks!
0
Comment
Question by:webstuck5
  • 4
  • 2
7 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
I don't know what you think responsive design is, but you do not have anything on that page to support any concept that could be called responsive.

So I think you need to start with an understanding of the terms:
http://en.wikipedia.org/wiki/Responsive_web_design
Some of the link there will help a lot in undrstanding

Then you need exposure to the difference in mindset to do responsive design:
 http://johnpolacek.github.io/scrolldeck.js/decks/responsive/

Then you need to understand the critical structure format built around media queries:

https://developer.mozilla.org/en-US/docs/CSS/media_queries

Or you can stumble around looking for plugins to implement "responsive design" ideas that someone else has and learn very little except how deal with the frustration of not being in control of your code.

As for iphone, it is always a problem, because Apple thinks they are too superior to follow standards, including not using the standard 96dpi for screens to map screens.

Cd&
0
 

Author Comment

by:webstuck5
Comment Utility
I did add some things to work towards it being responsive. I have also been reading a lot to learn more about it and asking questions on here to learn more. Maybe, if I could start with just getting the answer to my question of why the page only takes a small amount of the width of the iPhone would be helpful.

Thanks!
0
 
LVL 42

Accepted Solution

by:
David S. earned 500 total points
Comment Utility
It seems that the last ad on the page ("#ad_footer_1") has content with a fixed width of 970px. That makes the iPhone fit a page that wide into a screen much less wide then that, hence the effective font-size shrinks.

Putting ads in a responsive layout is a challenge. I'm not aware of any good solution to it. One quick and dirty fix would be to give "max-width:100%" and "overflow:hidden" to the ads.

Do you really think that <br> elements are the most appropriate markup for that page? That sure looks like unordered lists to me. Also why does the page have an <h2> and <h3>s but not an <h1>? If the font-size is too big, use CSS to change it.
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Author Comment

by:webstuck5
Comment Utility
A lot of the HTML problems are because I stripped the page content out of my CMS system to just focus on making it work on mobile devices first. So, when the CMS header and footer code gets added, it will have an <h1> tag. Yeah, the content should probably be in a list format. I was just using an old page as my test page. Thanks for answering my question. That makes a lot of sense! Let me test out your code to make sure it works and then I will award you the points!
0
 

Author Comment

by:webstuck5
Comment Utility
Out of curiosity...you said for a "quick a dirty fix" use "max-width:100%" and "overflow:hidden"  but what is the longer fix...to just use smaller ads? I tried a smaller ad there before but probably since the whole page was being shrunk by mobile safari, it didn't look right.
0
 
LVL 42

Expert Comment

by:David S.
Comment Utility
The other solutions I've heard of are to use smaller ads or to use additional JavaScript code to select ads based on viewport size.
0
 

Author Closing Comment

by:webstuck5
Comment Utility
Thanks so much!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Left menu with a header image 6 34
Login area of a page 4 19
iOS and RAM 7 22
Problem to page 4 17
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now