Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

help me with full width banner WordPress


I'm trying to write a full width banner like the one.
It should contain a centered image (1140px width) and full width color banner.
The banner should be responsive, image should resize at different resolutions (but it must show the full image) and the background color banner should resize following it.
When screen with is under 1140px, full width color banner can disappear and the image should be 100% width.
Also, using css, at a certain resolution (es: @media screen and (max-width: 525px) { ) it would like to substitute that image with another one.
Please, ask me if something is unclear.
Thank you!

Answers (2)


Sabby Sam answers:

Hi there,
you can use the same way.

for eg:
giving background-image with 100% width and center align the bg image.
You can see how they have implemented.

tomaso1980 comments:

Could you please write here the php and the css I should insert?
Thank you!

Sabby Sam comments:

Here you can try,
<div class="banner">
<div class="banner-image">
<img src="banner-url" alt="..." />

and add this in style.css

.banner {
.banner-image {

for @media screen and (max-width: 525px) you can use jquery

I hope this will help you. if it doesn't work please pm the details.

tomaso1980 comments:

thank you!


Remy answers:

Does the banner needs to be clickable ?

tomaso1980 comments:

Maybe it could somewhere, but only the image, not all the banner

Remy comments:

Here is something you can test and use

[[LINK href=""]][[/LINK]]

tomaso1980 comments:

Thank you, but Sabby Sam already resolved it