I have been given an ad code to put on my website. I would like to center it. Here's the code: <!-- BEGIN RICH-MEDIA blinkx Media CODE --> <script type="text/javascript"> rnum=Math.round(Math.random() * 100000); ts=String.fromCharCode(60); if (window.self != window.top) {nf=''} else {nf='NF/'}; if (typeof(unishowed) == 'undefined'){sa = ''} else {sa = 'SA/'}; if (typeof(addinfo) == 'undefined'){reqstr = ''} else {reqstr = addinfo}; document.write(ts+'script src="http://bmuk.burstnet.com/bmuk/display/s=26510/a=a/v=4.0S/KW=/sz=468x60A/NZ/'+rnum+'/'+nf+sa+reqstr+'RETURN-CODE/JS/">'+ts+'/script>'); </script> <noscript> <a href="http://bmuk.burstnet.com/bmuk/clk/s=26510/a=a/v=4.0S/ns/sz=468x60A/KW=" target="_top"> <img src="http://bmuk.burstnet.com/bmuk/display/s=26510/a=a/v=4.0S/ns/sz=468x60A/KW=" border="0" alt="Click Here" /></a> </noscript> <!-- END blinkx Media Ad Network CODE --> PHP:
Do you want the center the content or do you want to center the element it's in? Post a link or the code for your site. If you want the center the element then you would do this with CSS. <div style="width:300px;margin:0px auto;"> <!-- ad code here --> </div> Code (markup): If you want to center the text then add text-align:center; to the element.
My site is clubpenguincheating.com - The ad is currently displaying under the header and I basically want to center it.
Add this code under this: <div id="content-main" class="clearfix grid_11"> <div style="width:728px;margin:0px auto;text-align:center;"> <!-- BEGIN RICH-MEDIA blinkx Media CODE --> <script type="text/javascript"> rnum=Math.round(Math.random() * 100000); ts=String.fromCharCode(60); if (window.self != window.top) {nf=''} else {nf='NF/'}; if (typeof(unishowed) == 'undefined'){sa = ''} else {sa = 'SA/'}; if (typeof(addinfo) == 'undefined'){reqstr = ''} else {reqstr = addinfo}; document.write(ts+'script src="http://bmuk.burstnet.com/bmuk/display/s=26510/a=a/v=4.0S/KW=/sz=468x60A/NZ/'+rnum+'/'+nf+sa+reqstr+'RETURN-CODE/JS/">'+ts+'/script>'); </script> <noscript> <a href="http://bmuk.burstnet.com/bmuk/clk/s=26510/a=a/v=4.0S/ns/sz=468x60A/KW=" target="_top"> <img src="http://bmuk.burstnet.com/bmuk/display/s=26510/a=a/v=4.0S/ns/sz=468x60A/KW=" border="0" alt="Click Here" /></a> </noscript> <!-- END blinkx Media Ad Network CODE --> </div> Code (markup): Change the width to match what you need, ideally you shouldn't use inline styles unless there's a specific reason to. You should add those CSS rules to a class and then assign that class to this element.
Yes I did say change the width to what you need, set it to 630px see how it looks and just adjust it accordingly.