我无法将图像居中,div
因为它是向左浮动的。我尝试过文本对齐并设置边距。
CSS:
.to_left_690 {
width: 690px;
float: left;
}
.to_left_290 {
width: 290px;
float: left;
overflow: hidden;
text-align: center;
}
p {
margin: 0 0 14px 0px;
text-align: justify;
}
img {
display: block;
margin-left: auto;
margin-right: auto;
}
HTML:
<div class="to_left_690">
<h3>Date Center</h3>
<p>One of the biggest` data centers in Latin America with over 3000 servers took a proactive approach to monitor their electrical infrastructure. Over 4 years later they have still not had any major disruptions.</p>
<h3>Call Center</h3>
<p>
<img class="alignleft size-full wp-image-181" alt="baloons" src="http://www.sheerdigitaltest.net/janus/wp-content/uploads/2013/07/baloons.png" width="62" height="70">During Carnival 2013 the data center air conditioning failed for a call centre company and no-one on site. Thanks to early detection and alerts sent to the standby maintenance team they were quickly able to resolve the situation and prevent a catastrophic shutdown.</p>
<h3>Facilities Management:</h3>
<p><span>With over 1200 people working at headquarters the TJES needed a solution to maintain proper working conditions to be able to perform with the minimum of disruption. Janus Technology solutions have eliminated all problems and saved millions in lost productivity over 2 years</span>
</p>
</div>
<div class="to_left_290">
<img class="size-full wp-image-183 aligncenter" alt="ipad" src="http://www.sheerdigitaltest.net/janus/wp-content/uploads/2013/07/ipad.png" width="290" height="368">fdsfdsfdsfds</div>
JSFIddle:http: //jsfiddle.net/xLwSh/