Link to home
Start Free TrialLog in
Avatar of markmchugh
markmchugh

asked on

How do i position DIV within a DIV ?

Hi,
I am new to CSS, trying to position a DIV within the main DIV for my pages, but when i change the values for logo, nothing happens, i.e. it does not move, the code is attached, can somebody please help ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript" src="jquery-latest.js"></script>
<script type="text/javascript" src="thickbox.js"></script>
<style type="text/css">
<!--
 
.main {
	position:absolute;
	left:100px;
	top:100px;
	height:500p
}
 
.logo {
	position:relative;
	left:100px;
	top:100px;
}
 
 
--!>
</style>
</head>
 
<body>
<div id="main">
 
<div id="logo"></div>
<script type="text/javascript">
   var so = new SWFObject("swf/logo9ie.swf", "mymovie", "350", "70", "8");
   so.write("logo");
</script>
 
 
</div>
</body>
</html>

Open in new window

Avatar of MMDeveloper
MMDeveloper
Flag of United States of America image

css code looks good to me, I'd try finishing the 'height' attribute for the .main selector
Avatar of markmchugh
markmchugh

ASKER

yes, i noticed the height one, i've changed it, but its still the same. i cant seem to chenge the position of the logo DIV ?
ASKER CERTIFIED SOLUTION
Avatar of scrathcyboy
scrathcyboy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Your style declarations are for class attributes. You want id attributes. So instead of this:
   .main ...
   .logo ...
you need:
   #main ...
   #logo ...