Click to See Complete Forum and Search --> : CSS Text Wrap Problem in WordPress and IE6


natsegal
10-12-2006, 02:21 PM
I'm hoping you can help me. I have a problem with CSS that I'm using in WordPress. Essentially I want text in my posts to wrap around an Adsense box.

Here's the code I've been using:

<div style="float:left; margin:7px;">
<script type="text/javascript"><!--
google_ad_client = "pub-9244062874916987";
google_alternate_ad_url = "http://www.alternateurl.com/show?memid=832&size=300x250";
google_ad_width = 300;
google_ad_height = 250;
google_ad_format = "300x250_as";
google_ad_type = "text_image";
google_ad_channel ="4071658591";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "333333";
google_color_text = "333333";
google_color_url = "0000FF";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script> </div>


The problem is this, when I use Firefox, the code works perfectly and the text wraps around the AdSense the way I want it to, but in IE6 it won't. No matter what I do, the text won't wrap. I've tried different tags, attempting to insert the code into the PHP files and I can't get it to work consistently. Sometimes it appears to wrap at one browser size but when I click on maximize it all goes to pieces.

Does anyone know of a workaround/hack that will work?

Any help would be greatly appreciated.

sutabi
10-12-2006, 08:49 PM
IE and Css margins do not get along, use padding instead, even if that means you'll need an extra div

natsegal
10-12-2006, 10:19 PM
I suspected that was the problem. One more question though. Can you show me an example of what this would look like? I'm brand new to CSS and I've been bashing my head trying to find a solution.

Thanks in advance for your help.

Nathan

ray326
10-12-2006, 10:25 PM
Do you have a valid DOCTYPE?

sutabi
10-13-2006, 12:48 AM
Do you have a valid DOCTYPE?

Ray has a point, there is something called Quirks Mode for browsers look it up.

you show me an example of what this would look like?

<div style="padding: 7px;">
<div style="float: left;">
// Js stuff here
</div>
</div>

natsegal
10-13-2006, 01:28 AM
Good question. I don't know since everything is automatically generated using templates in WordPress. What should I be looking for? Can you show me an example?

BTW, thanks for the code snippet. I'll try it out tomorrow and see if it works.

Regards,

Nathan

sutabi
10-13-2006, 02:39 AM
Well if I could see the page I would provide a more intrusive decision.

natsegal
10-13-2006, 11:59 AM
You can access the site here: http://www.natsegal.com/blog/

Any of the posts where I've written articles is where I'd like to post the AdSense with the text wraps.

Regards,

Nathan