Hello, I am working on a new design for my website, elvenprog.com. Everything was going great... until I wanted to wrap my text around a google adsense ad box. I floated my elements, and set margins, but... IT DOES NOT WORK!!!! Could you please let me know what I am doing wrong, or not doing to get the text to wrap? Thanks! My codes are below: Here is the css for my text: .text { top:390px; width:740px; left: -90px; FONT-SIZE:20px; color:black; position:relative; margin: 5px 5px 5px 5px; z-index: 7; float:center; } Here is the CSS for my ad: .adds { top:435; left:200; z-index: 9; STYLE="TEXT-DECORATION: NONE"; position:relative; float:left; margin: 5px; } Html Codes: Text: <p class="text" style=â€float:center"> Ads: <span class="adds"> <div style=â€float:left"> Code (markup):
There are quite a few mistakes in your CSS. You can't float center, and using floats with relative positioning is counter productive. You also have an invalid line in the adds class (STYLE="TEXT-DECORATION: NONE". I don't generally wrap text around divs, but instead position the elements exactly where they should be in relation to one another. There are plenty of tutorials on google for exactly what you need.
I think you only need to float the Google ads to left or right then margin, it's enough, for example: <div class="Ads" style="float: left; width: 300px; height: 250px; background: #000; margin-right: 10px; margin-bottom: 10px"> ads here </div> your text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text hereyour text here Code (markup):