Hi all I have a problem in firefox that is frustrating me and I can't find the answer. I have a simple div tag to place some adsense code on a page. Here is the code: #ad { float: left; margin-right: 20px;} In I.E. the graphic (lady lying and leaning on her hand) spaces properly (20px) to the right of the adsense code. In firefox, the graphic does not move to the right. I tried padding and the same results. They say a picture is worth a thousand words. Here is the link to the site: http://www.filipinaeyes.com/indexAD.htm (scroll down to about the middle of the page). In I.E. it looks fine, in Firefox, not the case. Does anyone have a clue how I can move the graphic to the right by 20px when browsing with Firefox, like it looks for I.E.? It looks perfect in I.E. but I'm a firefox fan and hate that I can't get it to look like I want in firefox. Help please. Thanks Steve
padding-right: -20px !important; padding-right: 0px; Code (markup): "!important;" works only in FireFox, IE will simply ignore the line (I don't know about IE7).
Firefox is acting correctly. This is an artifact of IE's faulty float model. Your best bet would be to code the image as foreground content. I believe that would be more semantically correct, too. cheers, gary
SoKickIt Why 140px?? That worked for firefox, but not I.E.? I'm guessing, but you used 140px because the adsense code is 120px wide -- I'm always trying to learn. But with 140px, it pushes the form and text under the adsense code in I.E. Even though I love firefox, I have to pay attention to IE because so many people use it. Is there any solution to get it to work correctly in both IE and Firefox? It looks perfect now in firefox. If I could only now get it to look the same in IE without messing it up in firefox, I'd be a happy webmaster. Any suggestions? http://www.filipinaeyes.com/indexAD.htm (scroll down to about the middle of the page) thanks p.s. I appreciate you guys help. I tired a few other forums and others didn't even respond. Thanks
Update........I got it figured out. Thanks everyone for your support. Sometimes you just need input to try different things out. For anyone who is interested. The key was the 140px for pic2. After I had posted above, I went back in and got rid of my code padding and margin for float left and all fell into place. Thanks Again Steve