Community Forums › Forums › Archived Forums › Design Tips and Tricks › Metro Pro header image & iPhone
Tagged: header image, Logo, Metro Pro
- This topic has 6 replies, 2 voices, and was last updated 11 years, 6 months ago by
John.
-
AuthorPosts
-
September 6, 2013 at 11:26 am #61107
treoguy
MemberI was hoping you might be able to help. I've setup my website using the Metro Pro child. In my functions.php, I've changed the image to support a full-width background for a desktop browser.
//* Add support for custom header
add_theme_support( 'custom-header', array(
'width' => 1068,
'height' => 142,
'header-selector' => '.site-title a',
'header-text' => false
) );My CSS has been modified to accommodate the new size:
/* Logo, hide text */.header-image .site-title,
.header-image .title-area {
min-height: 100px;
padding: 0;
height:142px;
}.header-image .site-title a {
background-color: none;
max-width: 1080px;
min-height: 142px;
padding: 0;
width: 100%;}
This all looks great when I view it on my desktop. In fact, if I resize my browser, it looks wonderful. The trouble comes when I use Safari on both iOS 6 and iOS 7. It seems to scale the image and creates a very awkward look.
http://www.everythingcentro.comSeptember 6, 2013 at 6:02 pm #61163treoguy
MemberStarting to realize that if my logo and header background image are one the same, it would be impossible to have it properly resize in the responsive design.
Let me explain my ultimate goal and perhaps someone can point me in the right direction or provide guidance.
I'd like for my site that have a full width header background, that resizes properly on a mobile device. The logo should be seperate from the header background, so that's able to resize without looking too small.
These are vitally important. The next is not a requirement, but it would be nice to have a third element - a banner that would be flush right of the logo, overlaying the background. This would go away when the browser resizes under a specific size. It's a 728x90, so I'd like for it not to render on mobile.
Any help is greatly appreciated.
This is for this website:
http://www.everythingicafe.comSeptember 7, 2013 at 2:26 pm #61253John
ParticipantThis should help: http://blackhillswebworks.com/2013/05/10/how-to-replace-the-studiopress-background-header-image-with-a-real-image-logo
If you follow this method you can still add a header background image with CSS that would be independent of your logo image.
John
John Sundberg | blackhillswebworks.com
A WordPress developer’s toolbox: Firebug | WordPress Codex | Google 😉September 9, 2013 at 7:50 am #61494treoguy
MemberI ran into a problem with the logo not appearing. Using Chrome, the image for the .site-title was correct. The default background color was blocking the logo. I tried commenting out the color, but had nothing but white space remaining.
If I were to get the image showing, how do I go about adding the background image?
On your post, you referenced SEO concerns? Have these been addressed?
Thanks for your help.
September 9, 2013 at 7:59 am #61498John
ParticipantI would say that the SEO concerns have been addressed. I've run several sites through SEO "checkers" and they all passed.
After adding your logo image following the tutorial, you should be able to add the background style you now have in
.site-title a
to.site-header
, for example, and your logo image should then appear on top of that, and independent from the header background.
John Sundberg | blackhillswebworks.com
A WordPress developer’s toolbox: Firebug | WordPress Codex | Google 😉September 9, 2013 at 8:44 am #61509treoguy
MemberNot having any luck. It's odd because the original header image 1068px width looks perfect on the iPad, Android tablets and phones. It also resizes nicely on Safari desktop. On the iPhone, it wants to show the entire image, so it scales it down to fit.
Now, if I comment out this section:
@media only screen and (max-width: 320px) {,.header-image .site-title a {
background-size: contain !important;
}It will render properly, but still requires I resize the logo (part of the bigger header) smaller, so that it fits. Definitely a hack and not the proper method. I wonder if there is something within this CSS that would do the trick.
It's live on iCafe now. Trying to move away from WPTouch and go responsive.
September 9, 2013 at 8:56 am #61510John
ParticipantI still think that following the image logo tutorial is your best choice here. I personally don't use the default StudioPress background header image stuff because I think there's a better way to do it.
John Sundberg | blackhillswebworks.com
A WordPress developer’s toolbox: Firebug | WordPress Codex | Google 😉 -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.