Forum Moderators: not2easy
<p style="width:250px; padding:8px; margin-left: auto; margin-right: auto;">
I have just noticed that the other browsers are centering it in the window as opposed to the div. Any suggestions on how to get round this?
It probably wouldn't hurt to post the markup and css for the container div, either.
cEM
This is the CSS for the div ...
div.content {
width: 550px;
position: relative;
background-color: #FFFFFF;
margin: 0;
border: solid 1px #ccf;
font-family: Verdana,Arial,Helvetica,sans-serif;
padding: 15px 0px 5px 10px;
}
This is the abbreviated markup ...
<div class="content">
<p style="width:250px; padding:8px; margin-left: auto; margin-right: auto;">
(Adsense script)
(Adsense script)
(Adsense script)
(Adsense script)
</p>
<p class="content"> Sed ut perspiciatis unde omnis iste natus error sit voluptatem doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. </p>
</div>
As you can see the content div appears to be closed properly but could there be some kind of a conflict between the "width" declarations in the CSS and the inline style?
(Apologies for my ignorance but I only recently got into CSS.)
thoughts:
have you anything in your CSS that targets/styles an iframe?
and are you sure your content div has a closing tag..
I suggest validating your HTML [validator.w3.org] and CSS [jigsaw.w3.org] just incase there's some markup problems causing confusion..
I also tested your code above with a 234x60 ad script and can confirm that it's working fine
Suzy