I would still want the images to be displayed side by side with no margin or padding, all I would want is when you hover over the image it would have a color overlay and text link that leads to another page. The issue I am running into is there seems to be incorrectly coding my divs so it starts pushing my images to the bottom instead of maintaining a horizontal structure. I have no clue how to resolve this so any suggestions or advice would be super appreciated!
The issue I am running into is there seems to be incorrectly coding my divs so it starts pushing my images to the bottom instead of maintaining a horizontal structure. I have no clue how to resolve this
If you’re using a div to wrap each image, note that their default display state is block. Block-level elements will take up 100% width of their container, hence it pushing images down to show only one per line. You can try floating the divs with float: left;, but remember to clear the float otherwise the layout will collapse: overflow: hidden; applied to the gallery container element should be enough.
Not really – both ways will do the job. I think you’ll need an extra wrapper element between the current gallery container and all the images, if you want to use the flexbox structure. Flexbox has many more layout possibilities, but it can also be a bit challenging (see the earlier linked cheat sheet), so for something structurally simple like this, I’d probably stick to floats.
cool idea :)
I forked it to play with, and got a lil farther, but couldn’t figure out how to
make the link text color work in the overlay :(
i made the overlay a hex color #eaf6ff .. and added a transparency so it’s #eaf6ff80;
You can google Hex Opacity Values if thats the way you want to go :)