Solved

modify mobile site header image for portrait/landscape

Posted on 2013-12-03
3
338 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The case of the missing phone talks about the way a small electronic gadget (the mobile phone) has penetrated into our lives and has made us addicted to it.
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
Suggested Courses

631 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