dcsimg
Layers and div tags
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   mohamed_yasin
Posted On:   Tuesday, April 24, 2001 02:27 AM

How can i use layers and div tags in
InternetExplorer,Netscape in my web site?
Because layers wont support in Netscape.
And div tag wont support in IE.

Re: Layers and div tags

Posted By:   Christopher_Cooper  
Posted On:   Friday, May 4, 2001 12:10 PM

I use layers to hide form elements, and display when needed. Mostly to emulate client based applications.

I have been able to use the div tags in IE4. I use the div tags with absolute positioning to create a drag and drop effect. The source script I found at The JavaScript Source which is fortunately open source.


I didn't spend the time to format the curley braces{} properly. Also, the ~'s before the div, img and /div tags need removal . I had to put them in so they will display properly.


here is the code





TWO STEPS TO INSTALL DRAG-N-DROP:



1. Copy the coding into the HEAD of your HTML document

2. Add the last code into the BODY of your HTML document



STEP ONE: Paste this code into the HEAD of your HTML document











STEP TWO: Copy this code into the BODY of your HTML document







<~div id="s" style="position:absolute;left:50;top:300;">

<~img src=http://javascript.internet.com/img/cards/spades.gif name="s">

<~/div>



<~div id="d" style="position:absolute;left:50;top:350;">

<~img src=http://javascript.internet.com/img/cards/diamonds.gif name="d">

<~/div>



<~div id="c" style="position:absolute;left:100;top:300;">

<~img src=http://javascript.internet.com/img/cards/clubs.gif name="c">

<~/div>



<~div id="h" style="position:absolute;left:100;top:350;">

<~img src=http://javascript.internet.com/img/cards/hearts.gif name="h">

<~/div>



Just click and hold the 4 suit images to the left and then you can move them around the page!




About | Sitemap | Contact