WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] trying to fill sidebar a color (8 posts)

  1. stargirl1
    Member
    Posted 1 year ago #

    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%;
    }
  2. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  3. stargirl1
    Member
    Posted 1 year ago #

    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/

  4. stargirl1
    Member
    Posted 1 year ago #

    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;
    }'

  5. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  6. stargirl1
    Member
    Posted 1 year ago #

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

  7. Andrew
    Forum Moderator
    Posted 1 year ago #

    E.g,

    #primary,
    #secondary {
     float: left;
    }
    
    #primary {
     width: 70%;
    }
    
    #secondary {
     width: 30%;
    }
  8. stargirl1
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic