I have a div which contains several other div’s and I am trying to center them so there isn’t a huge gap on the right(see image)
I have tried margin: 0 auto
& display:block
but I can’t get all the div’s to align into the center.
I am adding each card(from materialize) with javascript into a div:
<div id="projects" >
<div class="row" id="projectRow">
</div>
</div>
Card code:
<div class='col s8 m4' id='projectCard'><div class='card blue-grey darken-1'><div class='card-content white-text'><span class='card-title'>"+ json[i].name +"</span><p>"+ json[i].description +"</p></div><div class='card-action'><a href='"+ json[i].repository +"'>Repository</a></div></div>
CSS:
#projectCard{
width: 483.888px;
height: 210.700px;
max-width: 483.888px;
max-height: 210.700px;
}
#projects{
text-align: center;
}
How would I be able to align these into the center