Solved

HTML for SmartPhone

Posted on 2011-09-13
7
254 Views
Last Modified: 2012-05-12
Can someone help me get this content to neatly fill a mobile device? It's shifted a bit to the right and not quite size correctly.

http://www.pvplayerspizza.com/mobile

0
Comment
Question by:webdork
  • 3
  • 3
7 Comments
 
LVL 40

Expert Comment

by:gurvinder372
ID: 36534008
what exactly is supposed to be shifted to the right?
0
 

Author Comment

by:webdork
ID: 36535727
The whole page is about 15 px too far right and needs to be centered. If you zoom out of the page it fits. I would like it to fit without needing to zoom out.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 36536887
Fix this first:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.pvplayerspizza.com%2Fmobile%2F&charset=%28detect+automatically%29&doctype=Inline&group=0

You almost certainly want to start with HTML that will pass STRICT validation.  Then you can use CSS to style it for the smart phone.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 

Author Comment

by:webdork
ID: 36536953
Thanks Ray,

Done

What next?
0
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
ID: 36537182
I think I would want to make it pass STRICT instead of Transitional, but that may be beside the point.

The general advice I get when I ask designers about mobile devices is "code in percentages."  Getting rid of the tables might be a good start, then using CSS to style the elements so that they do not take up a specific width.  In other words, wherever you have specific dimensions, remove them (including image tags).  I would be on guard against things like this...

<table border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
      <td valign="middle" ><div id = "UtilityNav" align="center"><a href="default.asp">Home</a></div></td>
      <td width="123"><div align="center"><a href="tel:5304328040"><img src="images/logo4.png" alt="PV Players Pizza" width="123" height="78" border="0" /></a></div></td>
      <td valign="middle"><div id = "UtilityNav2" align="center"><a href="../default.asp">Full Site</a></div></td>
    </tr>
</table>

It's a lot of work to get good CSS the first time, but the flexibility and results are more than worth the effort.
0
 

Author Comment

by:webdork
ID: 36537207
Ok... good advice.
0
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 36537223
Thanks for the points.  We have a local developers group here in Washington, DC that focuses on mobile apps. You might want to look for one in your area.  Great intellectual cross-pollination!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
wordpress issue 2 22
regex expression 9 23
Retrieve values of an HTML form using JQUERY 2 18
CSS measurement 10 17
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
I've been asked to discuss some of the UX activities that I'm using with my team. Here I will share some details about how we approach UX projects.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

762 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

18 Experts available now in Live!

Get 1:1 Help Now