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

118
Views
Hide border of label

I am trying to hide border of label that appears when pressed on. That is, the border around the i button. I have tried setting outline and border to 0 and even to none but nothing works. What am I doing wrong?

$(document).ready(function(){
    $('#popoverData').popover();
});
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />

<div>
<label for="download" style="float: left; margin-top: 6px">Content</label>
        <a id="popoverData" class="btn" href="#" data-content="My Content" 
        rel="popover" data-placement="bottom" data-trigger="hover" style="float: left; margin-left: -10px; margin-top: 0px; border: none;">&#x1F6C8;</a>
</div>

</body>
</html>

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

0

I assume you refer to the box-shadow of the a.btn, you can remove it by adding the following CSS rule :

.btn:active {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}

$(document).ready(function(){
    $('#popoverData').popover();
});
.btn:active {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />

<div>
<label for="download" style="float: left; margin-top: 6px">Content</label>
        <a id="popoverData" class="btn" href="#" data-content="My Content" 
        rel="popover" data-placement="bottom" data-trigger="hover" style="float: left; margin-left: -10px; margin-top: 0px; border: none;">&#x1F6C8;</a>
</div>

</body>
</html>

about 4 years ago · Juan Pablo Isaza Report

0

It depends what you mean: If you click and hold on the button, it's the shadow which appears (see previous answer), but if you just click the button and release the mouse, it will be focused. So in this case you can add a CSS rule for the focus state, like this:

a#popoverData:focus {
  outline: none;
}

But note that this will be against accessibility rules, since people navigating only by keyboard actions will not see anymore which element is selected/focused.

Full example (i.e. above rule simply added to the code in the question):

$(document).ready(function() {
  $('#popoverData').popover();
});
a#popoverData:focus {
  outline: none;
}
<!DOCTYPE html>
<html>

<head>
  <title>Page Title</title>
</head>

<body>

  <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" />

  <div>
    <label for="download" style="float: left; margin-top: 6px">Content</label>
    <a id="popoverData" class="btn" href="#" data-content="My Content" rel="popover" data-placement="bottom" data-trigger="hover" style="float: left; margin-left: -10px; margin-top: 0px; border: none;">&#x1F6C8;</a>
  </div>

</body>

</html>

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!