S
S
Skrolea2017-02-22 18:23:50
css
Skrolea, 2017-02-22 18:23:50

What should the button be positioned relative to?

Good afternoon. It is necessary to attach the fab button (floating action button) to the right.

<div class="news-block">
      <div class="news-card">
        <div class="news-card__img"><img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/4273/jeremiah-wilson-2.jpg"/></div>
        <div class="news-body">
          <button class="fab"></button>
          <p class="date">20.01.2017</p>
          <p class="title">Заголовок</p>
          <p class="description">Анонс</p>
        </div>
      </div>
 </div>

The button appears on the left, despite the specified
position: relative;
  bottom: 30px;
  right: 20px;

What did I miss?
code pen

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pushkarev, 2017-02-22
@AXP-dev

Button styles

position: absolute;
top: -30px;
right: 20px;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question