Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Apr 2009
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts

    CSS Positioning Problem

    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)?

  • #2
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Setting .adblock to display:inline seems to fix the problem - or you could probably dispense with it altogethe.r

  • #3
    Regular Coder
    Join Date
    Dec 2007
    Posts
    107
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Is this solved?
    Programming & Webmaster Forum - AdSense Revenue Sharing forum

  • #4
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Is this solved?
    Eight minutes after a possible solution is posted you ask this question.
    Why?

  • #5
    New Coder
    Join Date
    Apr 2009
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Senior Coder
    Join Date
    Feb 2009
    Location
    Ilkley, West Yorkshire, UK
    Posts
    2,950
    Thanks
    9
    Thanked 724 Times in 718 Posts
    Hmm.

    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:

    Code:
    <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;}
    </style>
    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.
    Last edited by SB65; 10-28-2009 at 03:14 PM.

  • #7
    New Coder
    Join Date
    Apr 2009
    Posts
    51
    Thanks
    5
    Thanked 0 Times in 0 Posts
    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?

  • #8
    Senior Coder Rowsdower!'s Avatar
    Join Date
    Oct 2008
    Location
    Some say it's everything.
    Posts
    2,027
    Thanks
    5
    Thanked 397 Times in 390 Posts
    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:
    Code:
    .adblock {display:inline !important;}
    The object of opening the mind, as of opening the mouth, is to shut it again on something solid. –G.K. Chesterton
    See Mediocrity in its Infancy
    It's usually a good idea to start out with this at the VERY TOP of your CSS: * {border:0;margin:0;padding:0;}
    Seek and you shall find... basically:
    validate your markup | view your page cross-browser/cross-platform | free web tutorials | free hosting


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •