The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help centering a div Re: Help centering a div


Sorry, on a private server so i can’t provide a link. I could go right:0 left:0, margin:auto and it would center it for me, but it would have to have a set width. I could also left:50% and use some margin to center it but again I would need a set width. But because it changes I’m not sure what to do. I could just use javascript to get the width and center it and yada yada yada but I want to do this with CSS alone.