Gracias Justo. Veo lo que quieres decir acerca de las 4 esquinas ahora.
He encontrado lo que quiero hacer aquí:
http://css-tricks.com/examples/ImageToBackgroundImage/ y he estado trabajando con una plantilla que siempre que el resto del estilo estoy buscando. El problema ahora es la fusión de las dos. He ido dando vueltas y vueltas con esto por horas. Y puedo parecer conseguir estas líneas par de HTML y CSS hacer lo que ellos necesitan!
Heres el código que funciona a la perfección-
HTML
<!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>
<title>Scaling Background</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body id="page-body">
<img id="background-img" class="bg" src="../images/bg.jpg" alt="" />
</body>
</html>
- <!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>
- <title>Scaling Background</title>
-
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-
- <link rel="stylesheet" type="text/css" href="style.css" />
- </head>
- <body id="page-body">
- <img id="background-img" class="bg" src="../images/bg.jpg" alt="" />
- </body>
- </html>
CSS
* {
margin: 0;
padding: 0;
}
body {
font-size: 62.5%;
font-family: Georgia, serif;
overflow: hidden;
}
.bg {
width: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 5000;
}
- * {
- margin: 0;
- padding: 0;
- }
- body {
- font-size: 62.5%;
- font-family: Georgia, serif;
- overflow: hidden;
- }
- .bg {
- width: 100%;
- position: absolute;
- top: 0;
- left: 0;
- z-index: 5000;
- }
Este código HTML y CSS hacer exactamente lo que desea.
Sin embargo estoy tratando de agregar este estilo de fondo a una plantilla. Y me parece que no puede entender cómo cambiar el CSS y HTML para darle el aspecto deseado.
Heres donde creo que el problema es-
PLANTILLA HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Welcome to One Sports Lounge</title>
<link rel="stylesheet" href="style/reset.css" />
<link rel="stylesheet" href="style/style.css" />
<link rel="stylesheet" href="style/nivo-slider.css" />
<script type="text/javascript" charset="utf-8" src="js/jquery-1.3.2.min.js" ></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.cycle.all.2.72.js" ></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.galleriffic.js" ></script>
<script type="text/javascript" charset="utf-8" src="js/cufon-yui.js" ></script>
<script type="text/javascript" charset="utf-8" src="js/titillium.font.js" ></script>
<script type="text/javascript" charset="utf-8" src="js/jquery.nivo.slider.pack.js" ></script>
<script type="text/javascript" charset="utf-8" src="js/boutique.js" ></script>
</head>
<body>...
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Welcome to One Sports Lounge</title>
- <link rel="stylesheet" href="style/reset.css" />
- <link rel="stylesheet" href="style/style.css" />
- <link rel="stylesheet" href="style/nivo-slider.css" />
- <script type="text/javascript" charset="utf-8" src="js/jquery-1.3.2.min.js" ></script>
- <script type="text/javascript" charset="utf-8" src="js/jquery.cycle.all.2.72.js" ></script>
- <script type="text/javascript" charset="utf-8" src="js/jquery.galleriffic.js" ></script>
- <script type="text/javascript" charset="utf-8" src="js/cufon-yui.js" ></script>
- <script type="text/javascript" charset="utf-8" src="js/titillium.font.js" ></script>
- <script type="text/javascript" charset="utf-8" src="js/jquery.nivo.slider.pack.js" ></script>
- <script type="text/javascript" charset="utf-8" src="js/boutique.js" ></script>
- </head>
- <body>...
PLANTILLA CSS
html {
height: 100%;
}
body {
background: #fff url(../images/bg.jpg) top center repeat-x;
color: #222;
font-family: 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, Arial, san-serif;
height: 100%;
}
- html {
- height: 100%;
- }
- body {
- background: #fff url(../images/bg.jpg) top center repeat-x;
- color: #222;
- font-family: 'Lucida Grande', 'Lucida Sans Unicode', Tahoma, Arial, san-serif;
- height: 100%;
- }
Cualquier ayuda sobre este tema sería muy apreciada. Si no puedo obtener el aspecto que quiero me conformaré con el otro.
