SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation Fixed Positioning and Rollovers

    I am attempting to use a fixed position image in combination with a javascript rollover.

    It will not rollover.

    I have tried different combinations regarding javascript as well as pure CSS(no javascript or image, but type) and I can still not get it to rollover.

    If I change the POSITION tag from "fixed" to "absolute" , it works.

    Does anyone know what is up? Can you help me?

    I am Mac based on IE 5. If I had an IBM I'd check it.

    Thanks a million!
    Last edited by contrastlife; Apr 9, 2002 at 07:52.

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is the image inside a div?

    Can you paste the relevant code so we can take a better look?

    Fwiw, you can use both position: absolute and position: fixed together in the same style set (; position: absolute; position: fixed; ).

    The 'absolute' will act as a fall-back to the 'fixed' in unsupported browsers.
    See here for the W3C method.

    It does exactly what it says on the tin.
    (and is both more stable and more accurate than the javascript method for fixed position items)
    Last edited by Bill Posters; Apr 8, 2002 at 00:46.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  3. #3
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Intresting reply. I took a look at the W3C page a found that that menu was not rolling over as well.

    So I gave my menu and the W3C menu a try in NN6 and 4.6 and what do you know it works!

    But still not in IE 5 Mac, W3C or not.

    Has ANYONE had this issue with MAC IE 5?

    Thanks for the help!

    Any solutions?



    Anyway here is my basic code- yes it is inside a div;


    In my CSS I have-

    #divheader { position: absolute;
    position: fixed;
    }


    In the doc head I have-

    <script language="JavaScript" type="text/javascript">
    image1 = new Image();
    image1.src = "images/design2.gif";</script>


    In the doc body I have-

    <div id="divheader">
    <a href="design.htm"
    onmouseover="image1.src='images/design2.gif';"
    onmouseout="image1.src='images/design1.gif';"><img name="image1"
    src="images/design1.gif" border="0" alt="design" /></a></div>
    Last edited by contrastlife; Apr 8, 2002 at 14:38.


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
  •