1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nouvelle page 2</title>
<script type="text/javascript"
src="preload.js">
</script>
<style type="text/css">
#parent {
position : relative;
width : 500px;
height : 500px;
border : 1px solid red;
}
#enfant {
position:absolute;
top: 50%; /* pour centrage vertical */
left: 50%; /*pour centrage horizontal */
width : 200px;
height : 200px;
margin-top: -100px; /* margin-top = - height/2 */
margin-left: -100px; /* margin-left = - width/2 */
border : 1px solid green;
}
</style>
</head>
<body>
<CENTER>
<div id="parent">
<div id="enfant">
<img src="ajax-loader.gif" onload="preload (this, '../images/maxi/3280.jpg', null, 414, 643, 100)"/>
</div>
</div>
</body>
</html> |