?
Solved

modify mobile site header image for portrait/landscape

Posted on 2013-12-03
3
Medium Priority
?
344 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Are you having trouble connecting or getting your iPhone / Samsung device(s) to sync with Microsoft Exchange Server?   What have you tried?   What haven't you tried?
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
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…
Suggested Courses

719 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