-1

My Wordpress site www.rosstheexplorer.com uses the Penscratch theme.

Does this theme support or is there a plugin that allows me to have a header image specific for mobile devices and one specific for desktops?

My current header images looks small and stretched on mobile devices.

softbrewery
  • 501
  • 6
  • 18
Ross Symonds
  • 81
  • 1
  • 10

1 Answers1

0

You must change Your markup.

Change Your <img class="custom-header"> with <div class="custom-header"> and set conteiner background property:

.custom-header { background: url(path_to_image) no-repeat;
background-size: cover; } 
softbrewery
  • 501
  • 6
  • 18
  • I have just inserted that code, but unfortunately it is not quiet what I want. – Ross Symonds Feb 20 '17 at 14:04
  • I want the header image to be a lot bigger on the mobile device. If you load up www.nomadicmatt.com on your phone the header image takes up the whole screen. That is what I am trying to achieve. – Ross Symonds Feb 20 '17 at 14:05
  • Ok but on this site nomadicmatt.com used `background-image` css property with `background-size: cover;` – softbrewery Feb 20 '17 at 14:15
  • Is this the line you are referring to - Would I need to change it to
    – Ross Symonds Feb 20 '17 at 15:45
  • No You can set style on `div` like this `
    `
    – softbrewery Feb 20 '17 at 15:55
  • So in Additional CSS do I put
    And .custom-header { background: url("rosstheexplorer.com/cover-photo-1/") no-repeat; background-size: cover; }
    – Ross Symonds Feb 20 '17 at 16:05
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/136176/discussion-between-ross-symonds-and-htmlbrewery). – Ross Symonds Feb 20 '17 at 16:29
  • I copy and pasted the following into Additional CSS – Ross Symonds Feb 27 '17 at 10:47
  • .custom-header { background: url("rosstheexplorer.com/cover-photo-1/") no-repeat; background-size: cover; } I got an error message saying "Markup is not allowed in CSS." I tried each line individually and there was an issue with both lines – Ross Symonds Feb 27 '17 at 10:49