• Resolved tora0515

    (@tora0515)


    Hello,

    I am having an issue with the background color. I have done this:

    html {
    max-width: 1240px; /* set max width */
    margin: 0 auto;
    position: relative; /* Fix for absolute positioning */
    }
    /* change body color */
    body {
    background: green; /*set body background to green for test*/
    }
    #main-wrapper, header.tc-header, footer#footer .colophon {
    background-color: #ffffff; /*set to white */
    }

    The issue is the space between the header and the main-wrapper, where my slider lives, and also between the main-wrapper and footer. I am pretty sure the second is cause by margins, but thought I would ask to be safe.

    Anyway, I would like everything inside the 1240px max-width from the top of the page to the bottom to have a background of white, while everything on the outside of it to be a separate color.

    I am sure it is not clear so here is a link. It’s on free host while I test (learn), so if you get a popup ad, just hit refresh or back

    https://melbourneactuary.net63.net/

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Cannot access site with provided link…keeps timing out…do not know if problem on my end or the host’s end…

    Not sure what the issue is for the slider…if you want a white background for it too, try this:
    .carousel { background: white; }

    If I understand you for the footer, try adding another footer#footer selector, like this:

    #main-wrapper, header.tc-header, footer#footer, footer#footer .colophon {
    background-color: #ffffff; /*set to white */
    }

    This snippet may provide additional help.

    Or were you experiencing body background color coming through above and below the main wrapper?

    If so, you could try this:
    #main-wrapper { margin: 0 auto; }

    Would likely need internal padding to compensate for the lost margin…I am not an expert and haven’t fully tested every possibility as I am shooting in the dark at the moment…

    Thread Starter tora0515

    (@tora0515)

    Thanks deputy05.

    #main-wrapper { margin: 0 auto; }

    got ride of the horizontal space.

    Thread Starter tora0515

    (@tora0515)

    Forgot to click resolved.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Trouble with background color’ is closed to new replies.