mardi 28 juin 2016

How do I use flexbox for a sidebar layout?

I am making a site for Wordpress and I have a sidebar that is longer than the content (post previews with thumbnails) returned. I am using flexbox to build the layout and when the sidebar is longer than the previews, there is a huge gap in between. I have quickly thrown together a codepen. Sorry if it is a bit messy.

//page wrapper for sidebar
.flexPageWrapper {
  display:flex;
  /* Centering the page */
  max-width:1500px;
  margin:0 auto;
}
//search results flexbox container
.searchContentWrap {
  flex-grow: 1;
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-right: 1em;
  flex-direction: row;
}

I want each row to not have a gap in between as it would if the sidebar was nice and short.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire