Help me figure out why there is gray around the central buttons

http://www.reedyrace.com/ae/pillchart-RC/index.html

The above is a fully functional page. Click on a black button in tab C Mount, then any button on tab D Mount, then tab Results for results. Don’t worry what it is about :slight_smile:

My question: How do I get rid of the gray around the black buttons? I simply cannot find the area in the css page where that coloring occurs. I want the surrounding color to replace it.

Portion of CSS:

.container {
    display: block; 
    margin-left: auto; 
    margin-right: auto;
    padding-right: .5em;
    max-width: 600px;
}


.rowgr {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    border: 0;
    padding: .2em .2em;
}

.rowflleft {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: auto;
}

.clearfix::after {
  content: '';
  display: block;
  clear: both;
}

.buttonSetup { width: 7em; }

/* Inserts Grid */
 
.grid-container {
  display: grid;
  grid-template-columns: 4em 4em 4em;
  grid-template-rows: 	 4em 4em 4em;
}
.grid-divc, .grid-divd  {
  text-align:center;
}

/* Results Grid  */

.gridResultsFinal { 
  display: grid;
  grid-template-columns: 33% 33% 33%; // 12% 19% 25% 22% 22%;
  grid-template-rows: 	 2em 2em 3.5em; // 2em;
  text-align:center;
}
.grid-div-res, .grid-div-resh {
  border: 1px solid gray;
  background-color: white;
}
.grid-div-resh {
  font-size: 1em;
  background-color: #ddd;
  padding: .1em .1em;
}
.grid-div-res {
  font-size: 1.3em;
}

/* Inserts buttons */

img {
	width:  40px;
	height: 40px;
	border: none;
}
.buttonSetup { /* nav buttons */
	width: 7em; 
    background-color: #ddd;
    border-radius: 8px;
    border: #ccc solid 1px;
    padding: 0;
    height: 2em;
    -webkit-appearance:normal;
    text-align: center;
	margin-bottom: 1em;
	color: black;
	}
 
 /* TABS   https://medium.com/allenhwkim/how-to-build-tabs-only-with-css-844718d7de2f */
 
input { display: none; }                /* hide radio buttons */
input + label { display: inline-block } /* show labels in line */
input ~ .tab { display: none }          /* hide contents */

/* show contents only for selected tab */
#tab1:checked ~ .tab.content1,
#tab2:checked ~ .tab.content2,
#tab3:checked ~ .tab.content3  { display: block; }

input + label {             /* tab */
  border: 1px solid #999;
  width: 6em;
  background: #EEE;
  padding: .5em .5em;
  position: relative;
  top: 1px;
  text-align: center;
}
input:checked + label {     /* white background for selected tab */
  background: #FFF;
  border-bottom: 1px solid transparent;
}
input ~ .tab {          /* grey line between tab and contents */
  border-top: 1px solid #999;
}

/* Rotate the Insert Images */


.item { /* holds C and D images at top */
  text-align:center;
  height: auto;
}
.cMountLeftImg, #cResultsLeft, .dMountLeftImg, #dResultsLeft {
	width: 200px; 
	height: auto;
	text-align: center;
}

HTML for C Mount:

<form id="form_pillchart">    
    <div class="rowgr pad2">
        <div class="rowflleft">
            <p><strong>For the RC8B3.2, B3.2e and RC8T3.2, T3.2e.</strong>
			<br>Choose your C and D mount inserts and this will calculate your settings.</p>
        </div>
    </div>
	
<input type="radio" name="tabs" id="tab1" checked />
<label for="tab1" class="fontstack">C Mount</label>
<input type="radio" name="tabs" id="tab2" />
<label for="tab2" class="fontstack">D Mount</label>
<input type="radio" name="tabs" id="tab3" />
<label for="tab3" class="fontstack">Results</label>    
	<div class="tab content1"> 
		<div style="background-color: #EBF5FB">
			<p class="cen" style="padding-top: .5em;"><strong>C Mount</strong><span id="cInsertChosen" class="cen"></span></p>				
			<div class="mounts-container" id="cMountLeft"><span class="item"><img src="images/cmount_blank.png" alt="insert not chosen" class="cMountLeftImg"></span></div>
		</div>
		
		<div class="rowgr" style="background-color: #EBF5FB">
                    <div class="cen fontstack">
					<p class="selectC">Select your left insert below.</p>
                        <div class="grid-container">
                <div class="grid-divc" id="ca1"><button class="clearfix" value="1,1,1,-1,1-corner"><img title="1,1,1,-1" alt="1,1,1,-1" src="images/1-cornerb.png"></button></div>
                <div class="grid-divc" id="ca3"><button class="clearfix"value="0,1,0,1,1-center"><img title="0,1,0,1" alt="0,1,0,1" src="images/1-centerb.png"></button></div>
                <div class="grid-divc" id="ca5"><button class="clearfix"value="-1,1,1,1,1-corner"><img title="-1,1,1,1" alt="-1,1,1,1" src="images/1-cornerb.png" class="buttonC transform1"></button></div>
				
						<div class="grid-divc" id="cc1"><button class="clearfix"value="1,0,-1,0,1-center"><img title="1,0,-1,0" alt="1,0,-1,0" src="images/1-centerb.png" class="buttonC transform2"></button></div>
						<div class="grid-divc" id="cc3"><button class="clearfix"value="0,0,0,0,center-center"><img title="0,0,0,0" alt="0,0,0,0" src="images/center-centerb.png"></button></div>
                        <div class="grid-divc" id="cc5"><button class="clearfix"value="-1,0,1,0,1-center"><img title="-1,0,1,0" alt="-1,0,1,0" src="images/1-centerb.png" class="buttonC transform1"></button></div>
				<div class="grid-divc" id="ce1"><button class="clearfix"value="1,-1,-1,-1,1-corner"><img title="1,-1,-1,-1" alt="1,-1,-1,-1" src="images/1-cornerb.png" class="buttonC transform2"></button></div>
                <div class="grid-divc" id="ce3"><button class="clearfix"value="0,-1,0,-1,1-center"><img title="0,-1,0,-1" alt="0,-1,0,-1" src="images/1-centerb.png" class="buttonC transform3"></button></div>
				<div class="grid-divc" id="ce5"><button class="clearfix"value="-1,-1,-1,1,1-corner"><img title="-1,-1,-1,1" alt="-1,-1,-1,1" src="images/1-cornerb.png" class="buttonC transform3"></button></div>
                        </div>
                    </div>
		</div>
	 </div>  <!-- tab group -->
 	<div class="tab content2"> 
		<div style="background-color: #FBEEE6">
				<p class="cen" style="padding-top: .5em;"><strong>D Mount</strong><span id="dInsertChosen" class="cen"></span></p>
			<div class="mounts-container" id="dMountLeft"><span class="item"><img src="images/dmount_blank.png" alt="insert not chosen" class="dMountLeftImg"></span></div>
		</div>

For each button you want to remove the gray from, set its background to ‘transparent’. You could use a style like… .grid-divc button { background: transparent; } and that should do the trick. The gray you see is the background color of buttons by default. By setting it to transparent, it will remove the gray and let the background shine through.

1 Like

Yes, that works! Never seen that happen before.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.