I’m going to mention some of the differences in my solution, but I want to clarify that I am not trying to compete with PaulOB nor am I saying my solution is better. Is not. My solution is just another way of solving the same problem. If it wasn’t for PaulOB’s solution I wouldn’t have been able to come up with mine. So, thanks Mr. PaulOB
Aight, here are the differences:
It uses Flexbox rather than floats.
It uses an unordered list as the structure.
It doesn’t use any ‘magic numbers’ for positioning. 27% and 42% feel like magic numbers to me
If the content is a link, the links are blocks so they expand the whole width and height of their parent container.
If the content isn’t a link, all the author needs to do is take out the <a> and leave the content and the box on boxes will still display as intended.
I’m using Sass, albeit relatively simple Sass, which means that if you don’t know Sass it may be a bit daunting to understand. However, you can always see the compiled CSS and copy it from there if need to.
I’m using a “desktop-first” approach with the media query and I feel proud about it
I included PaulOB’s solution in the demo so we can see both solutions working side by side.
Following the “wireframe” the center box is smaller.
automatically creates a fluid, square (1:1) container and children, placing the last element in the center. This is probably quite similar to pauls solution except I chose to use absolute positioning for the sake of controlling height of child elements.
Added this solution to the demo with a small addition: Made the text fully centered in the boxes. However, the box in the center overlaps the content. I’m sure this is easy to fix, but I’m going to leave it as is
Maybe not necessary, as he does not want a lot of text in the boxes, but just as a challenge. How would you handle it with a paragraph of text in each box? I mean making it wrap around box 5, like I mentioned in post #4
Yes - that’s how pixel perfect layouts were created back in the days before CSS when HTML tables for layout were the only option. It was usually a transparent gif though rather than a png as those browsers didn’t support png images.
I finished a “proof of concept” a short while ago using some earlier code in this thread. Fortunately, yours was already up. Mine looks sooo ugly in comparison.