Hello!
im having some issues with a image.
1) I have created a div and i have put a background image on that div.
2)know, i have put a image inside that div i created..and it is always in the center by default.
My question is: How do i move or position that images inside the div. I have tried margin-left/rigth but it doesent seem to work,...the VSPACE OR HSPACE are
the only ones that works(in firefox only but not in EI) im looking for a way to make it work on firefox and in EI).
Tks..in adv
-------------------------------------------------------------------------------------
<html>
<head>
<meta/>
<title>My personnal page_learning_test</title>
<style type="text/css" media="all">
body{
background-color:#e0edc5;
text-align:center;
}
#top_square{
margin-left: auto;
margin-right: auto;
}
#little_squares{
margin-left: auto;
margin-right: auto;
}
#blue_square{
width:600px;
height:145px;
background-image:url(images/center_div1.jpg); (this is the div that has a background image
margin-left: auto;
margin-right: auto;
}
#link_squares{
margin-left: auto;
margin-right: auto;
}
#green_square{
width:600px;
background-color:#fff;
overflow:hidden;
margin-left: auto;
margin-right: auto;
}
#bottom_square{
margin-left:auto;
margin-right:auto;
}
</style>
</head>
<body>
<div id="top_square">
<img src="images/top_1.jpg" width="600px" height ="12px"/>
</div>
<div id="little_squares">
<img src="images/little_squares1.jpg" width="600px" height ="131px"/>
</div>
<div id="blue_square">
<img src="images/gray-square.jpg" width="348px" height="111px" /> this is the image that goes inside the div,how can i move the image the way i like?
</div>
<div id="link_squares">
<img src="images/green-rectangle.jpg" width="600px" height="35px"/>
</div>
<div id="green_square" />
<img src="images/green_box.jpg" width="207px" height="298px" align="left"/>
</div>
<div id="bottom_square">
</div>
</body>
</html>
2 Votes


Answers