• Resolved KarolinasBR

    (@karolinasbr)


    Hello!

    I used this code to make a border appear behind my post titles:

    font-family: 'Arial', 'Raleway', 'Georgia', sans-serif;
    
    	font-size:28px;
    
    	font-weight:none;
    
    	color: #fff;
    
    	text-align: center;
    
    	height: 28px;
    
    	background:url(...) left;
    
    	border: 3px solid #000;
    
    	padding: 20px;

    However, when the title is longer than would fit in one line and it breaks, the border and background don’t stretch to include the second line. How can I change that?

    Also, how can I increase the space between the two lines?

    Thank you in advance!
    Karolina

    Here is a picture of how the box looks when there is a line break in the title: https://i1052.photobucket.com/albums/s455/KcZamana/ScreenShot2014-11-14at173631.png

Viewing 6 replies - 1 through 6 (of 6 total)
  • Craig Ralston

    (@craig-ralston)

    Is it possible for you to provide a URL to the page in question? Would be much easier to assist using developer tools to view all the CSS.

    Thread Starter KarolinasBR

    (@karolinasbr)

    Sure!

    https://bookshelfreflections.com

    Thank you so much!

    Craig Ralston

    (@craig-ralston)

    .home #content h2 has a set height of 24px which is stopping it from expanding. You can set that to height:auto; and your issue should go away.

    Something like this in your child theme style.css should work:

    .home #content h2 {
       height:auto;
    }
    Thread Starter KarolinasBR

    (@karolinasbr)

    Thank you so much!

    Do you also happen to know how I can increase the space between the two lines?

    Craig Ralston

    (@craig-ralston)

    .home #content h2 a, .home #content h2 a:visited {
        line-height:1.5em;
    }

    You can adjust that number until it is to your liking. (You can also use pixels instead of em’s – Looks like you currently have it set to 28px)

    Thread Starter KarolinasBR

    (@karolinasbr)

    Perfect! Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Title Line Break Doesn't Fit In Border’ is closed to new replies.