Jump to content

How to Header Background Image Responsive


crawling

Recommended Posts

Hello

 

I am working on a site and the theme is a responsive theme but the header background is not resizing on mobile and tablets below is a link to the site

http://unitednews.sr/category/news/

each category / page has a unique header , this is what I have in css for category news

body.category-news  #header-wrap { background: url( http://unitednews.sr/wp-content/uploads/2014/10/Header_UnitedNews.jpg);
background-repeat:no-repeat;
}

Adding background size: cover does not work

any idea ?

Edited by crawling
Link to comment
Share on other sites

Try 'background-size:100% auto;' in the #header-wrap definition.

Thank you Maxxd , now this code works , but now i get a huge white space under the header image .

how do i fix that ?

body.category-news  #header-wrap { background: url( http://unitednews.sr/wp-content/uploads/2014/10/Header_UnitedNews.jpg);
background-repeat:no-repeat;
background-size:100% auto;
}
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.