Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

136
Vistas
Show rounded <a> link with <span> to act as a rounded button

I am customizing the SharePoint online main menu, and to do so i added this javaScript to add a button at the end of the menu items:-

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);

now i result i got will be as follow:-

enter image description here

but i want the item/button to be as follow, bigger with rounded corners:-

enter image description here

any advice?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

  • just add padding and text color on <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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda