Tips on eliminating select option background in bootstrap 4

https://i.sstatic.net/VbMhX.png

This is the image in my navbar. I am looking to eliminate the background and border of select options, as well as add some spacing between the two select options and the search bar. How can this be achieved? Additionally, any suggestions on aligning the items horizontally within the navbar?

<div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item active">
                <a class="nav-link" href="test.php"><i class="fa fa-home">Home</i><span class="sr-only">(current)</span></a>
            </li>

            <form class="form-inline"  action="./test.php?id=1" method="POST">
                <li class="nav-item">
                    <div class="form-group">
                        <select class="custom-select custom-select-lg mb-3"  name="objectType">
                          <option selected>Object Type</option>
                          <option value="Toy">Toy</option>
                          <option value="Furniture">Furniture</option>
                          <option value="Gift">Gift</option>
                          <option value="Household">Household</option>
                          <option value="Instrument">Instrument</option>
                        </select>
                    </div>
                </li>


                <li class="nav-item">
                    <div class="form-group">
                        <select class="custom-select custom-select-lg mb-3" name="materialType">
                          <option selected>Material Type</option>
                          <option value="Mud">Mud</option>
                          <option value="Cloth">Cloth</option>
                          <option value="Thread">Thread</option>
                          <option value="Jute">Jute</option>
                          <option value="Cotton">Cotton</option>
                          <option value="Can">Can</option>
                          <option value="Bamboo">Bamboo</option>
                        </select>
                    </div>
                </li>


                <li class="nav-item">
                    <div class="form-group">
                        <div class="input-group">
                            <input class="form-control" type="search" placeholder="Search" name="imageName">
                            <span class="input-group-btn">
                                <button class="btn btn-outline-secondary" type="submit" id="searchSubmit"><i class="fa fa-search"></i>
                                </button>
                            </span>
                        </div>
                    </div>
                </li>
            </form>

To view the complete navbar code, visit newnavbar.php

Answer â„–1

When it comes to styling the border, margin, and background:

.custom-select {
  border: none;
  margin-right: 10px;
  background-color: transparent;
}

You can also check out this demonstration on JSFiddle: https://jsfiddle.net/example-user/abcdef123/

Answer â„–2

Here is my solution:

To create space between list items, I recommend using Bootstrap 4 utility classes such as "ml-1" (margin-left: .25) or "mr-1" (margin-right: .25).

<li class="nav-item ml-1"></li>

If you want to style a select element, you can use the following CSS:

select{
  background: none;
  border: none;
}

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

When I zoom in, a different div replaces the original div

I have recently delved into the world of HTML and CSS as I embarked on creating my own website. However, I seem to have hit a snag - when I zoom in on the content, it overlaps with the menu. I have scoured the internet for a solution to no avail, so any as ...

201 Ways to Toggle Submenus with JavaScript

Just dipping my toes into the world of javascript and web development, I'm currently struggling to make my submenu's in the sidebar navigation area appear when clicked. Opening them individually with repetitive javascript felt clunky, so I'm ...

Looking to add a dynamic divider between two columns that can be adjusted in width by moving the mouse left and right?

If you're looking for an example of two columns adjusting their width based on mouse movement, check out this page from W3Schools. I'm trying to implement this feature in my React app, but I'm unsure of how to proceed. Below is the JSX code ...

Troubleshooting: Why is Angular2 ngClass malfunctioning?

I am having trouble adding a class based on a condition <tr *ngFor="let time of times; let i = index"> <td [ngClass]="{'red-time':checkInvalid(time['Proles Arrive'])}">{{time['Proles Arrive']}}</td& ...

Create a dropdown menu in jQuery by using the prepend trigger

I'm attempting to utilize jQuery to prepend a trigger to a menu and then have that trigger toggle child elements. Unfortunately, the code below is not opening the sub menus when using jQuery prepend. Can anyone provide a suggestion for a fix? HTML & ...

Utilizing HTML5 for page-relative translation

