• This should be simple but it’s flummoxing me, and I don’t want to do too much tinkering with the theme’s code. But how could I put a thin, 1-pixel vertical line down the page, equally spaced between the body copy column and the sidebar? want it to run down as far as the length of the body copy.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You could add something like this:

    .site-content {
        border-left: 1px solid black;
        margin-left: 23em;
    }

    That will shift the content though. It could be done in other ways, but it would involve more tinkering!

    Hope that helps!

    Thread Starter jbickers

    (@jbickers)

    Thank you for this, but it doesn’t do what I’m looking for … looking for that line to go just to the left of the sidebar, as a divider between the main content and the sidebar. I guess I need to play with sidebar-content?

    Do not edit the Twenty Fourteen theme. It is the current default WordPress theme and having access to an original, unedited, copy of the theme is vital in many situations. First create a child theme for your changes. Or install a custom CSS plugin.

    Thread Starter jbickers

    (@jbickers)

    Thanks esmi … I am indeed using a custom CSS plugin, and making a point not to touch anything under the hood.

    I seriously doubt that you are going to be able to pull this off using CSS borders because the theme is using floated divs. This means that the border will always either be too short or extend beyond where you wanted it to. A better approach might be to look at adding a background image to something like .site-content that incorporated a thin dark line.

    esmi’s background image solution would likely be the easiest. I never even thought to ask if you were referring to the primary sidebar or the content sidebar?

    Thread Starter jbickers

    (@jbickers)

    OK, I’m an idiot. (I’m also a guy working on multiple sites at once, and not defragging his brain properly.) The site I’m asking this for is actually based on Twenty Thirteen. So I’ll try re-asking it in that forum.

    Thank you for your patience and help! Sorry for the derail.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add a thin vertical line to theme’ is closed to new replies.