G
G
GoodProject2015-10-07 16:39:31
css
GoodProject, 2015-10-07 16:39:31

Text in the center of the block?

Kind.
1. What is the best way to center this text?
hXlk0WL.png
2. It is desirable that it would be possible to place 2 lines in the center. Description and link.
Now it's a mask at 100% width and height, appears on hover.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

6 answer(s)
V
Vitaly Inchin ☢, 2015-10-07
@In4in

One to another and vertical-align: center;.

A
Alexander Batukhtin, 2015-10-07
@0lorin

top: 50%;
transform: translate(0, -50%);

And so it won't work?

S
Serdji, 2015-10-07
@ssumatokhin

You can try with the help of Flexbox layout. Videos on this topic here

D
Dmitry Pyrkin, 2015-10-07
@ps1panda

absolute positioning and left:50% and top:50% margin-left: - half of the box's width margin-top - half of the box's height

L
Lumore, 2015-10-07
@Lumore

codepen.io/anon/pen/VvbRxZ

G
GoodProject, 2015-10-07
@GoodProject

I solved the problem that I set line-height: 33.34vh; the same as the block, but for the ideas, ATP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question