in the personal portfolio responsive web design projects,
and I got through it ok, passed the test, etc., but I can’t get the “my projects” section to look right.
I have only four projects to show, not six,
so when I have them displayed they are set up with three on top and one on the bottom, and the one on the bottom is to the far left, which looks bad.
How can I put the one on the bottom in the center of the page?
can I use inline CSS for that?
or how can I put two on top and two on the bottom?
Well, since the projects are a bunch of anchor elements <a> inside of a grid container, you could just add an empty element between the third and fourth project if you like.
Just put a <p></p> in between the 3rd projects closing anchor tag </a> and the 4th projects opening anchor tag <a> This would place the fourth project in the center.
To achieve it with CSS alone you could use your .project-grid class selector to change the behavior of the grid. grid-template-columns tell a grids columns how to behave.
Fiddle with it until you are satisfied. To make two equal sized projects appear on each side, change it to grid-template-columns: 50% 50%; or grid-template-columns: 1fr 1fr;
Tell the container to align content in the center.
Like, I’d need to look up the exact syntax, but both with and without Bootstrap there are CSS attributes to tell the parent to do that.
Thanks, the first solution worked and got the fourth project in the center.
BUT
The second solution doesn’t seem to do anything, that is,
using the .project-grid class selector to change the behavior of the grid…
tried both 50% 50%; and 1fr 1fr;
but nothing changed. ??
any thoughts?