Inline style for z-index
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en'> <head> <title>z-index</title> <style type='text/css'> body { background: lightyellow; } ul { list-style: none; width: 200px; } li { background: pink; border: 1px solid red; margin: 2px; position: relative; width: 200px; height: 20px; } div { background: lightblue; border: 1px solid blue; position: absolute; z-index: 2; top: 2px; left: 150px; height: 100px; width: 200px; } </style> </head> <body> <ul> <li style='z-index: 4;'> <div></div> </li> <li style='z-index: 3;'></li> <li style='z-index: 2;'></li> <li style='z-index: 1;'></li> </ul> </body> </html>