0

我在这里是因为我在 html 中定位元素时遇到问题。

这是有问题的网页:http ://www.aformulaonehistory.com/test/index.html 。

如您所见,网站是按行构建的,我要做的是将带有汽车型号和驾驶员姓名的文本行放在汽车下方的底部。

一行的代码很可能是:

<li id="row1">
    <div class="year">
              text
            </div>
    <div class="car_text">
      <div class="model">
                car model
              </div>
              <div class="driver">
                driver name
              </div>
            </div>
</li>

我必须移动的 div 是一个名为“car_text”的 div。我试过设置 position: absolute 和 bottom:30px; 但是通过这种方式,所有其他称为“car_text”的都在同一行中重叠!

4

1 回答 1

0

在 CSS 中添加position: relative;top:450px;#car_text

于 2013-09-15T21:15:02.583 回答