re: 4 Things I Learned From Building My First Site Solo VIEW POST

re: Hi Calire, I'm pretty sure it's been a lot of fun (I still remember my first days in programming... wooh it was very exciting 😃) I always love to...

I was originally setting the line-height equal to height, but if the text is too long and wraps to the next line, it creates a huge space between the two lines. :(


Ah, line-height is for one line text... here the multi-line way:

It's like converting this paragraph into a table (using display), so that we can use vertical-align

    p {
        background-color: red;
        width: 150px;
        height: 150px;
        display: table-cell;
        vertical-align: middle;

<p>whatever stuff right here to go to the next line</p>
code of conduct - report abuse