center this? <script src="http://www.bluehost.com/src/js/CODE15/488x160/bh_488x160_01.gif" type="text/javascript"></script> or pad it to the left a bit?
use some CSS and an html tag like this ==> <div class="bluehostad"> <script src="http://www.bluehost.com/src/js/CODE15/488x160/bh_488x160_01.gif" type="text/javascript"></script> </div> Code (markup): Style it like so... .bluehostad { width: 468px; height: 160px; margin: 0px auto; padding: 0px; display: block; } Code (markup): Cheers!~
If you want add to a wordpress post ==> in code view when creating the post add this: <div style="width: 468px;height: 160px;margin: 0px auto;padding: 0px;display: block;"> <script src="http://www.bluehost.com/src/js/CODE15/488x160/bh_488x160_01.gif" type="text/javascript"></script> </div> Code (markup): Cheers!~
margin: 0px auto; will center... do not use <center> tags... You can pad it if you want but since you know the dimensions you are better off with margin.
Also remember when you mention "margin:0 auto" to an element make sure you have a "width:XXXpx" mentioned to the element, else margin:0 auto will not work. example: #div1{ margin: 0 auto; width: 960px; } Code (markup):
And you can omit the "display: block" attribute, as a DIV is a block-level element. Great advice WorkingSmart and Radiant_Luv!
Won't a simple <center><script src="http://www.bluehost.com/src/js/CODE15/488x160/bh_488x160_01.gif" type="text/javascript"></script> </center> do the job?
That is absolutely true about the div being a block element, however in some wordpress themes ( especially with noobs ) I have found that certain existing CSS for these themes tend to overwrite the elements natural state and therefore, albeit redundant, have them re-add the block to the element as a "just in case"... Cheers!~
Good advice to the noob. I would still stick to the Standard however, and add that declaration on a case-by-case basis - if the layout does seem wacked because of overwritten states Web Standards rock lol. Best Regards!