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?
<style type="text/css"> div {padding: 18px;} </style>
Should work.
How do I also centre he div horizontally as well as vertically?
I don't really know what you mean. So you just want a div placed exactly in the middle of the page or you want a div that has an 18px gap from the side of the page no matter how big the browser window is?
I want to try and do what yell.com does. Centre a div vertically and horizontally on the page regardless of the window site.
Then have a look at yell.com and see how they do it. (You know, the same that's been suggested when you asked about how paypal did what they do.)