If you’ve got (counts) 9 items in a flex container with wrapping, and have told it to put a gap of 350px between the elements, two of which are 350px wide and the rest 50px… you’d need a screen (maths) 3850 pixels wide for it all to show up on one line (3890 with the margin on both sides of the container). Course, you’ve also specified that the max width of the container is 1500 pixels, so it’s definitely going to wrap.
so… how much of a gap should be between the images? There’s not a natural gap there, because you havent specified a min height that makes sense for these dimensions.
Well its much the same as I already explained but changed to suit your html again.
Of course (as usual) there are questions to be asked about responsiveness as you seem to love fixing everything at enormous widths that only fit your screen
No I’ve told you before you can’t lay out responsive sites with absolute positioning.
I gave you the answer you just need to change it to match your desired outcome.
No need to absolutely place anything as the code I gave will do what you want. If you don’t want it responsive then use fixed widths but then that will only work for you.
You are going down a dead end with your approach even if it appears to work.
There are few suggestions for you, hope these suggestions could help you solving the issue:
If you use the same ID for multiple elements you may face trouble with CSS selectors because This is not a valid HTML. Using classes is more appropriate.
Inline Styles don’t suit your elements. That makes your codes less manageable.Use external or internal style sheets instead and then try applying style to the classes or elements you are willing to…
I wouldn’t recommend you to use flexbox alone that will not provide you required results. It will align items in a single row or column depending on the flex direction. Use flexbox and grid together.