Modifying twig file to show elements side-by-side
It’s likely because field.label_element is a p tag, which makes the new line.

Try to use span instead, like this:

&lt;span {{ field.label_attributes }}&gt;{{ field.label }}{{ field.label_suffix }}&lt;/span&gt;

&lt;a href="#" data-toggle="tooltip" data-placement="right" title="{{ tooltips[key] }}"&gt;
  &lt;span {{ field.element_attributes }}&gt;{{ field.content }}&lt;/span&gt;
&lt;/a&gt;


You can also add a &lt;br&gt; tag after the closing a tag to make sure that all label/content sets are shown on separate lines.

Since the above did not work in your case, you can add a div around the two elements and then you can add some simple flexbox styling in your css to get the desired result.