Is it impossible to adjust the background color?

https://i.sstatic.net/9uKBt.png

<div class="container" ng-app="sortApp" ng-controller="mainController">
                <form>
                    <div class="form-group">
                        <div class="input-group">
                            <div style="color:white;background-color:#f78800;border-color:#f78800;" class="input-group-addon"><i class="fa fa-search"></i></div>
                                <input style="width:855px;"type="text" class="form-control" placeholder="Search..." ng-model="searchFish">
                        </div>      
                    </div>
                </form>

            <table class="table table-bordered table-striped" id="hotkey">
                <thead>
                    <tr>
                        <td>
                            <a style="color:#f78800;font-weight:bold;font-size:15px;">KEY</a>
                        </td>
                        <td>
                            <a style="color:#f78800;font-weight:bold;font-size:15px;">ON FOOT</a>
                        </td>
                        <td>
                            <a style="color:#f78800;font-weight:bold;font-size:15px;">ON VEHICLE</a>
                        </td>
                    </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="roll in sushi | orderBy:sortType:sortReverse | filter:searchFish">
                        <td>{{ roll.name }}</td>
                        <td>{{ roll.fish }}</td>
                        <td>{{ roll.tastiness }}</td>
                    </tr>
                </tbody>

            </table>
            </div>
#hotkey {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 900px;
}

#hotkey td, #hotkey th {
border: 2px solid #f78800;
padding: 8px;
}

#hotkey td {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
color: #fff;
}

So, I noticed that every odd line has a white background. How can I change this background to transparent? For example, rows 1 and 3 have a white background. I have tried adding background-color to any style, but it doesn't seem to work. The odd lines all have a white background here. I would like to change it to transparent.

angular.module('sortApp', [])

.controller('mainController', function($scope) {
$scope.sortType = 'name'; // set the default sort type
$scope.sortReverse = false; // set the default sort order
$scope.searchFish = ''; // set the default search/filter term

// create the list of sushi rolls 
$scope.sushi = [
{ name: 'Cali Roll', fish: 'Crab', tastiness: 2 },
{ name: 'Philly', fish: 'Tuna', tastiness: 4 },
{ name: 'Tiger', fish: 'Eel', tastiness: 7 },
{ name: 'Rainbow', fish: 'Variety', tastiness: 6 }
];

});
#hotkey {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 900px;
}

#hotkey td, #hotkey th {
border: 2px solid #f78800;
padding: 8px;
}

#hotkey td {
padding-top: 12px;
padding-bottom: 12px;
text-align: center;
color: #fff;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.5/angular.min.js"></script>
<div class="container" ng-app="sortApp" ng-controller="mainController">
<form>
<div class="form-group">
<div class="input-group">
<div style="color:white;background-color:#f78800;border-color:#f78800;" class="input-group-addon"><i
class="fa fa-search"></i></div>
<input style="width:855px;"type="text" class="form-control" placeholder="Search..."
ng-model="searchFish">
</div>
</div>
</form>

<table class="table table-bordered table-striped" id="hotkey">
<thead>
<tr>
<td>
<a style="color:#f78800;font-weight:bold;font-size:15px;">KEY</a>
</td>
<td>
<a style="color:#f78800;font-weight:bold;font-size:15px;">ON FOOT</a>
</td>
<td>
<a style="color:#f78800;font-weight:bold;font-size:15px;">ON VEHICLE</a>
</td>
</tr>
</thead>
<tbody>
<tr ng-repeat="roll in sushi | orderBy:sortType:sortReverse | filter:searchFish">
<td>{{ roll.name }}</td>
<td>{{ roll.fish }}</td>
<td>{{ roll.tastiness }}</td>
</tr>
</tbody>

</table>
</div>

Answer №1

Upon examining your code closely, it appears that you are utilizing Bootstrap and incorporating table classes such as table-striped, which may be causing the style issue you are experiencing.

I recommend taking a look at the documentation for more information: https://getbootstrap.com/docs/4.4/content/tables/#striped-rows

My suggestion for resolving this issue would be to remove the table-striped style property and see if that helps.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to reveal a concealed "div" when hovering the mouse over it?

Currently in the process of developing a dropdown menu to house a search engine form within a static menu bar. The desired functionality is for the search form to appear upon hovering over the "search icon." However, it seems that the submenu fails to disp ...

I need help figuring out how to use the post method in AJAX to send a username and password to a PHP file and then retrieve the fields. Can someone

Is there a way to access these variables in PHP? I am attempting to retrieve the username and password in PHP files, however, it keeps showing an error message saying 'Undefined index username' when I use $_POST['Username'] <script ...

