Borders around header

  • Unknown's avatar

    Hi,

    I posted this query already but not sure if I put it on the right forum.

    I am using Pique theme. On the home page, there are borders around the headers. Is it possible to put the same kind of border around the headers on the other pages?

    Thanks

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hi, are you talking about the borders on the titles, such as Why do we use… ? If so, add the following at the very bottom of your custom CSS.

    body:not(.home) .entry-title {
    	display: inline-block;
    	position: relative;
    	border-top: 2px solid #fcfbf9;
    	border-left: 2px solid #fcfbf9;
    	border-right: 2px solid #fcfbf9;
    	padding: 0.75rem 1.5rem 0.85rem;
    }
    body:not(.home) .entry-title::before, body:not(.home) .entry-title::after {
    	border-bottom: 2px solid #fcfbf9;
    bottom: 0;
    content: '';
    display: block;
    height: 0;
    position: absolute;
    width: 50px;
    }
    body:not(.home) .entry-title::before {
    	left: 0;
    }
    body:not(.home) .entry-title::after {
    	right: 0;
    }
    body:not(.home) .entry-header {
    	text-align: center;
    }
  • Unknown's avatar

    Thank you so much for this.

    I entered the coding and it has kind of worked however, the bottom right border doesn’t quite line up. I have tried to edit the coding but that just makes the bottom-right border jump around and not sit where I want it to :-)

    Also, the border hasn’t worked on the home page… is this because of the theme?

    Many thanks

  • Unknown's avatar

    Howdy stormsocialmedia!

    Chiming in to help out in fixing the issue! I created a fix for the border issue; however, I don’t believe it’s the best way but it works for now!

    Replace this code:

    body:not(.home) .entry-title::before {
    	left: 0;
    }
    body:not(.home) .entry-title::after {
    	right: 0;

    With this code:

    body:not(.home) .entry-title::before {
    	left:0;
    	top:61px;
    }
    body:not(.home) .entry-title::after {
    	right:0;
    	top: 45px;
    }

    Also, the border hasn’t worked on the home page… is this because of the theme?

    The border doesn’t work on the homepage because of the :not(.home) portion of the code. You can attempt to remove it from the code and see if it works on the homepage well.

  • Unknown's avatar

    It worked!! Thank you so much for this, really appreciate the help :-)

  • Unknown's avatar

    You’re very welcome! Let us know if you need anything else!

  • Unknown's avatar

    Hi,

    Just had a look at my site and the borders have worked perfectly on every page, except one. the page I am having problems with is called Social Media Content – Management and Maintenance. This page title goes into 2 lines, so the border hasn’t lined up properly. Do I need to give a separate code for this?

    Thanks

  • Unknown's avatar

    Hi Again!

    Yes, you will need a separate code. This one should do the trick!

    body.page-id-86 .entry-title::before {
    	left:0;
    	top:99px;
    }
    body.page-id-86 .entry-title::after {
    	right:0;
    	top: 83px;
    }

    This code is meant just for that page.

  • Unknown's avatar

    Thank you so much, this worked perfectly!

  • Unknown's avatar

    You’re very welcome! Let us know if any other pages are affected in the future.

  • The topic ‘Borders around header’ is closed to new replies.