卡在页面中间的号召性用语按钮

时间:2019-03-19 20:03:55

标签: html css button

我的“ 点击此处与我们联系!”按钮贴在页面的中间,而不是浮在页面的底部,下面是代码和图像。我最近遇到了一个问题,该按钮在单击时正在更改大小,该问题已得到纠正,但是现在我的问题是它漂浮在页面中间。

这是设置边距或高度的问题吗?

Photo of the button floating in the middle right, whereas it is meant to be in the bottom left.

How the button is meant to be (bottom right)


* Call to Action */ 
.call-to-action {
  background-color: #ffffff;
  border: 1px solid #ffffff;
  -moz-border-radius: 28px;
  -webkit-border-radius: 28px;
  border-radius: 28px;
  display: block;
  font-size: 17px;
  font-family: 'Roboto, Sans Serif';
  text-decoration: none;
  color: #000000;
  padding: 16px 31px;
  position: absolute;
  right: 50px;
  bottom: 30px;
  text-align: center;
  transition: 0.5s;
  margin: auto;
}

.call-to-action a:hover {
  background-color: #C6DDF0;
  border: 1px solid #C6DDF0;
}

.call-to-action a {
  text-decoration: none;
  color: #ffffff
}

.call-to-action:hover {
  background-color: #C6DDF0;
}
<!--Button Bottom Right-->
<a href="mailto:example@example.com?subject=Envirma Education | Media Production Unit 6&body=To the attention of sir/madam,
        
        Envirma Education | Media Production Unit 6" class="call-to-action">Click here to contact us! <i class="far fa-envelope-open"></i>
        </a>
<!--End of Contact Call-To-Action-->

0 个答案:

没有答案