我想要做的是让一个图像居中,然后另一个与它对齐的图像与它对齐。我尝试过搜索,但没有发现任何正确的方法。任何建议将不胜感激。
HTML
<div class="container">
<header>
<div>
<a href="index.html">
<img src="left.png" border="0" width="174" height="350" />
<img class="center" src="center.png" border="0" width="700" height="350" />
</a>
</div>
CSS
html
{
min-height:100%;
}
body
{
background-color: #9CF;
background-repeat: no-repeat;
}
body,td,th
{
font-size: large;
margin: 3% 5% 3% 5%;
}
.container
{
background-color: rgba(0,0,0,0.4);
padding: 6px;
}
.linkbg
{
background-color: #000000;
color: #FFF;
text-align:center;
}
.dashboard
{
text-align:right;
}
ul
{
background-color: #0099CC;
width:100%;
text-align:center;
list-style-type:none;
margin:0;
padding:0;
padding-top:6px;
padding-bottom:6px;
opacity:0.7;
}
li
{
display:inline;
}
.nava:link,.nava:visited
{
font-weight:bold;
color:black;
background-color:##0099CC;
text-align:center;
padding:6px;
text-decoration:none;
text-transform:uppercase;
}
.nava:hover,.nava:active
{
background-color: #00FFFF;
}
img
{
max-width: 100%;
height: auto;
width: auto\9;
}
.center
{
display:inline-block;
margin-left:auto;
margin-right:auto;
}