Hello, I am trying to align to center of my table the adbrite code with no luck ! Althought for adsense the <P align..... is working i cant find a way to cente adbrite code ! Can you please help me with that, as its ruining all my template view. Thanks in advance
<div style="width:600px; background-color:gray; text-align:center;"> <div style="width:400px; background-color:yellow; margin:auto;"></div> </div> Code (markup): That generally works whether or not both containers are divs or not. I think they both need to be block level elements. At least this is the way I do it. I give the outer block level container a width(greater than that of the inner container) and text-align value of "center". Then I make in the inner container less wide than the outer container and give the margin property a value of "auto".
<script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'E6E6E6'; var AdBrite_Border_Color = 'FFFFFF'; var AdBrite_URL_Color = '008000'; </script> <script src="http://ads.adbrite.com/mb/text_group.php?sid=DELETED" type="text/javascript"></script> <div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=DELETED&afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here</a></div> <!-- End: AdBrite --> Code (markup): Thanks for your reply, can you please be a little more specific ? Where do i have to put the div code? The area is 400px wide and the ad code i am putting is 350px wide. Thanks in advance
Have you tried sticking <center></center> tags around it? I never seen them AdBrite ads, still, it might work.
Maybe this? <div style="width:400px; text-align:center;"> <script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'E6E6E6'; var AdBrite_Border_Color = 'FFFFFF'; var AdBrite_URL_Color = '008000'; </script> <script src="http://ads.adbrite.com/mb/text_group.php?sid=DELETED" type="text/javascript"></script> <div style="width:350px; margin:auto;"><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=DELETED&afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here</a></div> <!-- End: AdBrite --> </div> Code (markup):
LogicFlux it didnt worked see what i mean here : h**p://www.mixed.gr/index.php?option=com_seyret&Itemid=2&task=videodirectlink&id=2688 you can see the adbrite ads right below the video area
Doesn't look like the adbrite ads are showing up for me. I can see the code in the source but not the ads on the page. Anyway, you didn't put the inline style into the inner div. <div><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=761073&afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here</a></div> Code (markup): should be <div style="width:350px; margin:auto;"><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=761073&afsid=1" style="font-weight:bold;font-family:Arial;font-size:13px;">Your Ad Here</a></div> Code (markup):
Well its both adsense and adbrite on the same adbrite code ! I changed to the settings you told me but nothing ! WOOOOOOOO,, its just doesnt work !
Change this <div style="width:350px; margin:auto; background-color:gray; text-align:center;"> to this <div style="width:350px; margin:auto; background-color:gray; text-align:center;"> Just put in the text-align:center; . And you can take out or change the background-color property, I just did that because it gives a good visual of what space the element takes up on the page. If you want the text inside the box to be left aligned then you can put another div inside this div and set the text-align on that div to text-align:left;
Really nice with the grey colour, i changed that tried possible variations and placements of the div , i get the Your ad here alligned but not the ad script itself
It centers in IE7 pretty much how it's supposed to. I don't know why it's not working in FF. I assume you're using FF too? I think you might have to center the content in the iframe since that's where the ad is being displayed from.(and you'll probably have to do that by scripting the DOM) I've tried putting a div directly around the script that inserts the iframe and playing with its text-align and margin properties with no luck. I don't know what else to try, I usually fix problems like this by trying stuff until I get lucky.
yes i was using Firefox ! I tried with explorer and everything appears ok ! I give up mate, This is totally crap, trying to allign a ad code for the past 2 days ! hahaha! Thanks a lot for your help, reputation given