The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Div not centering
below is a jsfiddle link for s type of image gallery i am working on…
https://jsfiddle.net/zaahideen/zzhjypoq/
problem is, i cant get the #image_container to horizontally align in the center of the #main_content
please help
thanks
Try adding;
#main_content { text-align: center; } #image_container { display: inline-block; }
And remove float:left; from #image_container