WordPress.org

Ready to get started?Download WordPress

Forums

Twenty Fourteen
[resolved] Adding borders to header and sidebar? (3 posts)

  1. braden.schlueter
    Member
    Posted 8 months ago #

    So I made the header and sidebar menu white, but I want to add thin black borders to the bottom and right side. I'm not terribly good as CSS and am not sure where to add the border in the CSS file. Any help would be appreciated!

    This where I thought it should go but the borders aren't showing up.

    #site-header {
    position: relative;
    z-index: 3;
    border-bottom: 1px #000;
    }

    #secondary {
    background-color: transparent;
    clear: none;
    float: left;
    margin: 0 0 0 -100%;
    min-height: 100vh;
    width: 122px;
    border-right: 1px #000;
    }

  2. Zulfikar Nore
    Member
    Posted 8 months ago #

    I hope you are using a child theme or a custom CSS plugin for the changes.

    The code you need is

    #site-header {
    position: relative;
    z-index: 3;
    border-bottom: solid 1px #000;
    }
    
    #secondary {
    background-color: transparent;
    clear: none;
    float: left;
    margin: 0 0 0 -100%;
    min-height: 100vh;
    width: 122px;
    border-right: solid 1px #000;
    }

    Basically you were missing the "solid" part out. In a child theme or custom CSS plugin you'd just need to add (you'd probably need to adjust some margin/padding too)

    #site-header {
    border-bottom: solid 1px #000;
    }
    
    #secondary {
    border-right: solid 1px #000;
    }
  3. braden.schlueter
    Member
    Posted 8 months ago #

    Thanks a lot. I knew it had to have been something stupid I was doing wrong!

    Yes I am using a child theme.

    The

    #secondary {
    border-right: solid 1px #000;}

      worked perfectly, but the header border is still not showing up. Is this a margin/padding issue?

    Nevermind. The border code had to go under .header-main instead.

Reply

You must log in to post.

About this Theme

About this Topic