P
P
Peter Sergeev2019-01-28 16:35:45
css
Peter Sergeev, 2019-01-28 16:35:45

How to align the contents of the cards on one line?

https://codepen.io/Icat/pen/OdXWbb
Pictures have different sizes.
The task is to align everything that comes after the pictures, i.e. so that the text 'hello' and 'world' are on the same line.
using flex or bootstrap

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vitaliy Pershin, 2019-01-28
@223606322

If I understand you correctly, then as an option like this:

S
Sergey Goryachev, 2019-01-28
@webirus

S
Sergey But, 2019-01-28
@Locko

Wrap text in a block with class flex

<div class="flex">
    <h2>Hello</h2>
    <p>World</p>
    </div>

.flex {
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question