The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › [Solved] Captain tell me how to align this wrapper in center
need this wrapper to be aligned center tried everything but doesn’t work Link To problem page
div.AG_album_wrap { display:block; margin-bottom:20px; padding-bottom:5px;
It is aligned center…kind of…but it’s 100% wide.
You could throw a width on it and then use margin:auto
div.AG_album_wrap { display: block; margin-bottom: 20px; padding-bottom: 5px; width: 90%; margin: 0 auto; }
BUT what I think you really want is for the images to be centered…not the wrapping div. Am i right?
If so…you need to set the links to display:inline-block
display:inline-block
a.AG_album_thumb { /*display: block;*/ /* float: left; */ margin: 0 10px 10px; padding: 4px; border: 1px solid silver; display: inline-block; }
and then center them
div.AG_album_wrap { text-align: center; }
Thanks Captian yeah second helped greatly