Results 1 to 5 of 5

Thread: Dock Content script Horizontal Please

  1. #1
    Join Date
    Aug 2008
    Location
    Jackson, MS
    Posts
    13
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default Dock Content script Horizontal Please

    1) Script Title: Dock Content script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...ockcontent.htm

    3) Describe problem: I found the script I've been looking for however; my website is horizontal scroll only

    Is there a way someone can rearrange the script to allow the docking for horizontal scroll...right now it only works for vertical. I would like for the mp3 player to be docked.

    Http://www.annseale.com/test.html

  2. #2
    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

    It would probably be simpler and look better to just use fixed positioning. This will not work for IE 6 and below though. If that's important to you (and I think it would/should be), there's a fairly simple workaround for that.

    For fixed positioning, you just use style, say your element has a class of fixedPos (for example, in your stylesheet):

    Code:
    .fixedPos {
    position: fixed;
    left: 30px;
    bottom: 20px;
    }
    Then for IE 6 and less, you can add this conditional code and stylesheet below that:

    Code:
    <!--[if lt IE 7]>
    <script type="text/javascript">
    function fixedIE(tl, n){
    var sc='scroll'+tl, d=document, c='compatMode';
    return d[c] && d[c]=='CSS1Compat'? d.documentElement[sc]+n+'px' : d.body[sc]+n+'px';
    }
    </script>
    <style type="text/css">
    .fixedPos {
    position:absolute;
    left:expression(fixedIE('Left',30));
    }
    </style>
    <![endif]-->
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2008
    Location
    Jackson, MS
    Posts
    13
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the response.. will this allow the docked div to continuously be on the screen even though scrolled horizontal? Should I remove the java scripting? or include the fixed positioning with the code that is already in place?

  4. #4
    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

    Yes it will. Yes remove the script.
    - John
    ________________________

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

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Digital.Patience (11-03-2008)

  6. #5
    Join Date
    Aug 2008
    Location
    Jackson, MS
    Posts
    13
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the posting I ended up changing the entire website design. But I will definitely use this in future projects.

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
  •