Click here to Skip to main content
15,884,537 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am trying to align images in html and css. What I need is to have one image to the left of the div and the other image to the right of the div with text in the middle all while keeping it aligned.

What I have tried:

I have tried using float, grid and flex but can't seem to figure it out
Posted
Updated 15-Dec-22 0:46am

1 solution

Should be relatively straight-forward using Flex? Edit fiddle - JSFiddle - Code Playground[^] You're essentially just creating a "row" div and within that you'd have 3 divs: image, text, image.
 
Share this answer
 
Comments
Braydan M 15-Dec-22 18:34pm    
Thankyou for the code of figured it out and made it fit for my project

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900