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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    floating advertise (banner) problem

    i have a javascript which allows me to put a floating advartize
    in HTML pages, so if the user scrolls the page down the banner goes down with the page
    so it's in sight all the time (until the user clicks to close it).

    you can see the example of a working banner here:
    http://www.active.co.il/~gonen_activ...adin-good.html

    when i put the code in a HTML page that includes this line at the top of it:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    the banner is not floating anymore, and it stays in the bottom of the page.

    you can see a version of the bad banner here:
    http://www.active.co.il/~gonen_activ.../adin-bad.html

    by removing this line I solve the problem.
    by removing the absolute link to the file:
    xhtml1-transitional.dtd
    that is in the line, I also solve the problem.

    Unfortunatlly, both are imposibole solutions, because I cant force
    websites that publish my ads to remove this line or part of it (which could also be a rough job when PHP invloved)..
    This line is added my some PHP alpications.

    What could be the solution in the JS code so there won't be a conflict between my floating banner JS and the
    xhtml1-transitional.dtd file loaded to the page ?


    thank you for helping.

  • #2
    New Coder
    Join Date
    Mar 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think the easiest way would be to make a floating div, with normal HTML and CSS, that does the desired float.

    Then you can use javascript to fill the box as desired. The close effect would then be achieved by a simple "document.getElementById('the_box').style.display='none';"

    If i have a quick look at your page i see you use a table. Some browsers have been reported (especially some versions of IE, for a change!) to handle fixed tables. Fixing div's seems to be much better supported.

  • #3
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thank you for your answer,

    can you please tell me how exactlly can i do it ?
    a small example would be most appriciated.

    thank you.


  •  

    Posting Permissions

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