View Single Post
  #2 (permalink)  
Old 06-24-09, 12:15 PM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
This will work if the info div is the first div element in the main div element.
And to get it to work in IE you need to specify a doc type.

Example:
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<style>
#main
{
 width:200px;
 height:200px;
 border:1px solid #f00;
 }
#main > div:first-child
{
 width:100px;
 height:100px;
 border:1px solid #000;
 }
</style>
</head>
<body>
<div id="main">
 <div id="info"></div>
</div>
</body>
</html>
__________________
Jerry Broughton
Reply With Quote