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 7 of 7

Thread: rollover help

  1. #1
    New Coder
    Join Date
    Mar 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    rollover help

    Hello

    Ive set up a web page www.amalgam-models.co.uk/james/test2.htm that has css rollovers at the top. Then underneath the bottom box youll see a cross where an image hasnt loaded this is because i am currently playing with it.
    Basically what happens is as you mouseover the rollovers in that box at the bottom it tells u what the image is in text. I did this using a double rollover in html where the text is saved as an image gif and is called up when u rollover the top image. What I want to know is if there is another way of doing it other than saving the text as gifs because ill have a lot of pages and it would be easier just to update the text in html or the css.

    Any ideas would be greatly apprecited.

    Thankyou

  • #2
    Regular Coder
    Join Date
    Aug 2004
    Location
    codegoboom@yahoo.com
    Posts
    999
    Thanks
    0
    Thanked 0 Times in 0 Posts
    *this message will self destruct in n-seconds*

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kentucky
    Posts
    133
    Thanks
    0
    Thanked 1 Time in 1 Post
    Yes, you can do this without using a gif. Just put a <div> in place of the <img> you are replacing, and use a script something like this (as an example):

    Code:
    <html>
    <head>
    <title>new document</title>
    
    <script language="JavaScript">
    
    function setDescription(strText)
    {
    	document.getElementById("objDescription").innerHTML = strText;
    }
    
    </script>
    
    </head>
    
    <body>
    <a href="#" onmouseover="setDescription('This is the First Link');" onmouseout="setDescription('');">First Link</a> | 
    <a href="#" onmouseover="setDescription('This is the Second Link');" onmouseout="setDescription('');">Second Link</a>
    
    <div style="position: relative;" id="objDescription"></div>
    </body>
    </html>

  • #4
    New Coder
    Join Date
    Mar 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hi

    Hi thanks for the reply, would it be possible to adapt this code to work so that the text appears when u mouseover a css rollover?

  • #5
    New Coder
    Join Date
    Mar 2005
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thanks

    Hi just to let u know I have been testing the code and it works brilliantly and its really simple. Thanks for the great solution youve helped me out loads,
    thankyou.

  • #6
    Regular Coder
    Join Date
    Jul 2002
    Location
    Kentucky
    Posts
    133
    Thanks
    0
    Thanked 1 Time in 1 Post
    To my knowledge, no. Sorry.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    No cross-posting!

    Please read the Posting Guidelines concerning cross-posting; DO NOT post the same question in more then one forum.

    Concerning the rollovers: yes, it is possible without JavaScript and using simple text. The text fragment needs to be a part of the element that's rolled over, and the :hover state can toggle the visibility of this text fragment on and off.
    It has to be positioned absolutely to the desired location, though, but seeing your example this shouldn't be a problem.
    Regards,
    Ronald.
    ronaldvanderwijden.com


  •  

    Posting Permissions

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