Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Fading Page on scrolling {CSS + HTML}

  1. #1
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Fading Page on scrolling {CSS + HTML}

    1) CODE TITLE: Fading Page on scrolling

    2) AUTHOR NAME: Faqir Muhammad Bilal

    3) DESCRIPTION: See the URL below

    4) URL TO CODE: http://tfos.webng.com/tfos.html link updated

    CODE UPDATED
    Effect Now More Noticeable
    Last edited by bilal; 07-23-2008 at 01:21 PM.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Nice! Did you make this?
    It'd be nicer if it didn't require so many divs, like if you could use javascript to generate all the divs.
    It also doesn't work in IE.
    Jeremy | jfein.net

  3. #3
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks.
    I did made this.

    It wouldn't work in IE6 and prior versions, because they don't support fixed positioning. But I have an Idea, that I have yet to try, that might make it work in IE6 as well.

    Javascript could have been used to generate all those divs, but I like to see simple CSS do unusual stuff like that.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Would be nicer with a PNG. It could be, say, 1×10, and all of the code would be reduced to one <div> and two style rules.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Barely noticeable.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yes, Tweys idea was better.
    If it doesn't work in IE 7, why are you putting the gross "filter: alpha(opacity=...)?"
    Jeremy | jfein.net

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Nile View Post
    Yes, Tweys idea was better.
    If it doesn't work in IE 7, why are you putting the gross "filter: alpha(opacity=...)?"
    A good point.

    But there is no reason why it couldn't work in IE 7. IE 7 handles fixed positioning properly, so there is probably some other error in the code as regards (probably the filter, but it could be just about anything) IE 7 that is stopping it from working in that browser.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  8. #8
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I don't have IE7. I didn't try this code, on it. I believed, it should work on it.
    But I'll see it on the IE7, and revise the code as soon as I can .

  9. #9
    Join Date
    Sep 2007
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    I've just updated the Code
    It's now more noticeable. The fading bar is now three times it's previous height. Please see the demo link.

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That is a bit more noticable. I think I know why, or at least one reason why the effect isn't working in IE 7. This is how your source code looks to that browser:

    Code:
    <!-- Free Hosting WebNG.com --> 
    <center>
    <script type="text/javascript" charset="utf-8">
      var redvase_ad = { version: 1.5 };
      redvase_ad.publisher = 'webng';
      redvase_ad.kind      = 'leaderboard';
      redvase_ad.content   = 'creative'
      </script>
    <script src="http://redvase.bravenet.com/javascripts/redvase.js" type="text/javascript" charset="utf-8"></script>
    </center>
    <!-- Free Hosting WebNG.com --> 
    <!DOCTYPE HTML PUBLIC
    "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    <head>
    
    <style type="text/css">
    
    body {
    margin: 0px;
    padding: 0px;
    background: white;
     . . .
    Now I am assuming that the part before the DOCTYPE is placed there by the host and that there is nothing you can do about it. However, having anything before the DOCTYPE throws IE 7 into quirksmode, where it doesn't do fixed positioning.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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