Jump to content

Filtered Photo Gallery- Format Issue


Alana

Recommended Posts

I was following the filtered photo gallery tutorial below:

https://www.w3schools.com/howto/howto_js_portfolio_filter.asp

I have an issue with the photos bunching up on the right side & not shifting to a new column. 

 

This is the HTML in the link below:

https://www.w3schools.com/code/tryit.asp?filename=FWU52Y6W22GU

What can I add to make sure the formatting is right?

HTML Issue.PNG

Link to comment
Share on other sites

That is I imagine, because the first row containers are not of a equal height, as the overlapping column container slide left because of float, it will come up against one of those higher container protruding down more than the rest and butt up its right bottom corner edge and stop.

To prevent this you need to make sure all column class  heights are the same, so this does not happen, a flexible solution would be to use display: flex; this will make each column the same height to the highest on each row.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...