Moved flex styling for x-itemgrid into the element.
Changed item width so it takes margin into account.