Sections on same line

I have two sections that are currently on different lines. They both contain multiple lines of text and I need them to go next to each other. I need it to have a 10px margin.

Can someone please help me?

Preferably using floats.

Thank you very much :slightly_smiling_face:

if you use triple back ticks aka `
then put some sample code in there i’m sure I can help.

<h1>hello world</h1>

like that ^^^

Title

text

text

text

Title

text

text

text

flexbox may be the easiest. you can also use grid. float would work but with the advent of flexbox and grid would be considered a poor hack in this use case.

you could also make both section’s display: inline-block but flexbox and grid give you greater placement control (like easy centering).

1 Like
type or paste code here
<section>
<h1> Title </h1>
<p> text
<p> text
<p> text
</section>