Is there a way to apply a translate to an element so it moves to a specific point on the page instead of relative to its starting position? For instance, in the code snippet below, the "card" elements will move 50, 100 relative to their initial position. ...

"Implementing responsive design with Bootstrap's carousel through media queries

I'm having some trouble creating a basic carousel using bootstrap because the images are not displaying full screen. Do I need to use media queries to achieve this and if so, how can I implement them? <div id="myCarousel" class="carousel slide" da ...

Designing geometric forms using the vertices of a Sphere in ThreeJs

My current project involves creating shapes based on vertices that have already been generated using a formula. I have successfully connected lines between these vertices using a threejs method, but now I want to take it a step further and create map tiles ...

Leveraging the CSS-Element-Queries Library for emulating the functionality of CSS media queries

Recently, I used a nifty CSS-Element-Queries tool to perform basic element manipulations that trigger whenever the window is resized. In simple terms, my goal was to dynamically adjust an element's attribute based on the current width of the window â ...

Bootstrap - Image is not fully covering the width of the container

Having some trouble with Bootstrap and getting this image to cover the full width of my container. Any ideas? Appreciate the help! Here's the code snippet: Hey everyone, I've been working on a new project using Bootstrap, but I'm having ...

Creating a Navigation Bar in Outlook Style Using Javascript and CSS

Looking for a navigation sidebar design similar to Outlook for my web application. I have seen options available as Winform controls and through Visual WebGUI, but these are Microsoft-dependent solutions. We need a Javascript & CSS based solution that is s ...

Having trouble with looping the CSS background using JavaScript in CodePen

Can someone help me with looping through CSS background images? Why is the background not changing in this code example: http://codepen.io/anon/pen/dGKYaJ const bg = $('.background').css('background-image'); let currentBackground = 0; ...

Instructions for swapping out the default drop-down icon in my select box with the <i class="icon-xyz-chevron down-rotation"></i> symbol

Is there a way to replace the default drop down arrow with a new one without creating a new class and adding it to the label? <i class="icon-xyz-chevron down-rotation"></i> Any suggestions on achieving this? <label class="col-md-8 col-sm- ...

Hyperlinks are malfunctioning and the text cannot be highlighted

Here is my XML code: <!DOCTYPE HTML SYSTEM> <html> <head> <link rel="stylesheet" type="text/css" href="style.css"></link> </head> <body> <div class="header"> <img id="circle" src="circle.png" ...

How can I modify the navbar-collapse in Bootstrap to alter the background color of the entire navbar when it is shown or open on a mobile screen?

Can anyone tell me how to change the background color of the navbar when the navbar-collapse is displayed? I want one background color when the navbar-collapse is shown and a different color when it's collapsed. Is there a way to achieve this using C ...

The picture within the div is not appearing as expected

I am facing an issue with inserting an image in a div container using CSS and HTML. The image is not displaying properly. Here is the HTML code: <div id="wrapper"> <div id="quoteContainer"> <span class="start_img"></span> </di ...

What is the best way to split a Bootstrap col-md div in half vertically?

I am attempting to create the following layout using the Bootstrap grid system. Within a container <div class="row">, there are two divs occupying half of the width each (<div1> and <div2>). The height of <div1> will vary based on t ...

React - CSS Transition resembling a flip of a book page

As I delve into more advanced topics in my journey of learning React and Front Web Dev, I discovered the ReactCSSTransitionGroup but learned that it is no longer maintained so we now use CSSTransitionGroup. I decided to create a small side project to expe ...

What is the best way to generate this arc using CSS3?

What is the most effective method for creating this unique shape using CSS3? The square image should be clearly defined. We greatly appreciate any insight you can offer. EDIT: I have put in a lot of effort, but standard CSS methods are not getting me t ...

Activate mouse event when the pointer is within X units of the bottom of the browser window

My inquiry is straightforward, although the solution may not be as simple. I have an element fixed to the bottom of the browser window. When it is not needed, I want to hide it by setting its height to 0px. Whenever the user's mouse is a certain dista ...