Support » Theme: Decode » CSS styling advice

  • Resolved Steven Jay Cohen

    (@stevenjaycohen)


    Hi Scott,

    On my site, I’ve put a colored bar at the top and bottom of the page.
    I’d love to anchor these to the top and bottom of the screen.

    Currently, I have:

    body {
    	border-top: 10px solid #46134f;
    	border-bottom: 10px solid #46134f;
    }

    Any suggestions on how to change it to anchor it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • body::before {
    content: “”;
    border-top: 10px solid #46134f;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    }

    and likewise for the bottom:

    body::after {
    content: “”;
    border-bottom: 10px solid #46134f;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    }

    Note that the admin bar will cover this up unless you add more CSS to detect and change this, but I’m assuming you won’t mind.

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘CSS styling advice’ is closed to new replies.