View Full Version : CSS Positioning Problem

10-27-2009, 10:27 PM
Here is the site: www.freelancereview.net

I can't seem to get the small 125x125 ads to appear correctly in IE. If you view the site in FF or Safari, the ads appear perfectly, but not in IE. Any help beyond fix the validation (getting there)?

10-28-2009, 09:33 AM
Setting .adblock to display:inline seems to fix the problem - or you could probably dispense with it altogethe.r

10-28-2009, 09:41 AM
Is this solved?

10-28-2009, 10:39 AM
Is this solved?

Eight minutes after a possible solution is posted you ask this question.

10-28-2009, 02:51 PM
Thanks for the reply SB, I tried adding that to the style sheet but it didn't seem to work for me... any other ideas? Or maybe I did it wrong. I guess I could set the style as an inline style, would that override the .adblock that is currently styling it, because that was just part of the code, I didn't create that.

10-28-2009, 03:09 PM

There's some odd things in your code, it looks like you've got some javascript which is creating the style as the page is formed, and yes, this is overriding any entry in your css.

Have a try by adding:

.adblock{display:inline !important}

in your css, and see if that does the trick.

EDIT: Just to expand on the issue a little, in Firebug I'm seeing the following at line 930:

<style type="text/css">
div#bsaz_1242348.adblock {width:100%;display:block;} div#bsaz_1242348.adblock a{width:125px;} div#bsaz_1242348.adblock a img{padding:0;} div#bsaz_1242348.adblock a em{font-style:normal;} div#bsaz_1242348.adblock a{display:block;font-size:11px;color:#888;font-family:verdana,sans-serif;margin:0 10px 10px 0;text-align:center;text-decoration:none;overflow:hidden;float:left;} div#bsaz_1242348.adblock img{border:0;clear:right;} div#bsaz_1242348.adblock a.adhere{color:#666;font-weight:bold;font-size:12px;border:1px solid #ccc;background:#e7e7e7;text-align:center;} div#bsaz_1242348.adblock a.adhere:hover{border:1px solid #999;background:#ddd;color:#333;} div#bsaz_1242348.adblock a.adhere{width:125px;height:125px;line-height:1000%;} html>body div#bsaz_1242348.adblock a.adhere{width:123px;height:123px;} div#bsaz_1242348.adblock img.s{height:0;width:0;}

which isn't in your source code and is generated by javascript (I think...). The first line of this is causing the issue:

div#bsaz_1242348.adblock {width:100%;display:block;}

Removing the width or setting display:inline would fix IE.

10-28-2009, 07:02 PM
OK, thanks again SB. How do I add this when the Javascript is calling it up? I can't just add it to the style sheet can I?

10-28-2009, 07:07 PM
Fixing it in the javascript is better, but if you can't wade through it all to find the source of the problem you can just use !important after your style property. It should work here. It would look something like this:
.adblock {display:inline !important;}