WordPress.org

Support

Support » Themes and Templates » [Resolved] Adding borders to header and sidebar?

[Resolved] Adding borders to header and sidebar?

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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;
    }

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Adding borders to header and sidebar?’ is closed to new replies.