我试图将这个 div 背景集中在www.bakoproduction.com。当我添加margin: auto
到 css.div.background img
时,它使图像居中,但不显示其余图像。这是我的css,如果有人可以帮助我,我将不胜感激。
<style type="text/css">
body {
margin: auto;
padding: 0;
width: 100%;
text-align: center;
}
.fondolineas {
background-image: url(fondo.gif);
background-repeat: repeat-x;
}
.demo-ad-top{
margin:20px 0;
}
.gradient {
background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.28, rgb(255,201,116)), color-stop(0.64, rgb(228,143,10)) );
background-image: -moz-linear-gradient( center bottom, rgb(255,201,116) 28%, rgb(228,143,10) 64% );
width:300px;
height:150px;
padding:5px;
}
h1 {
font:bold 14px/1.5em "Trebuchet MS", Trebuchet, Arial, Verdana, Sans-serif;
text-transform:uppercase;
}
div.background {
position: absolute;
left: auto;
top: auto;
z-index: -1;
alignment-adjust: central;
background-position: center;
text-align: center;
}
div.background img {
position:fixed;
list-style: none;
left:auto;
top:auto;
}
div.background ul li.show {
z-index:500
}
.content {
width:1200px;
margin-left:auto
margin-right:auto
background:#fff;
padding:30px;
}
</style>