Background pic covering all content

6 Replies ·

  1. Hi, i´m wondering how i can use a background pic covering not all the content including sidebars but only the side areas without content.
    Example:
    (http://testumgebung.narkose-muenchen.de)
    Fine here, no sidebar on this page.
    But here:
    (http://testumgebung.narkose-muenchen.de/ueber-die-hbo-2/)
    the area of the sidebar is covered by the background as well. How can i change that? Kind regards Daniel

  2. Justin Tadlock

    The short answer to that question is that you can’t do that with WordPress’ custom background feature.

    The long answer is that it is perhaps possible if the theme design had a set width. However, the theme design is responsive so that it works on desktop and mobile devices, so the width is flexible instead. Without a known width for the container that wraps both the content and sidebar area, I can’t think of a way to do it. Even then, you’d have to add a custom background to that container and not use the WordPress custom back feature.

    Your best option is to add a solid background color on the sidebar itself or the individual widgets within the sidebar.

  3. Daniel G.

    Thanks! The Theme is Stargazer, so i thought you may know how to do that?
    Kind regards Daniel

  4. Justin Tadlock

    Yes, I saw that you were using Stargazer. My response was specifically with that in mind.

    My recommendation is still to add a solid color background to either the entire sidebar or the individual widgets within the sidebar. I can help with that if you want.

  5. Daniel G.

    Hi Justin,
    nice!
    So here the problem again.
    on http://testumgebung.narkose-muenchen.de/
    there is a table with a solid white background and no sidebars. Thats fine!
    but: http://testumgebung.narkose-muenchen.de/ueber-die-hbo-2/
    there is a table with a solid white background for the main content and a sidebar which should be white also.
    Then here http://testumgebung.narkose-muenchen.de/indikationen/
    there is no table (the background pic shows up everywhere)
    My aim is to have the content and the sidebar in white without using tables. Would that be possible? Thanks and kind regards Daniel

  6. Justin Tadlock

    One thing I’m seeing is that you’ve removed the <div id="main" class="main"> that wrapped both the content and sidebar. I’m not sure if there’s a particular reason you removed it from Stargazer, but that wrapper element would make it really easy to have a solid background behind both the content and sidebar area.

    Though, I do see the closing </div> for the original wrapper. Just not the opening <div> that was in header.php.

    If you re-add that element to header.php that was in the original Stargazer theme, it should be as simple as changing the color to whatever you want via CSS:

    .main {
        background-color: #fff;
    }
    
  7. Daniel G.

    Hi Justin, thanks a lot! The header.php was broken by my mistake, after putting it in the original state all worked fine! No more questions at the moment.
    Kind regards Daniel