Jump to content
  • entries
    18
  • comments
    0
  • views
    1663

Как сделать так, чтобы ссылка внутри div заполняла всё пространство внутри div?


Печенег

101 views

 Share

HTML:

<div>
  <div class="box">
    <a class="link" href="">Ссылка помещенная в div</a>
  </div>
</div>

 

CSS:

.box {
  width: 250px;
  height: 70px;
  border: 1px solid #000;
}
.link {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

 

 Share

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

General chat

Please enter your display name

×
×
  • Create New...

Important Information

Продолжая использовать Веб-сайт ostogramm.ru Вы автоматически соглашаетесь с Privacy Policy и Guidelines, в ином случаи просто покиньте его.