How to display text in one line in table?

问题: I am trying to set the logo, price and button on an even line but I can not do it in any way. I'm Trying to give the same margin-top - when I manage to set in an even lin...

问题:

I am trying to set the logo, price and button on an even line but I can not do it in any way.

I'm Trying to give the same margin-top - when I manage to set in an even line, in the desktop version is ok - but it looks a bit different on the mobile.

Also I cannot change location for:

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

I added: margin-top: 27px; but the button still stays in place 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

here is full code (due to the limit) https://zabezcen.pl/fullcode.html


回答1:

This is not an HTML problem, but a CSS problem. this is not the code causing the problem , u need to provide the CSS part.

Create two rules that they apply alternate margins at different screen resolutions. More on media queries 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%;
    }
  }
  • 发表于 2019-03-26 04:47
  • 阅读 ( 160 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除