Alright, so, I'm having a lot of trouble centering my google ad's. The way I've been told to do it is to use: #advertisement { margin-left: auto; margin-right: auto; } Code (markup): <div id="advertisement">ADSENSECODEHERE</div> Code (markup): However, that isn't working. Any other methods? (I'm using Adsense Image Ad's.)
That seems like the correct code, so since it doesn't work try: <div align="center">adsensecodehere</div> or <center>adsensecodehere</center> Both ways are XHTML 1.0 valid. Edit: you can also try replacing the # in your code with a period ( . ) and changing the "id" to "class" so it would be: .advertisement{...} <div class="advertisement">...</div>
I found out that the way to solve it is: text-align: center; Instead of all that Auto Margin mumbo-Jumbo. So, it's fixed