html - centre horizontally within parent -
on this page show list of artists appearing @ festival. placement of artist <div>
s controlled isotope (it difficult lineup using css alone when there large number of artists , artist div
s different heights).
anyway, centre artist divs within parent container there's equal amount of white space left , right of artists, illustrated below.
i've tried obvious things like:
margin: 0 auto text-align: center
but no luck far....
the parent must have
text-align:center; width:abc;
and width. child should have
margin:auto; text-align:left; width:xyz;
example:
<div style="width:100%; text-align:center;"> <div style="width:50%; text-align:left; background:red; margin:auto;"> right </div> </div>
if not work, should check if else influences behavior!
Comments
Post a Comment