Sunday, 15 August 2010

css - Alternative for width:fit-content for inline-block lists with multiple lines? -



css - Alternative for width:fit-content for inline-block lists with multiple lines? -

i'm trying create list of thumbnails of variable amount centered while thumbnails fit on 1 line, subsequent lines left-aligned, while parent element responsively stays centered in page. width:fit-content works 1 line, when there multiple lines goes 100% width (in mac chrome anyway). illustration of problem:

http://codepen.io/scotthorn/pen/eutah?editors=110

if there way accomplish desired goal, wouldn't mind changing part of css or html markup. background fits area isn't necessary, it's in illustration improve show what's going on. primary goal have list behaves centered container of inline-block elements one-line, when sec line has created, first element in lines below first element of first row rather beingness centered itself.

hopefully makes sense, if not can create mockup.

i imagine wrapping whole thing in div , centering % width want. mock help me understand.

or may able utilize margins squish within content.

css css3

No comments:

Post a Comment