我正在使用bootstrap的问题。出于某种原因,第三栏被推倒了。我不知道为什么。我完全坚持这个问题,它只是出于某种原因才发生在这个页面上。任何帮助将不胜感激。
echo 'hello' | tee aa bb
答案 0 :(得分:2)
你的班级“.cast”正在使用左侧535px和顶级425px的位置,这会迫使它下降。
使用Bootstrap,将所有列定义放在行类中并且放在容器中以帮助确保正确的填充,边距和清除非常重要。当我将col定义放入类行并删除该位置时,所有内容都排成一行。
<div class="container">
<div class="row">
<div class="profit col-md-4 align-center">
<img src="images/profit.png">
<div class="rmo">
<p>Ready Made Arch Support</p>
</div>
<div class="prof">
<p>We stock over 75 sizes, 6 times more than other stores do. This is our most basic orthotic offered. Available for you to take home on the same day as your visit. We will fit you!</p>
</div>
</div>
<div class="select col-md-4 align-center">
<img src="images/select.png">
<div class="cso">
<p>Custom Select Orthotic</p>
</div>
<div class="sel">
<p>We have an exclusive method of building custom orthotics without the high cost of traditional plaster casting. All of our orthotics are made local and come with a 24-48hr turn around.</p>
</div>
</div>
<div class="cast col-md-4 align-center">
<img src="images/cast.png">
<div class="cco">
<p>Custom Cast Orthotics</p>
</div>
<div class="cas">
<p>For patients that need precise correction or complex offloading we offer custom cast orthotics that are created to address your specific needs. Available for pick up within 48 hrs.</p>
</div>
</div>
</div>
</div>
答案 1 :(得分:1)
您自己的CSS包含:
.cast {
position: absolute;
left: 535px;
top: 425px;
width: 300px;
padding: 50px 0 0 0;
font-size: 15px;
}
所以你的第三个div绝对定位。 F12是你的朋友。
答案 2 :(得分:1)
div位于容器之外,您应该使用col- *和一行来确保它们在同一行中对齐。您的代码将如下所示:
<?php
function random(){
echo rand(0,50);
};
for (
$x = 1;
$x <= 20;
$x++){
echo $x." : ".random()."<br>";
};
?>