Ok, confession to start with. I know nothing about CSS. Nevertheless, I have managed to place a 728 x 15 ad in a WP blog, but can't get it working in my TypePad blog. It is centered, but only goes part way across the screen. It's a three column blog and I want the ad under the header, but above the three column break. I've modified the templates, and am pretty sure the only changes that need to be made are in my style sheet. Any suggestions of what to try? I realize I'm not giving you much to go on, but I don't really speak the language.
Thanks Gary. I've got it on a test blog till I can straighten it all out... http://gpstracklog.typepad.com/testing_1_2_3/
Looks fine to me. Perfectly centered in all the browsers I tested (Opera, FireFox, and IE). What do you mean by "it only goes part way across the screen"? Are you talking about it's width? The number of links inside the link unit? Maybe you can post a screenshot so we can get a better idea of what you're seeing.
There are two problems. First are the <style></style> tags that surround the ruleset. Second, the #adsense div has no background color, so it defaults to transparent. That's why you see the green around Google's table. Do this; #adsense { background-color: white; } Code (markup): Don't forget to remove those tags. cheers, gary
Done! Dude, you rock my world. I'd give you more reputation points if DP would let me. Gotta give it to someone else first tho I guess. Happy happy joy joy
Hey Gary, If I wanted to increase the verticla height to 30 px, centerting the 15 px ad on it vertically, how would I do that?
#adsense { [B]margin-top: 8px; margin-bottom: 8px;[/B] background-color: white; text-align: center; margin-left: auto; margin-right: auto; } Code (markup):
Thanks Brian. I put it up on the test blog, but it looks like I picked up space below the ad, but not above.
That's because you have an extra space between the 8 and the px... margin-top: 8 px; Try changing it to... margin-top: 8px;
Thanks for catching that Brian. I made the change, but it doesn't appear to have made any difference.
Does this do something like what you want? #adsense { padding-top: 10px; height: 20px; background-color: white; text-align: center; margin-left: auto; margin-right: auto; } Code (markup): I'm not familiar with how the ads are written, other than the DOM showing a table. You do need to lose the center tag; it's no longer a part of html. As long as the #adsense div is full width,, the margin: auto; thingies don't do a thingie. couldn't help myself. cheers, gary
hmm, I thought that would get it, but I guess margins are not quite what we're looking for in this case. Try this instead... #adsense { [B]padding-top: 7px; padding-bottom: 3px; height: 20px;[/B] background-color: white; color: black; text-align: center; width: 100%; } Code (markup): You can always tweak the values of padding-top and padding-bottom to get it to the exact position you like.