Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dropdown menu going behind a block

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
Using the following code, position: absolute keeps .rightcol correctly positioned when a tree type menu expands and contracts in leftcol.

<style>
.leftcol {
position: absolute;
left: 0px;
top: 0px;
width: 175px;
margin: 0x;
padding: 0x;
border: 0px solid black;
background-color: #eeeeee;
}

.rightcol {
margin-left: 175px;
padding: 0px;
border: 0px solid black;
background-color: #dddddd;
}

p { font: 10pt verdana,sans-serif; color: black;
padding: 20px; margin: 0;
border: 0px dotted black; }
</style>
</head>

A dropdown menu drops down over .rightcol correctly but behind .leftcol

z-index of the dropdown menu is 100.

Apart from repositioning the block further down the page to avoid the problem, what other alternatives are there, please?

TIA HTH

Chris [pc2]
 

<style>
.leftcol {
position: absolute;
left: 0px;
top: 0px;
width: 175px;
margin: 0x;
padding: 0x;
border: 0px solid black;
background-color: #eeeeee;
z-index:-100;
}

That fixed it! HTH

Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top