Results 1 to 2 of 2

Thread: simple horizontal slide panel - IE7 DOM, Jquery

  1. #1
    Join Date
    Jun 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default simple horizontal slide panel - IE7 DOM, Jquery

    for: http://f1shw1ck.com/activity_viewer/slider.html#

    I'm trying to have a simple slide panel move in from the left and overlay the main content to the right. This works as I want it in FF, but in IE the main content is pushed further to the right, instead of remaining in place.

    Perhaps this question is more about me not understanding the DOM, but any help would be appreciated...

    Thanks,

    -J

  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 be better to have the panel that slides in position absolute, sliding in over a static positioned content area. But the way you have it (with the main content on the page position absolute) can work out. But in IE position absolute alone isn't enough (it is in FF, Opera, others) to take an element out of the flow of the page . To do that in IE, you also have to specify the top and left coordinates:

    Code:
    #content {
    	float:left; 
    	position:absolute;
    	margin-left:50px;  
    	z-index:1;
    	top:0;
    	left:0;
    }
    I used 0, but you could specify like 12px, or whatever.

    Floating an absolutely positioned element is likely to have no effect, or to have uneven effects in various browsers.
    - 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
  •