Metro Pro header image & iPhone

Community Forums Forums Design Tips and Tricks Metro Pro header image & iPhone

This topic is: not resolved

This topic contains 6 replies, has 2 voices, and was last updated by  John 10 months, 3 weeks ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #61107

    treoguy
    Participant
    Post count: 24

    I 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.com
    #61163

    treoguy
    Participant
    Post count: 24

    Starting 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 728×90, so I’d like for it not to render on mobile.

    Any help is greatly appreciated.

    This is for this website:

    http://www.everythingicafe.com

    #61253

    John
    Participant
    Post count: 155

    This 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 ;)

    #61494

    treoguy
    Participant
    Post count: 24

    I 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.

    #61498

    John
    Participant
    Post count: 155

    I 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 ;)

    #61509

    treoguy
    Participant
    Post count: 24

    Not 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.

    #61510

    John
    Participant
    Post count: 155

    I 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 ;)

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.