Spacing in Page title on a single page

  • Author
    Posts
  • #3973

    svepet
    Participant

    Hi,
    i don’t know should i ask you but is there a way to change the spacing shown in the page title on the page itself but not anywhere else?

    the page in question is http://svepet.hr/index.php/pr-i-events-i-promotion-i-congress/
    and i want it to look like this : http://imgur.com/bK2C5OW
    so i want to edit just the title on that one page (the spacing and remove that one symbol that is usually setting them apart).. i searched the forums here and on wordpress.org but didn’t find a solution .

    I you could help i would appreciate it.

    #3976

    Andrew Misplon
    Keymaster

    Hi svepet

    If you remove the characters you’ve used between each word then you can add the following to your Custom CSS plugin:

    /* Page Titles */
    .page .site-content > .entry-header h1.entry-title {
        text-align: justify;
        text-align-last: justify;
        width: 100%;
    }
    #3986

    svepet
    Participant
    This reply has been marked as private.
    #3988

    Andrew Misplon
    Keymaster

    Here is what it would look like to only target this page:

    /* Page Titles */ 
    .page-id-3949.page .site-content > .entry-header h1.entry-title { 
    	text-align: justify; 
    	text-align-last: justify; 
    	width: 100%; 
    }
    

    There isn’t really any easy to align page title words with content below, it’ll get complex. You’d need to give each word a span tag and then try target each tag with spacing and then drop that spacing as you get to mobile…are you certain this feature is required 🙂

    You might add spans around each word in the title like this:

    <span>PR</span>
    <span>Events</span>
    <span>Promotion</span>
    <span>Congress</span>

    And then manually set each margin as follows:

    @media (min-width: 1024px) {
    
    	.page-id-3949 .entry-title span {
    		display: inline-block;
    	}
    
    	.page-id-3949 .entry-title span:nth-of-type(1) {
    		margin-right: 20px;	
    	}
    	.page-id-3949 .entry-title span:nth-of-type(2) {
    		margin-right: 20px;	
    	}
    	.page-id-3949 .entry-title span:nth-of-type(3) {
    		margin-right: 20px;	
    	}
    	.page-id-3949 .entry-title span:nth-of-type(4) {
    		margin-right: 0;	
    	}
    
    }
    #3989

    Andrew Misplon
    Keymaster

    For some reason CSS lines are being removed, here it is spaced correctly: http://pastebin.com/W8CfzaDP

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.

Scroll to top