Mouseover feature for image is functioning, but having issues with alignment

I am currently working on displaying images upon mouse over actions. While the functionality is working perfectly, I am facing an issue where the displayed images appear below and the last image takes up space at the bottom. To rectify this problem, I woul ...

Adding multiple styles to a directive in Angular 6 can be achieved by using the addClass method. It is important to note that the

One of my directives triggers an action when I scroll. @HostListener('window:scroll') doSomething() { console.log(this.el); console.log(this.el.nativeElement); if (window.pageYOffset > 10) { console.log('mouse ...

What distinguishes the creation of HTML Emails from HTML Email Signatures?

In my opinion, I may be overthinking this but is there a distinction in how HTML Emails and HTML Email Signatures are constructed and displayed? It seems that when I search for HTML Email Signatures, results mainly focus on HTML Emails. Some results do tou ...

Avoiding additional empty lines between selectors when setting up Stylelint

Can anyone help me with configuring Stylelint options? Specifically, I want to enforce a rule that no empty lines are allowed between selectors in a list of selectors: &:focus, &:hover, &.active { color: #fb3a5e; text-align: left; text-de ...

Using a nested table will override the "table-layout: fixed" property

I'm currently working on creating a tabular layout and I'm in need of the following: 2 columns with variable widths Columns that are equal in width Columns that are only as wide as necessary After some research, I discovered that by setting "t ...

How to use JQuery to deselect a checkbox

Having trouble unchecking a checkbox? In my HTML (PHP) code, I have the following: <div class="row"> <div class="col-md-12 pr-1"> <label>Modele</label> <div class="form-group"> <div class=" ...

Break the line after every space in words within an element

I have a table/grid view with two words in the <td> like "C2 Sunday". I need a line break after C2 so that it appears as: C2 Sunday Is there a way to achieve this? Please assist me with this issue. Currently, it is showing as "C2 Sunday" and I wou ...

AngularJS issue: function firing twice when selecting an option from dropdown using ng-change

I'm fairly new to angularjs and I'm encountering a confusing issue. I've created an angularjs controller that populates data in a dropdown menu, and upon selecting each option, it should display a particular location on a map triggered by ng ...

Turn off the background of a div

Greetings! I am working on a webpage that includes a button. Upon clicking the button, I would like to display a div and disable the content behind it. The div will also contain a button that can be clicked to hide the div. As a newcomer to Web Programmi ...

Remove all HTML tags except for those containing a specific class

Looking for a regex that removes all HTML tags except the "a" tags with the "classmark" class For example, given this HTML string: <b>this</b> <a href="#">not match</a> <a href="#" target="_blank" ...

Disable the 'bouncy scrolling' feature for mobile devices

Is there a way to prevent the bouncy scrolling behavior on mobile devices? For example, when there is no content below to scroll, but you can still scroll up and then it bounces back when released. Here is my HTML structure: <html> <body> ...

Converting Variable Values to Element IDs in JavaScript: A Helpful Guide

Is it possible to declare a value in variable A and then access that value as an id in variable B using the method getElementById()? var A = 10; var B = document.getElementById(A); console.log(B); ...

Tips for maintaining the border radius of a container while changing the background color on hover

I am encountering an issue with a drop-down list where the bottom corners have a border-radius applied, and I would like to change the hover color of the li items. However, when hovering over the last item, the background-color covers up the border radiu ...

What steps should I follow to align these unordered lists side by side?

Is there a way to align these lists (unordered lists inside list items 1 through 4) side by side using CSS3? I've tried different methods, but I can't seem to figure it out. Here is the code I've been using: <footer> <ul> ...

Steps to reposition an element with absolute positioning to the upper left corner of the screen

I am currently in the process of creating a hamburger menu without using JavaScript, which should drop down from the top to the bottom when clicked. The burger menu is situated at the top right corner of the screen, but every time I try to drop down the na ...

Conceal column exclusively on smaller displays using Bootstrap 4

I want to design a grid that covers the whole screen with 3 columns (left, middle, right) Left: This column should only be displayed on large views and occupy 16.6% of the screen (2/12) Middle: This column should always be visible. It should take up 75% ...

What is the method for altering font color in HTML?

Here is the section of my code that I am struggling with: <p style="font-family:'impact', color:red"> something </p> The issue I am facing is that I am unable to use both the color and the font propert ...

Using JavaScript to Align HTML Data to the Right or Left

I have successfully created an HTML table from JSON data and formatted it using JavaScript as required. However, I am facing a challenge with right-aligning all the amounts coming from my JSON data. I want all the numbers to be aligned to the right but I& ...