-1

I am using WordPress and I want to make the header and the div below it to share the same background image.

I have added the div in the WordPress page using Visual Composer and given it a background image, but the only way I can make it go into the background of the nav is by giving it a negative margin-top value, which of course makes it non responsive. Could anyone give me any pointers?

Joey93
  • 103
  • 1
  • 3
  • 12

1 Answers1

1

Since you dont have any code, i cant really SEE what you want to do but, i assume what you need to do is something like this

<div id="mainTOPwrapper">
    <div id="header">header content here</div>
    <div id= "divBelowIt"> lolz at the div name =) </div>
</div>

And then, you give the background image css to "mainTOPwrapper". Make sure the divs within it dont have any backgrounds, and this will work for you

somdow
  • 6,268
  • 10
  • 40
  • 58
  • Haha I like the names of the divs but I did try this approach, it makes sense but with WordPress there is a header file, then a page template file so I am not sure how I can close for example the mainTOPwrapper div – Joey93 Jun 01 '16 at 10:58
  • Well, assiming that the structure is the same as the sample code i put above, then simply you, take the......lets say that "mainTopWrapper" goes in the header, and "header" goes on the header.php as well, but the next div is "divBelowIt" and that goes in the page template, or index.php etc, then simple copy/paste that on those interior pages and it will work the same. IF though, you want this in just one page, then make a "template" of it. – somdow Jun 01 '16 at 11:02