centrar divs con background en css
Publicado por javiler (2 intervenciones) el 20/04/2013 17:32:10
hola x mas q busco no soluciono el problema de centrar las imagenes dentro de la imagen del background.
os dejo el codigo.
html
css
muchas gracias. a ver si podeis decirme q hago mal.
os dejo el codigo.
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!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=utf-8" />
<link rel="stylesheet" type="text/css" href="css/principal.css"/>
<title>www.aupaleganes.com Toda la actualidad del Cd Leganés</title>
</head>
<body>
<div id="midiv">
<div id="centrado"><img src="imagenes/escudoleganes.gif" width="227" height="139" /></div><div id="publi"> <script type="text/javascript">
var uri = 'http://impes.tradedoubler.com/imp?type(img)g(18583144)a(2247393)' + new String (Math.random()).substring (2, 11);
document.write('<a href="http://clk.tradedoubler.com/click?p=140883&a=2247393&g=18583144" target="_BLANK"><img src="'+uri+'" border=0></a>');
</script></div>
</div>
</body>
</html>
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@charset "utf-8";
/* CSS Document */
body {
background-image:url(/imagenes/indice.jpg);
background-position: center;
background-repeat: no-repeat;
}
#midiv {
width:960px;
}
#centrado {
float:left;
height:-100px;
width:-500px;
}
#publi {
height:-500px;
width:-1500px;
}
muchas gracias. a ver si podeis decirme q hago mal.
Valora esta pregunta


0