Title: Removing unnecessary space between panel heading and panel border
Tags: html;css;twitter-bootstrap
Question: My current situation is like this: http://i.imgur.com/qq15FEK.png
I have a panel, where the heading and border are the same color. I've overwritten the panel-info default color to use my own.
My problem is the small white gap between the heading and the border. I've tried changing the padding and border styles, but to no avail.
How do I make the heading take up the whole space of the panel, so as to remove the gap that appears?
/* This is the CSS that overrides the default bootstrap panel. */
.panel-info&gt;.panel-heading {
color: #000 !important;
background-color: #6fc45b !important;
.panel-info {
border-color: #6fc45b !important;
<div class="col-sm-12"&gt;
<div class="panel panel-info"&gt;
<div class="panel-heading"&gt;
<h3 class="panel-title"&gt;Lejeperiode</h3&gt;
</div&gt;
<div class="panel-body"&gt;
Højsæson er skolernes vinterferie, sommerferie samt efterårsferie. I disse uger trækkes der lod. I højsæsonen kan man ikke booke weekender, med mindre de er ledige. I lavsæsonen kan man leje hele ugen, weekender samt mandag til torsdag. Weekender samt
mandag til torsdag bekræftes først en måned inden, da de altid kan overgåes af udlejning af hele ugen.
</div&gt;
</div&gt;
</div&gt;
Comment: Sorry, completely forgot. I've posted it now.

Comment: fwiw, I'm able to reproduce the above bootply examples in chrome 69.

Comment: If we place your code in Bootply ( https://www.bootply.com/FXJ14AjZmC ) the situation you expression in your post is not happening. Is it possible you have additional conflicting CSS?

Comment: Code. We'll need to see you [mcve]

Comment: I have forked @RobertC bootply to see if i can replicate (https://www.bootply.com/tao2tF1m7T) I have added a `margin` to the `panel-heading` css. Are you sure you haven't got that somewhere in your css/inline style?

Here is the accepted answer: .panel-heading {
margin-right:-1px;
margin-left:-1px;


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 5, 'ContentLicense': 'CC BY-SA 3.0', 'CreationDate': '2017:00:08/10/17', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<html><css><twitter-bootstrap>', 'Title': 'Removing unnecessary space between panel heading and panel border', 'ViewCount': 1037, 'id': 45614439, 'user_AboutMe': '', 'user_AccountId': 1875739.0, 'user_DisplayName': 'Leth', 'user_Reputation': 991.0, 'user_Views': 287.0, 'user_id': 1696992.0}}