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

137
Views
Mostrar enlace <a> redondeado con <span> para que actúe como un botón redondeado

Estoy personalizando el menú principal de SharePoint en línea y, para hacerlo, agregué este JavaScript para agregar un botón al final de los elementos del menú:

 var e = document.createElement('div'); e.classList.add('ms-HorizontalNavItem'); e.innerHTML = "<a data-automation-id='button-web-part' href='https://***/' target='_blank' class='ms-Button ms-Button--primary root-251' data-is-focusable='true' style='background-Color:green;color:while'><span class='ms-Button-flexContainer flexContainer-252' data-automationid='splitbuttonprimary'><span class='ms-Button-textContainer textContainer-253'><span style='color:while'>Shop me some</span></span></span></a>"; var ele = document.querySelectorAll('[role="menubar"]'); ele[0].appendChild(e);

ahora el resultado que obtuve será el siguiente: -

ingrese la descripción de la imagen aquí

pero quiero que el elemento/botón sea como sigue, más grande con esquinas redondeadas:-

ingrese la descripción de la imagen aquí

¿algún consejo?

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

0

  • simplemente agregue padding y color de texto en <a>

 <a data-automation-id='button-web-part' href='https://fullstackgear.com.au/' target='_blank' class='ms-Button ms-Button--primary root-251' data-is-focusable='true' style='background-Color:green; text-decoration: none; padding: 10px 20px; border-radius: 10px; background-Color: green; '><span class='ms-Button-flexContainer flexContainer-252' data-automationid='splitbuttonprimary'><span class='ms-Button-textContainer textContainer-253'><span style='color: #fff;'>Shop me some</span></span></span></a>

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!