Right, now we can see what you are getting at
What you want is for the container to take the size of the content with a border around that but be centred.
You cannot do that with a single <div>. A div is a block element, so will occupy 100% of the available width.
One way would be to wrap the adverts in a span with a 2px border rule defined, then wrap that inside a parent div with text-align: center; applied to that
like so
HTML Code:
<div style="padding-top:2px;text-align:center;"><span style="border:2px solid black;margin:2px 0px 0px 0px;">Adverts go in here</span></div>
The 2px padding on the top of the parent container is to make IE show the top border, otherwise it puts it under the non-existent border of the parent
|