Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 20th, 2007, 08:25 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default avoiding a <div> to go under the frame

hi all,

I have frameset with 2 frames in one of which I have a drop down menu which is made up of a <div> with style="position:absolute".
The problem is that the div will go under the frame border and will not appear on top. Is there any solution to avoid this?

Best Regards

Nerssi
 
Old March 26th, 2007, 02:24 AM
Friend of Wrox
 
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi,
You've to use iframe and set the size and position of it as the same as the div you've used for menu, and set the z-index of the iframe one less than the div so that it comes under the div and div gets displayed on top of it.

Regards,
Rakesh
 
Old April 7th, 2007, 07:19 AM
Friend of Wrox
 
Join Date: Sep 2004
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Default

well,

I don't know if I got it right but I tried following your recommendation (with no success). The 2 html pages below are the 'frameset page' and the 'left frame'(test.html) respectively. Opening the first page you will notice that the contents of the div will go under the frameset border...

<html>
    <frameset cols="150,*">
        <frame src="test.html">
        <frame src="">
    </frameset>
</html>


<html>
    <head>
    </head>
    <body>
    <iframe style='position:absolute;top:10px;left:10px;z-index:4' height='150px' width="150px">
    </iframe>
    <div id ='menu'
style='position:absolute;top:10px;left:10px;z-index:5;height:150px;width:150px' >
        This text goes under the frame border
    </div>
    </body>
</html>


How shall I prevent the 'menu' DIV to go under the frame border(And it is not my choice to use iframe instead of frameset).

Best Regards

Nerssi






Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript with <div> aware Javascript How-To 3 August 25th, 2005 05:57 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
sizeable <div> johnjohn Javascript How-To 1 December 8th, 2004 08:28 PM
scrolling <DIV> anshul Javascript How-To 12 August 4th, 2004 09:51 AM
<A><DIV><TABLE></DIV></A> anshul HTML Code Clinic 2 July 17th, 2004 02:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.