Display Different Sized Header Images On Different Mobile Devices

This tutorial provides the code which enables you to display different sized logo’s at different screen widths.

Update : New solution – Different Sized Header Images For Any Screen Width – Mobile Responsive

Here’s the demo which shows you exactly what the code below produces.

Note: The above demo includes float: left; in the CSS so the logo always floats left however in the code below i have removed this declaration because this demo uses a full width header image. The CSS and image sizes will be different for smaller images and logos.

Once you add the code in your child theme, you can then add any number of different sized images and choose the screen width you want them to display at.

The images included in this tutorial represent the maximum recommended width for a specific screen width assuming you don’t want to use any left or right padding or margin.

logo-sizes

The result shows you how you can keep any text in your image centered without it being cutoff when the screen size reduces below the width of your image.

Tested on the Genesis Sample child theme by StudioPress themes.

Here’s the solution for members of WP Sites.

Related Tutorials


Comments

4 responses to “Display Different Sized Header Images On Different Mobile Devices”

  1. Thank You for this tutorial. I guess it wouldn’t work when using individual image-headers for each post/page?

    1. Brad Dalton Avatar
      Brad Dalton

      Are your images all the same size?

  2. […] If you want to display different images on different mobile devices, here’s a tutorial which shows you how. […]

  3. […] Click here to use one solution which shows you how to easily add different images which display on different screen widths. […]

Leave a Reply

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.