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 4 of 4
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS acting different in FF and IE

    I'm currently just throwing concepts together to learn techniques, which I will use to create a more original site. I had the js working here. If you click the hide/unhide, the CSS class, which contains id's, expands and shrinks accordingly. Then I wanted to add a footer that stays glued to the bottom, to do this I had to group my layout and but it in a container (id). The footer works how it should in both browsers, but now the hide/unhide only works in IE. In IE it expands and the right div hides, in FF the div hides, but the content doesn't expand. Here is the link that is causing the problem. My JS code is in the source, the only thing that changed coding wise is the new container that surrounds everything but the footer. Not sure if it is a flaw in FF, because it works fine in IE. The weird thing is, in the JS code, if I change the 10 to a 0 in:
    Code:
    x.style.marginRight = (style2.display == "none") ? "10":"205px";
    then both browsers behave accordingly, expanding it to the edge of the screen, but if I put it to 10 how I want it, only IE works. Is the new main container causing problems to js?

  • #2
    Regular Coder
    Join Date
    Feb 2005
    Posts
    525
    Thanks
    0
    Thanked 0 Times in 0 Posts
    x.style.marginRight = (style2.display == "none") ? 10:205+"px";
    Single Paradox
    My Site (Under construction)

    Not too bad for a 15 year old

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Still didn't work, it was fine until the added container, but I know it has to be possible, IE of all things is working right.

  • #4
    New Coder
    Join Date
    Aug 2005
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Fixed it the resizing, now have to figure out why the foot moves, thanks.
    Last edited by atomicnuke; 08-16-2005 at 06:18 PM.


  •  

    Posting Permissions

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