How can I delete the black background from the ion-tab-bar in Ionic 7?

In my current project using Ionic 7, I have a navigation guide set up with 4 tabs. I am trying to customize the styling of these ion tabs by adding some custom CSS.

The issue I'm facing is that despite my attempts to make the background transparent, it shows up as black instead.

I referred to a previous question on Stack Overflow about removing the white background from ion-tab-bar in Ionic 4, but unfortunately, the solution suggested there did not work for me.

HTML:

<ion-tabs>
  <div class="tabs-inner"></div>
  <div  style="background-color: whitesmoke; border-radius: 20px 20px 0 0 ;">

  <ion-tab-bar slot="bottom">

      <ion-tab-button tab="race">
        <ion-icon name="map-outline"></ion-icon>
      </ion-tab-button>

      <ion-tab-button tab="favoriten">
        <ion-icon name="bookmarks-outline"></ion-icon>
      </ion-tab-button>

      <ion-tab-button tab="start">
        <ion-icon name="home-outline"></ion-icon>
      </ion-tab-button>

      <ion-tab-button tab="me">
        <ion-icon name="person-outline"></ion-icon>
      </ion-tab-button>

  </ion-tab-bar>

</div>

</ion-tabs>

CSS:

ion-tab-bar{
  //position: absolute;

  --background: rgba(255,255,255,5);
  border-radius: 25px 25px 25px 25px;
  margin-left: 15px;
  margin-right :15px;
  margin-bottom: 15px;
  margin-top: 15px;
  background-color: black;
  box-shadow:
  0px 3px 6px 0px rgba(0,0,0,0.04),
  0px 1px 3px 0px rgba(0,0,0,0.02);
  flex: 1;
  position: unset !important;
}

.tabs-inner {
  position: relative;
  //flex: 1;
  contain: layout size style;
}

I also tried adding the following snippet to global.scss, but it didn't solve the issue:

.tabs-inner {
  position: unset !important;
}

https://i.stack.imgur.com/W5fl6.png

Answer №1

Your background is currently black, which is causing the issue.....

ion-tab-bar{
  background-color: black;
}

We need to make it transparent.

ion-tab-bar{
  background-color: rgba(0,0,0,0.5);
}

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

Submitting data using AJAX yields results, but the contact form remains untouched

I have created an online quiz using jQuery. My goal is to send the results, along with the user's contact information, to the moderator once they submit it. I have managed to send the result information successfully. However, I am facing an issue whe ...

A guide to generating numerous SVG paths using a JavaScript function

Creating strokes with similar length but different angles of rotations can be achieved efficiently using JavaScript instead of writing redundant lines of code. The following code snippet demonstrates one way to achieve this: function stroke(rot) { var d ...

Issues with the functionality of jQuery append and AngularJS ng-if not functioning

In my application using checkboxes, I control the visibility of charts with the ng-if directive and implement drag-and-drop functionality with angular-Dragula. The use of ng-if is essential for me as it allows me to manipulate visible div IDs and organize ...

AngularJS Element Connections

I have the following component: (function () { "use strict"; angular.module("application_module") .component('tab', { controller: 'TabCtrl', templateUrl: 'app/component/application/app-heade ...

Tips for retrieving additional values from a chosen variable in Angular 10

Here is an array I have: export const Glcode = [ { id: 1, Type: 'Asset', Name: 'Cash at Head Office', code: '10018' }, { id: 2, Type: 'Asset', Name: 'POS ACCOUNT ', code: '10432' }, { ...

AngularJS directive: handling child elements

Is there a way to structure the directive below in order to have access to all the ul elements within the link function? In the code snippet provided, when examining the elm (logged in console), it appears as a comment type and ul are displayed as sibling ...

Is it possible to include two of these on a single page with unique variables? (Using JQuery)

I am looking to create two similar pages, each with different percentages. However, when I try modifying the JS or changing class/ID names, it keeps pulling data from the first SPAN element. http://jsfiddle.net/K62Ra/ <div class="container"> <di ...

How can I incorporate a feature in my Angular application that allows users to switch between different view types, such as days, using JavaScript

Greetings, community! I am currently utilizing version 5 of the fullcalendar library from https://fullcalendar.io/ in my Angular 9 application. I have noticed that the calendar offers various options to change the view type as shown below: https://i.stac ...

Creating a custom jQuery plugin for exporting data

I am crossing my fingers that this question doesn't get marked as 'already answered' because I have thoroughly searched previous questions and unfortunately, my specific case is not listed anywhere. I have successfully created a jQuery func ...

Programmatically simulate a text cursor activation as if the user has physically clicked on the input

I have been attempting to input a value into a text field using JavaScript, similar to the Gmail email input tag. However, I encountered an issue with some fancy animations that are tied to certain events which I am unsure how to trigger, illustrated in th ...

Tips for finding information within a table using HTML

My task involves creating a table with the option for users to search data within it. However, I have encountered an issue where I am only able to search for data in the first row of the table. <table style="width:100%" id="table"> <tr> ...

Unable to display results in React Native due to FlatList not being shown

I'm a beginner to React Native and I'm attempting to create a simple flatlist populated from an API at , but unfortunately, no results are displaying. Here's my App.tsx code: import React from 'react'; import type {PropsWithChildre ...

Retrieve the player's name from the database using jQuery

How can I retrieve the text value from my scores table in the database? Here is an image of my score table: https://i.stack.imgur.com/CUiMw.png The Player_name is stored as Player_id, which is a foreign key from the players' table. While I c ...

Using LocalStorage in Greasemonkey

I am currently working on developing a Greasemonkey script, but I am encountering difficulties with implementing local storage within it. The method I found to work with local storage in Greasemonkey involves creating another instance of JavaScript using t ...

How to Alter the Color of a Hyperlink in HTML

I've been working on an angular2 application and I'm using a hyperlink to trigger a method that opens a small popup window. I've tried different methods to change the color of the link when it's clicked, but so far none have worked. Th ...

Navigate through information within designated boundaries

In order to achieve vertical scrolling of a sidebar div and its content (3 links) between two points, I have utilized the CSS property position:fixed; top: 100px. While this setup works well initially by positioning the sidebar 100px down from the top and ...

Having difficulties in dynamically swapping audio sources using JavaScript?

It seems like I'm overlooking something simple here. The issue I'm facing involves creating a series of buttons with different audio sources as titles. When a user clicks on a button, the corresponding source should update in the audio player. T ...

What is the process for editing or importing CSS within a React project?

I'm a beginner in React and I am encountering an issue with CSS not loading properly. I followed the tutorial for importing it, but it seems like there might be a better way to do it now as the tutorial is outdated. Below is my code, I would appreciat ...

Mastering the art of utilizing the LESS preprocessor with React Create-React-APP

Is it possible to implement the LESS preprocessor in my create-react-app project? In my React code, I have the following: ReactDOM.render( <form> <input type="email" data-info="Enter Email" pattern="/\S+@\S+\.\S+/ ...

"Utilizing Jquery for interactive menu functionality - delivering the requested JSON

I have successfully implemented a dynamic menu using jQuery that parses a JSON response file to create the menu. However, instead of having the menu items link to URLs, I want them to retrieve and parse JSON data from those URLs. Despite my efforts, the me ...