WordPress.org

Support

Support » Themes and Templates » [Resolved] trying to fill sidebar a color

[Resolved] trying to fill sidebar a color

  • i’m trying to fill my sidebar a color but i really don’t know what i’m doing here. i don’t know what numbers to plug in for the percentages and now my sidebar is off the bottom of the page.

    using the twenty eleven child theme.

    lizartlizard.com/lltest
    password: demo

    these are the codes i’ve been playing with that i’m not sure what to put where. now i remember why i almost failed geometry lol.

    #secondary {
     background: red;
    width:40%;
    height:100%;
    padding:0px;
    margin-right: 3%;
    }
    #content {
    	margin: 0 32% 0 4%;
    	width: 50%;
    }
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Andrew Nevins

    @anevins

    Forum moderator

    I can see the sidebar’s background is red; are you expecting to see the entire right side of your page to be red?

    not the entire right side, i want the text side bigger. i actually just changed the color to green.

    what i’m trying to accomplish is something that looks more like this:
    http://www.kunstgras.mobi/

    i’ve since changed my margin on the top and right to 0 but i still can’t figure out why the sidebar is down on the bottom instead of the top. got a deadline to meet so i’ve been messing with it.

    ‘#secondary {
    background: #B3EE3A;
    width:30%;

    padding:0px;
    margin-right: 0;
    margin-top:0;
    }’

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    If you want elements to float aside one another, you need to give both of them widths and float both of them.

    i guess i don’t know how to do that.

    Moderator Andrew Nevins

    @anevins

    Forum moderator

    E.g,

    #primary,
    #secondary {
     float: left;
    }
    
    #primary {
     width: 70%;
    }
    
    #secondary {
     width: 30%;
    }

    thanks for all the help but in the end we’ve gone with styling the widgets instead. when i viewed the site on my tablet after i made the sidebar a color it made the whole body of the site green when it moved the menu to the bottom on the mobile devices.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] trying to fill sidebar a color’ is closed to new replies.