Overlapping logo and navigation tags

The navigation bar in tabs #1 and #2 is currently overlapping the logo. I have made numerous attempts to correct this issue without success. The navigation bar should be positioned right below the logo.

I will figure this out.

body { font-family: Arial, sans-serif; margin: 20px; }
    
            table {
            border-collapse: collapse;
            width: 100%;
            margin-top: 20px;
        }
    
        th,
        td {
            border: 1px solid #ddd;
            padding: 8px;
            text-align: left;}

th {
    background-color: #f2f2f2;
}

.logo-container {
    position: fixed;
    top: 0;
    left: 0;
    margin:10px;
    z-index:1000
}
img.logo{
    background-color: transparent;
    padding: 0;
    margin: 0;
    border:none;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fede0e0fbfcfbfdeeffcfbba1b9a1bd">[email protected]</a>/dist/css/bootstrap.min.css">
<div class="logo-container">
  <img src="https://picsum.photos/100/200" alt="logo_me" height="100" width="200" class="logo">
</div>
<div class="container mt-4 custom-tabs-container mx-auto my-4 clearfix">        
  <ul class="nav nav-tabs" role="tablist">
    <li class="nav-item" role="presentation">
      <a class="nav-link active" id="TAB1-tab" data-bs-toggle="tab" href="#TAB1" role="tab" aria-selected="true">Info</a>
    </li>
    <li class="nav-item" role="presentation">
      <a class="nav-link" id="TAB2-tab" data-bs-toggle="tab" href="#TAB2" role="tab" aria-selected="false" tabindex="-1">Tabla de precios</a>
    </li>
  </ul>
</div>

Where am I going wrong?

I have attempted multiple times to no avail

Answer №1

There is an issue with the position fixed in your .logo container class. Simply remove it

body {
     font-family: Arial, sans-serif; margin: 20px; 
    }
    
.container{
    display: flex;
    flex-direction: column;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

.logo-container {
    /* position: fixed; */
    top: 0;
    left: 0;
    margin: 10px;
    z-index: 1000
}

img.logo {
    background-color: transparent;
    padding: 0;
    margin: 0;
    border: none;
    }
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="f3919c9c878087819283b3c7ddc5ddc1">[email protected]</a>/dist/css/bootstrap.min.css">
<div class="logo-container">
  <img src="https://picsum.photos/200/300" alt="logo_me" height="100" width="200" class="logo">
</div>
<div class="container mt-4 custom-tabs-container mx-auto my-4 clearfix">        
  <ul class="nav nav-tabs" role="tablist">
    <li class="nav-item" role="presentation">
      <a class="nav-link active" id="TAB1-tab" data-bs-toggle="tab" href="#TAB1" role="tab" aria-selected="true">Info</a>
    </li>
    <li class="nav-item" role="presentation">
      <a class="nav-link" id="TAB2-tab" data-bs-toggle="tab" href="#TAB2" role="tab" aria-selected="false" tabindex="-1">Tabla de precios</a>
    </li>
  </ul>
</div>

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

Button press triggers the fadeIn function successfully, but the keypress event does not have the same effect

I'm currently facing an issue with two div elements on my webpage. I want only one of them to be visible at a time, depending on which key is pressed. If the 1 key is pressed, I want 'div1' to fadeIn (if it's not already visible) and fo ...

Encountering a problem with loading the stylesheet

I keep encountering a 404 error when trying to load the CSS in my web application. The HTML content looks like this: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>PSL Inter App</title> <meta nam ...

What is the best way to differentiate between two CSS elements with the same class name?

I ran into an issue where two elements share the same class name, specifically "img" Is it possible to apply different styles to these elements that are nested under different parent classes, despite having the same class name? I am trying to customize t ...

Set a default selection for radio buttons in Angular template-driven forms

I'm having an issue with setting a default selection for a radio button in my template-driven form. Here's the relevant part of my code: <div class="donut-form-promos"> <span>Promo:</span> <div class=&quo ...

Adjust the size of the sliding tool with images of varying dimensions

My mobile-first slider features three different types of images: tall, horizontally long, and square. I want the size of the slider to be determined by the horizontally long image and then scale and center the other images to fit its size. To achieve this, ...

Problematic situation concerning the lack of effectiveness of jQuery's .removeClass() function

I am encountering a strange issue with some code that adds and removes classes from an element in JavaScript. Despite my best efforts, I cannot replicate the odd behavior in a simple jsfiddle example. Below is the relevant section of JavaScript that is ca ...

I recently aligned a component within a column of the Bootstrap grid using the <center> tag

Apologies for admitting this on Stackoverflow, but I'm struggling to center an element and the center tag seems to do the trick. My CSS skills are limited, so I'm reaching out to see if there's a better way to achieve this? <div class="c ...

Tips for refreshing only a portion of a webpage using JavaScript/jQuery

I have two distinct navigational sections on my website. The left column has its own navigation menu, while the right column (main content area) contains a separate set of links: My goal is to click on a link in the left-hand sidebar (such as "Resume", "E ...

Verify whether a particular font is installed on the system

Is there a way to use JavaScript or jQuery to check if a user has Proxima Nova font installed when using Typekit? If so, I would like to incorporate that feature and then utilize jQuery to remove the Typekit loading class in order to optimize page loading ...

Tips for retrieving nested data objects from a JSON API on the web

Below is the provided API link - I attempted to utilize this jQuery script in order to collect data for each state individually for my project. However, I am facing difficulties accessing the information with the code provided below. $.getJSON('http ...

What is the best way to retrieve nested objects in JSON using JavaScript and an Ajax request?

I am facing an issue with a nested JSON structure and trying to access the data through an ajax request to populate an HTML table. Here is a sample of the JSON structure: { sum: { total: 2, }, data: [ { id: '1', attribu ...

Expand the width and include a placeholder in mat input field for Angular version 5

Currently utilizing a mat input with the code provided, presenting a similar appearance to the screenshot below. I am looking to add a placeholder that disappears once the user begins typing. However, in my current setup, the text shifts upward and floats ...

ways to change the font color style of a header element using css

Below is the HTML code that I need to work with: <h5 class="post-title">Welcome To The Site</h5> I am attempting to change the font color to red using this CSS: .post-title{ color:red ! important; } However, my attempt was unsuccessful ...

My goal is to transition my current select list into a sleek and user-friendly button group

I am looking for a way to transform a select form into a button group without sacrificing any functionality. Despite searching online extensively, I have been unable to find a solution. Ensuring that no functionality is lost in the process is crucial for m ...

Sticky positioning causing issue with Bootstrap dropdowns

I'm attempting to design a data table with a sticky column that includes a Bootstrap dropdown button. Unfortunately, the dropdown conflicts with the sticky position and ends up opening behind the fixed column. It looks fine when opened from the top en ...

Experiencing difficulties with sending emails through my PHP contact form

Attempting to set up a "Contact Me" form for my website using VB.NET 2015, but not receiving any emails. Below are the files: PHP: <?php error_reporting(-1); ini_set('display_errors', 'On'); set_error_handler("var_dump"); $email = ...

Is it possible to use jQuery to highlight HTML tags within a textarea field?

Is there a simple method using jQuery to highlight html-tags in red within a textarea? I'm clueless about how to achieve this since HTML tags aren't allowed in textarea, correct? :( Alternatively, can someone provide me with some helpful resour ...

"Is there a way to extract text enclosed within HTML tags, such as <div>text</div>, with Selenium using C#

How can I extract the text 'True' from within the HTML tags <div>text</div> using Selenium and C#? <div type='data' id='OfferInCart' style='display:none;'>True</div> I have attempted to retr ...

Getting rid of the arrow icons in a Material UI TextField

I am facing a challenge with removing the up and down arrow icons from a Material UI TextField that I adjusted using the Material UI documentation (https://material-ui.com/components/autocomplete/#autocomplete) Highlights section. After trying various sol ...

Triggering a class in Angular when another class is activated through JavaScript

My goal is to apply the class "xyz" when the class "xy" is activated using ngClass. I am looking to achieve the following scenario: If the class "xyz" is present in the tag, then activate the class "xy" Using ngClass="'xyz', 'xy'" ...