Fixed Bar at the top

Asked

Viewed 12,945 times

2

Hello I would like to put at the top of my page a bar of the color black, but I’m not able to do.

Someone knows how to do it??

  • What did you try?

1 answer

3

Can use position: fixed to that end:

.barra {
  background-color: black;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 35px;
}
<div class="barra"></div>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.