Center align DIV with content on both sides
P粉352408038
P粉352408038 2024-04-04 23:19:14
0
1
3546

So I have 5 items (within the containing DIV). The project lineup is as follows:

TextImageDIVImageText

I want it to appear with the DIV in the center, the image "hugging" the DIV, and then the text "hugging" the image, so any remaining space will be to the left or right of the containing DIV.

Current appearance I need how it looks

I've used flex to try and achieve this, but that just centers the entire content of the containing DIV, rather than the DIV being completely centered which I want.

P粉352408038
P粉352408038

reply all(1)
P粉739942405

Sorry, after an hour of more searching I found a thread related to fixing a very similar need to mine.

Solution here - How to align and center 3 divs without affecting the middle div

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!