The button is failing to activate its own CSS class, instead inheriting the CSS class of the parent div

Why isn't the button invoking its CSS class, but instead inheriting the CSS class of the parent div? Can someone provide assistance?

.sq-ui-ban {
    background-color: #abacb1;
    color: black;
    width: 1000px;
    height: auto;
    overflow: hidden;
    font-style: normal;
    font-family: Calibri;
    font-size: 20px;
    font-weight: normal;
    position: relative;
}

.moreBan {
    position: fixed;
    cursor: pointer;
    font-family: Calibri;
    background: #1c94c4;
    text-align: center;
    color: #FFFFFF;
    border: none;
    font-size: large;
    padding: 5px;
    position: absolute;
    bottom: 0px;
    right: 0px;
}
<div class="sq-ui-ban">
<button class="moreBan"><i class="fa fa-arrow-circle-o-down"></i><span class="moretext">More</span></button>
</div>
What could be causing this issue?

Answer №1

To make your button visible, ensure that you remove the overflow:hidden from the .sq-ui-ban class and provide appropriate values for height, width, left, and top (or any position) properties of the button.

This issue occurs because the parent div's height is set to auto and the button has a position:absolute, causing the parent div to have no height and the button not being displayed due to the overflow:hidden property.

.sq-ui-ban {
    background-color: #abacb1;
    color: black;
    width: 1000px;
    height: auto;
    font-style: normal;
    font-family: Calibri;
    font-size: 20px;
    font-weight: normal;
    position: relative;
  
}

.moreBan {
    position: fixed;
    cursor: pointer;
    font-family: Calibri;
    background: #1c94c4;
    text-align: center;
    color: #FFFFFF;
    border: none;
    font-size: large;
    padding: 5px;
    position: absolute;
    top: 0px;
    left: 0px;
    height: 50px;
    width: 100px;    
}
<div class="sq-ui-ban" id="banner">
<button class="moreBan"><i class="fa fa-arrow-circle-o-down"></i><span class="moretext">More</span></button>
</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

How to align the last item in the bottom row using Flexbox styling

Is it possible to center the last element when resizing the window to a smaller resolution, even though the parent's justify-content parameter is set to space-between? I understand that using center or space-around would achieve the desired result, bu ...

The background image will not repeat to completely cover the height

Click here to view my issue. I have set the background image to repeat the entire height, but it's not behaving as expected. Here is my CSS #wrapper { margin: 0px; padding: 0px; background: url(img02.jpg) repeat-x left top; } I attempt ...

Having difficulty setting a value for a tooltip with replaceWith() function

When using jQuery's .replaceWith() method to insert new DOM contents, I noticed that all content gets replaced except for the value of the title. Even though I tried different approaches, the tooltip only displays {{descriptions.title}} instead of the ...

The value retrieved by JQuery attr remains constant

Hey everyone, I'm having an issue with getting the ID from a custom attribute using jQuery. When I try to debug, I keep getting the same value each time. I have an HTML table that lists posts from a database using PHP, each with its own specific ID. ...

What is preventing me from extracting all information from online shopping sites?

Recently, I've been tackling a project that involves scraping data from various e-commerce websites. However, I've encountered difficulties in extracting the desired information from these sites. For instance, when attempting to scrape all the li ...

The setInterval function does not function properly in IE8 when set to 0

I have a function called changeColor that updates the styling of certain elements in my HTML. In order to apply this function, I am using a timer like so: var timer = setInterval(changeColor,0); The issue I am encountering is that setting the time interv ...

Obtaining the element ID with Selenium WebDriver in cases of dynamic IDs

I am encountering an issue with the drop-down image element. I have attempted various methods to select the element, but none of them seem to be working. This may be due to the fact that both elements are identical and their IDs are dynamic. I did manage ...

Code in PHP for implementing the Caesar cipher algorithm

(check out this example on jsfiddle: Caesar cipher) I have been working on a Caesar cipher, which involves shifting alphabetic characters; for example, with a shift parameter of 3: Original: a => d, b => e, c => f, ... Here is what my code look ...

The arrangement of columns is not correctly aligned

My website layout is giving me trouble. I want to create a three column design, but unfortunately, it's not aligning properly. Each subsequent column is being pushed down slightly more than the previous one. Is there any way to fix this issue? Interes ...

Resolved navigation bar problems

As a beginner in web development, I am working hard to launch my first website. Today, I have a question for the stack overflow community regarding a fixed navbar issue. The navbar I have created is functioning properly on Chrome, but when it comes to Fire ...

Z-index creates an obstacle that prevents items from being clicked on

I am facing an issue with my container div that has an inset drop shadow applied to it. Inside this container, I have child elements and I want these children to be clickable. For the drop shadow to show, it is necessary to set the z-index of the child el ...

Results for Angular application

Why is the output for the second div tag displaying normally? Why isn't AngularJS binding with it? Could you please provide an explanation? <!DOCTYPE html> <html> <head> <title>Angular JS Demo</title> <script ...

The combination of touch events and jquery-ui sortable is not functioning properly on mobile devices as anticipated

Perspective: Developing a mobile web application involves using jquery-ui sortable to organize a list of items, with restrictions on sorting the first and last items. The Objective: The aim is to implement the jquery-mobile tap-hold event to allow users ...

Are interactive SVGs the way to go? Embedding vs not embedding SVGs in JavaScript

I am attempting to modify the attribute of a circle within an SVG using JavaScript. It works fine when the SVG is directly embedded in the HTML file - 'kreis1' changes color upon button click. However, when I place the SVG in a separate file (whi ...

Troubleshooting alignment problem with table data in Internet Explorer 7

Here is the HTML code that I am currently using: <table class="question" cellpadding="0" cellspacing="0" border="0" width="99%"> <tr bgcolor="#ffffff"> <td style="width:5px;" height="10" text-align="left">hello</td> ...

Having trouble with aligning HTML elements with Bootstrap v4 framework

In the header, I have a container for the logo and another one for the login form. I want the logo to be on the left and the login form to be positioned at the top right corner. However, when I use float-left for the logo container and float-right for the ...

The custom stylesheet added to index.html is not taking precedence over the Bootstrap 5 styles applied through NPM

In my Vue 2 project, I encountered an issue with Bootstrap 5.3 when installed via NPM. My custom CSS stylesheet in the index.html file was not able to override Bootstrap's CSS. Interestingly, I faced no problems when using Bootstrap from a CDN. Addit ...

Selection of tooltip

Could someone assist me in creating a hover tooltip for my list item called gap analysis? I would like to be able to select the Kilometers range from the tooltip. Thank you! https://i.sstatic.net/9d0HM.jpg ...

Utilize the drop-down feature in HTML to create page links on your website through site.google

Can someone help me with writing the necessary code inside the value field of a dropdown menu on site.google? I want to link different pages using this dropdown, but I'm not sure how to make it function properly. Any guidance would be greatly apprecia ...

Guide to creating a graphic shape with an image snippet in PHP

I am looking to generate a frame image using a specific portion of an image. For instance: The user will upload an image piece through the back-end: https://i.sstatic.net/high1.jpg Now, I want to create a customized frame on the front-end based on the ...