narcis Posted January 6, 2013 Report Share Posted January 6, 2013 Is it possible to center a div (not a text or an image) horizontal and vertical? I have always used the position absolute and negative margins like in the example that I provide. But it has the problem that if the content i larger than the window, the content is cut. Is there another way to center without this problem?. I have the example here to play: http://jsfiddle.net/6KaMy/1/ I attach the file too. 0.html Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.