Salut les gars,
J'ai un énorme problème. Jaimerais mettre mes images au milieu d'une div. Chaque image a une taille différente (il serait d'une galerie).
J'ai essayé plusieurs solutions, mais aucune n'a fonctionné.
Mon plus gros problème est les photos ont une ombre, je dois donc les prendre et de l'ombre également dans le milieu.
Merci
css
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 100%;
background-color: #000000;
margin: 0 auto;
padding: 0 0 0 0em;
}
#container {
width: 801px;
height: 600px;
background-color: #FFFFFF;
border: 1px solid #9f9e9e;
margin:0 auto;
}
#body {
width: 799px;
height: 460px;
margin: 1px 1px 1px 1px;
}
#body_left {
width: 306px;
height: 458px;
background-image: url(../images/body_left.jpg);
border: 1px solid #9d9c9c;
float: left;
margin:0px 1px 0px 0px;
}
#body_right {
width: 488px;
height: 458px;
background-color: #d5ded6;
border: 1px solid #9d9c9c;
float: left;
margin:0px 0px 0px 0px;
}
.img_wrapper {
background: url("../images/picture_background.gif") no-repeat bottom right;
float: left;
}
.img_wrapper img {
background-color: #FFFFFF;
border: 1px solid #504e4e;
padding: 4px 4px 4px 4px;
margin: 0 auto;
position: relative;
right: 3px;
}
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>dora vorosmarty</title>
<link href="css/stylessheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="container">
<div id="body">
<div id="body_left">
</div>
<div id="body_right">
<div class="img_wrapper">
<img src="images/img01.jpg" />
</div>
</div>
</div>
</div>
</body>
- css
- body {
- font-family: Arial, Helvetica, sans-serif;
- font-size: 100%;
- background-color: #000000;
- margin: 0 auto;
- padding: 0 0 0 0em;
- }
- #container {
- width: 801px;
- height: 600px;
- background-color: #FFFFFF;
- border: 1px solid #9f9e9e;
- margin:0 auto;
- }
- #body {
- width: 799px;
- height: 460px;
- margin: 1px 1px 1px 1px;
- }
- #body_left {
- width: 306px;
- height: 458px;
- background-image: url(../images/body_left.jpg);
- border: 1px solid #9d9c9c;
- float: left;
- margin:0px 1px 0px 0px;
- }
- #body_right {
- width: 488px;
- height: 458px;
- background-color: #d5ded6;
- border: 1px solid #9d9c9c;
- float: left;
- margin:0px 0px 0px 0px;
- }
- .img_wrapper {
- background: url("../images/picture_background.gif") no-repeat bottom right;
- float: left;
-
- }
- .img_wrapper img {
- background-color: #FFFFFF;
- border: 1px solid #504e4e;
- padding: 4px 4px 4px 4px;
- margin: 0 auto;
- position: relative;
- right: 3px;
- }
- HTML
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>dora vorosmarty</title>
- <link href="css/stylessheet.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <div id="container">
- <div id="body">
- <div id="body_left">
- </div>
- <div id="body_right">
- <div class="img_wrapper">
- <img src="images/img01.jpg" />
- </div>
- </div>
- </div>
- </div>
- </body>