Solved

modify mobile site header image for portrait/landscape

Posted on 2013-12-03
3
327 Views
Last Modified: 2013-12-06
Finally got the header image (logo) to work on my mobile site when phone is held portrait. BUT, when you turn phone to landscape, the ipad logo tries to load which is bigger than the mobile logo.  How do I manage this?  See screen shots from emulator (http://ipadpeek.com/)

http://nsitedesigns.com/nsitedesigns/wrb/index.html

landscape (http://m.soundcloud.com/)
http://nsitedesigns.com/nsitedesigns/wrb/index.html

portrait
http://screencast.com/t/ZlWRiF6aqVmy

Ipad
http://screencast.com/t/1Y6kF7p9ze
0
Comment
Question by:nsitedesigns
  • 2
3 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39693636
You should be able to force it by specifying the orientation in a media query:

handheld and (orientation: landscape)

Should target phones in landscape mode.  So try adding it to the phone media query.

Cd&
0
 

Author Comment

by:nsitedesigns
ID: 39693831
Could you give me a little guidance.  I am not sure how to write that css to target the various orientations. I found this online but am not sure what info I need to put in.  Do I include the "@media" in the css for the mobile css or for all?

@media all and (orientation:portrait) {
/* Style adjustments for portrait mode goes here */
}

@media all and (orientation:landscape) {
  /* Style adjustments for landscape mode goes here */
}
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39693873
Well you need to use screen or it won't get picked up by iphone and several others.

There is a specification for @media handheld and @media mobile in the standards but Apple chose to ignore them and present iphone as screen.  Stupid? Yes, but standards and browsers for mobile are about where desktop browsers were ten years ago.

You will need to be careful with resolution specifications as well because a lot of the newer android phones have resolutions up to 800+

Cd&
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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