1
我有一个包含三个图像的div,我想将它居中放置在页面的中心(很像Google搜索栏)。我尝试过几乎所有的东西(位置,边距等),但是即使我把它放在一台显示器上,当我将它移动到不同的显示器时,它也不会集中在新显示器上。请帮忙!居中包含图像的DIV,无论窗口大小如何
下面是HTML:
<div id="boxes">
<a href="voting_registration.html" target="_blank"> <img src="images/VR.jpg" alt="Voting Registration Information" class="list" /></a>
<a href="ballot.html" target="_blank"> <img src="images/PCB.jpg" alt="Platforms, Candidates and Ballots" class="list" /></a>
<a href="voting_information.html" target="_blank"><img src="images/VI.jpg" alt="Voting Information" class="list"/> </a>
</div>
[Flexbox:水平和垂直居中]的可能重复(http://stackoverflow.com/questions/19026884/flexbox-center-horizontally-and-vertically) –
[居中响应div与图像内部]的可能重复( http://stackoverflow.com/questions/34408145/centering-responsive-divs-with-images-inside)以及通过搜索搜索到的其他众多答案。 – Rob