如何在表格的一行中显示文本?

时间:2019-03-22 20:50:10

标签: html css

我正在尝试将徽标,价格和按钮设置在一条偶数行上,但是我无法以任何方式进行设置。

我正在尝试提供相同的页边距-当我设法设置为偶数行时,在台式机版本中可以-但在移动设备上看起来有些不同。

我也无法更改以下位置:

.pc_vendor-offers .pc_action {
  width: 250px;
  margin-bottom: 0px;
  margin-top: 27px;
}

我添加了:margin-top: 27px;,但是按钮仍然停留在位置prnt.sc/n1n9my

   .price-comparison-container {
  clear: both;
  margin-bottom: 30px;
  position: relative;
}

.price-comparison {
  border-top: 1px solid #d3d3d3;
  padding-top: 20px;
  position: relative;
}

.pc_title {
  font-weight: bold;
  font-size: 16px;
  padding: 10px;
  text-transform: uppercase;
  margin-bottom: 10px;
  float: left;
}

.pc_arrow-up, .pc_arrow-down {
  position: absolute;
  left: 0;
  right: 0;
  margin: auto;
}

.pc_arrow-up {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #FFF;
  top: 2px;
}

enter image description here

这是完整代码(由于限制) https://zabezcen.pl/fullcode.html

1 个答案:

答案 0 :(得分:0)

这不是一个HTML问题,而是一个CSS问题。 这不是导致问题的代码,您需要提供CSS部分。

创建两个规则,分别在不同的屏幕分辨率下应用备用边距。有关媒体查询的更多信息here

  @media only screen and (min-width: 768px) {
    .pc_logo, .pc_offer, .pc_action {
      margin-top: 25%;
    }
  @media only screen and (max-width: 600px) {
    .pc_logo, .pc_offer, .pc_action {
      margin-top: 10%;
    }
  }