Estoy creando una página web, donde tengo una imagen, que quiero colocar en el centro y luego en la parte superior de esa imagen quiero ingresar cajas y etiquetas y botón de enviar.Haga que la imagen vaya detrás del texto y manténgala en el centro usando css
estoy tratando de utilizar el css
img.center
{
z-index:-1;
}
pero esto no funciona. y cuando cambio el código para
img.center
{
position:absolute;
left:0px;
top:0px;
z-index:-1;
}
si hacer que la imagen vaya detrás, pero entonces como antes y left:0px
top:0px
... se pone la imagen en loaction 0,0 .. pero quiero la imagen para quedarse en el centro.
para mantener la imagen en el centro tengo <div align="center">
etiqueta.
hay de todos modos, puedo mantener la imagen en el centro y hacerla ir atrás también?
Mi página html es el siguiente: (i me trató de tener una imagen de fondo para mi etiqueta div, pero ninguna imagen está apareciendo por allí)
<html>
<head>
<title>Question of the Week</title>
<style type="text/css">
body
{
background-image:url('images/background.jpg');
background-repeat:repeat-x;
}
.container
{
background-image:url('images/center.jpg');
background-repeat:no-repeat;
}
td.cntr {padding-top:50px;}
</style>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><div align="left"><img src="images/logo.jpg"></div></td>
<td></td>
<td><div align="right"><img src="images/right_logo.jpg"></div></td></tr>
</table>
</tr>
<tr>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="cntr">
<div id="container">
<input name="box" type="textbox" />
<input name="box" type="textbox" />
<input name="submit" type="submit" />
</div>
</td>
</tr>
</table>
</tr>
</table>
</body>
</html>
¿Se puede compartir el código HTML? Cómo se configura el HTML tendrá un gran efecto sobre qué CSS es necesario. –