Reputation: 727
<li id="item2"><button onclick="myFunction2()">About us </button></li>
Is there anyway that "About us" can appear as just text and not a button on the website?
Upvotes: 5
Views: 1329
Reputation: 32172
As like this .
#item2>button{background:none;border:none;outline:none;cursor:pointer}
<li id="item2"><button onclick="myFunction2()">About us </button></li>
Upvotes: 3
Reputation: 749
This should do the work.
button,button:focus,button:active
{
border:none;
background:none;
outline:none;
}
button,
button:focus,
button:active {
border: none;
background: none;
outline: none;
}
<li id="item2">
<button type="button" onclick="onButtonClick()">About us</button>
</li>
Upvotes: 0
Reputation: 590
I just changed the HTML element from <button>
to <p>
and it worked while looking same as a regular text.
<p onclick="myFunction2()">About us</p>
Upvotes: 0
Reputation: 7701
Add this
button {
background:none;
border:none;
margin:0;
padding:0;
}
button:focus{
outline: 0;
}
Upvotes: -1