Sometimes a a web developer wants to center align an advertisement to make it fit the page style or to act as a page break etc.

There are several ways to do this depending on the type of ad in use. Today most advertisements are JavaScript code snippets so its simple to use a <div> wrapper to apply a CSS style to the code.

<div align="center">insert code here</div>

is all that is needed with native HTML 4 and native CSS 3 or WordPress custom HTML containers. Using inline styles is common with advertisements as the stock classes with WordPress do not work with <iframe> or JavaScript type containers.

Align is supported across the board for all major browsers.

<div style="text-align:center">

The style in HTML 5 prefers to use CSS rather than direct HTML capability. For some reason this does not work with WordPress with the theme we are using which is why we present the older align code.

We have spend a log of time using WordPress and when provide solutions to common problems so others do not have to read a ton of books to figure it out.