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

Adding elements to a page while it is running can be achieved using a variety

Working on a college project, I am developing a demo web-app in Angular. The goal is to implement a feature where clicking a button adds a new node to the DOM tree. In JavaScript, a simple solution would be: document.getElementById('ticket-container& ...

Middleware for automatically populating a Jade variable in all app.get() routes

I have a unique setup with my Jade file system where all templates extend layout.jade. In this main template, I need to include a logout button only when the user is logged in (this information is stored in req.session). So within layout.jade, there will ...

Adding and removing attributes with Jquery upon clicking a button

How can I make my listed items add an ID when clicked, or what am I doing incorrectly? $('.ex-menuLi #tt').attr('id', 'test'); $('.ex-menuLi').on('click', function(){ $(this).attr('id', &apos ...

How can I retrieve the offset top of a td element in relation to its parent tr element?

Here is some sample dummy HTML code: <table> <body> <tr> <td id="cell" style="height: 1000px; width: 200px;"></td> </tr> </body> </table> I am looking to attach a click event ...

Can a border not be added to a <tr> in an HTML table using CSS for any specific reason?

I am facing an issue with the borders of a table row (tr) when applying CSS styling. The tr has a class called "underRow" which is supposed to add a border at the bottom. In my CSS, I have defined the following for the ".underRow" class: .underRow { ...

Angular - combining lowercase letters in an attribute

Hello, I'm new to using Angular and currently working on creating an attribute within a div tag. I have successfully achieved this task. However, I am in need of changing my input to lowercase during the concatenation. <!--"Fade" Slider--> < ...

Can a TypeScript file be created by combining a declaration file and a .js file?

It is commonly understood that declaration files are typically used for libraries rather than projects. However, let's consider a scenario where an existing JavaScript project needs to be migrated to TypeScript by creating d.ts files for each source ...

What is the method for retrieving the Java List containing custom class objects defined within the <s:iterator> tag in a JSP file from within my JavaScript function?

Within my jsp file, I am retrieving a List of objects from my java action class (struts2) and displaying them. Now, I need to access these list objects within my javascript method. How can I achieve this? The code in mycode.jsp: <script type="text/jav ...

Images of equal height without compromising the resolution

How can I create responsive images with the same height inside a DIV tag, with a specified height of 200px? Any assistance would be greatly appreciated. <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="desc ...

Error in jQuery Ajax post request caused by a keyword in the posted data

I understand why the post is failing, but I'm at a loss on how to fix it and I haven't been able to find any solutions online. I am removing references to jEditable in an attempt to simplify things, as this issue occurs even without the jEditable ...

JavaScript - Unexpected fluctuations in variable values

After studying Japanese language, I decided to try my hand at experimenting with JavaScript by creating a simple FlashCard game for a project. The game generates an array of random numbers, fills the divs with 6 possible choices using jQuery, randomly sele ...

What is the best way to accomplish this using typescript/adonis?

While exploring some code examples on Bitbucket, I came across a sample that demonstrated how to paginate query results using JavaScript. However, as I attempted to apply it in my project, I encountered difficulties in declaring the types required for the ...

Having trouble with AngularJS $location.path() not redirecting properly?

Why am I unable to redirect to a different URL using $location.path in angular.js? .controller('CheckCtrl', function($scope, $localStorage, $location) { $scope.check = function(){ if($localStorage.hasOwnProperty("accessToken") === t ...

Guide on developing and releasing a Vuejs component on NPM

I have been diving deep into vue lately and incorporating it into all of the projects at my workplace. As a result, I have developed various components, particularly autocomplete. Although there are plenty of existing options out there, none seem to fulfil ...

Hover animation using CSS is a great way to add interactivity

I'm trying to create an animation in a moving box that flips upside down when the mouse is raised. I've attempted to use keyframes and hover to achieve this effect, but it's not working as expected. Any suggestions on how to make it work? ...

How can I apply a specific style class to a table row when I already know the table's id?

Hi there! I'm new to jquery and trying to enhance the functionality of my application which has multiple HTML tables in JSP's. My goal is to use jQuery to dynamically apply a CSS style class when hovering over a row. Currently, I have the followi ...

Efficient management of npm dependencies versioning using Git workflow with Angular

In my Angular project, we combine multiple locally created artifacts that are published to the npm repository. Within the "dependencies" section of my app's package.json file, I include the following: "@k/e-lib": "^0.3.0", "@k/et-lib": "^0.3 ...

The event failed to initiate

I have an event that is fired when the number value changes in the <input type="number"> below: <input type="number" inputmode="numeric" pattern="[0-9]*" size="4" class="lorem" value="0" step="1"> <input type="button" class="minus" value=" ...

Exploring creative methods for incorporating images in checkboxes with CSS or potentially JavaScript

Although it may seem like a basic question, I have never encountered this particular task before. My designer is requesting something similar to this design for checkboxes (positioned on the left side with grey for checked boxes and white for unchecked). ...

Why does Res.send return an empty object when console.log indicates it is not empty?

I am currently facing a challenge while using the Google Sheets API with Express, as I have limited experience with JavaScript. My goal is to pass a JSON object from Express to React, but for some reason, when I send the object, it appears empty on the fro ...