Align image with text | Sololearn: Learn to code for FREE!

+8

Align image with text

does anyone know how to align an image horizontally to a div element

7/13/2017 12:22:32 PM

Cheesy Game Studios

5 Answers

New Answer

+5

I've tried that but it doesn't work

+5

ok I'll try that

+2

If you are asking how to get the image to where it is beside the text or any other element, then you should use the float property in your CSS.

+1

try adding display: inline-block to the CSS of a div element that the img and p are nested in.

+1

if that fails you can nest the elements in a display: flex and align them accordingly