How to configure URL to center object

Asked

Viewed 38 times

1

I made a navbar that when clicking an item it redirects to the same page for a div that has the attribute id, but the site is navbar on top of the text

<li>
   <a href="#Especialidades">Especialidades</a>
</li>

inserir a descrição da imagem aqui

It is possible to configure something so that when clicking on the item it looks like this?

inserir a descrição da imagem aqui

  • No javascript code, I want to make sure that with the navbar does not stay on top of the title: "Specialties"

  • 1

    Put a padding-top: 30px; in the div "Specialties" that resolves.

  • @DVD Thanks, send as an answer to mark

  • Glad you solved it! I already sent the answer. Abs!

2 answers

2


Add a padding-top: 30px; in div "Specialties" that solves the problem of superior spacing.

0

if the link is internal in the page, put it at the beginning of the site (in the photo ta as "specialties") and add a margin top the size of the navbar

  • I don’t understand, what do you mean?

Browser other questions tagged

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