Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
¿Cómo puedo mostrar mi barra de navegación como pegajosa?
<body> <div class="topnav"> <!-- Centered link --> <div class="topnav-centered"> <a href="#" class="logo"> <img src="growmade2.png" style="height: 25px; width: 250px" alt="" /> </a> </div> <!-- Left-aligned links (default) --> <a href="#news">SHOP</a> <a href="#contact">EXPLORE</a> <!-- Right-aligned links --> <div class="topnav-right"> <a href="#search">MY CART</a> </div> </div>

**CSS**

 .topnav { position: sticky; display: block; background-color: rgb(255, 255, 255); padding: 30px 80px 30px 50px; } .topnav a { font-family: "Roboto", sans-serif; font-family: "Roboto Condensed", sans-serif; font-family: "Source Sans Pro", sans-serif; font-weight: 900; display: inline-block; position: relative; color: #000; text-align: left; margin: 0 10px; padding-bottom: 2px; text-decoration: none; }

Hola soy nuevo en css. Quiero crear un sitio web con una barra de navegación estática pero no puedo mostrarlo estático. ¿Alguien puede resolver este problema? ¡¡¡Gracias por adelantado!!!

about 4 years ago · Juan Pablo Isaza
3 answers
Answer question

0

Bueno, podría usar la posición fija para hacer que una barra de navegación sea pegajosa. p.ej:

 .topnav { position: fixed; top: 0; z-index: 99; }
about 4 years ago · Juan Pablo Isaza Report

0

Necesitas agregar top: 0 :

 body { margin: 0; padding:0; } .topnav { position: sticky; top: 0; display: block; background-color: rgb(255, 255, 255); padding: 30px 80px 30px 50px; } .topnav a { font-family: "Roboto", sans-serif; font-family: "Roboto Condensed", sans-serif; font-family: "Source Sans Pro", sans-serif; font-weight: 900; display: inline-block; position: relative; color: #000; text-align: left; margin: 0 10px; padding-bottom: 2px; text-decoration: none; }
 <div class="topnav"> <!-- Centered link --> <div class="topnav-centered"> <a href="#" class="logo"> <img src="growmade2.png" style="height: 25px; width: 250px" alt="" /> </a> </div> <!-- Left-aligned links (default) --> <a href="#news">SHOP</a> <a href="#contact">EXPLORE</a> <!-- Right-aligned links --> <div class="topnav-right"> <a href="#search">MY CART</a> </div> </div> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p> <p>text</p>

about 4 years ago · Juan Pablo Isaza Report

0

prueba esto :

para barra de navegación pegajosa en la posición superior

 .topnav { position: sticky; top:0; }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!