Dysan Posted February 22, 2008 Share Posted February 22, 2008 Hi, How do I centre a div, and always keep a 18px gap at the top of the page (before content start) when the browser window is resized? Link to comment https://forums.phpfreaks.com/topic/92435-centred-div-horizontallyvertically/ Share on other sites More sharing options...
TheFilmGod Posted February 22, 2008 Share Posted February 22, 2008 #unique_id { margin: 18px auto 0 auto; } <div id="unique_id">Content</div> Link to comment https://forums.phpfreaks.com/topic/92435-centred-div-horizontallyvertically/#findComment-473649 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.