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


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


I've tried that but it doesn't work


ok I'll try that


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.


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


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