The placement of the button will refuse to listen to my commands

I am encountering an issue with my website where I have 3 boxes with roll-over effects. When a user hovers over the box, the content changes from a paragraph to an unordered list with a 'view more' button.

The problem is that each box has a different number of items in the list and the button is aligning at the end of the list instead of at the very bottom of the box. I have tried various solutions found in forums but haven't been able to resolve the issue. Can someone guide me in the right direction or point out if I am missing something?

Here is the link to the page:

The CSS code snippet I am working with is provided below:

.box {
  // CSS styles here
}
// More CSS styles for different elements within the box

<div class="box"> 
    <h2>Managed IT Solutions</h2>
    
    <p>Content goes here.</p>
    
    <i class="fa fa-gg"></i>

    <div class="overbox">
        <div class="title overtext"> 
            <ul>
                <li>List item 1</li>
                <li>List item 2</li>
                <li>List item 3</li>
                // Add more list items as needed
            </ul>
            
            <div class="tagline overtext">
                <button type="button" class="btn btn-primary btn-lg btn-block"><a href="#">Find Out More</a></button>  
            </div>
        </div>
    </div>
</div>

Any assistance on this matter would be greatly appreciated. Thank you!

Best regards, PhilB

Answer №1

To position your button at the bottom of .overbox, apply the CSS rule height:90% to the class .text.

.box .title {
    font-size: 16px;
    text-transform: none;
    opacity: 0;
    transition-delay: 0.1s;
    transition-duration: 0.2s;
    height: 90%; /*Include this line*/
}

Answer №2

take a look at the code snippet provided below.

If you want the button to remain fixed at the bottom of the .overbox, you should ensure that it stays relative to the overbox. To achieve this in HTML, move the div containing the button out of the .overtext and make it a direct child of overbox.

Then, apply position: absolute to the div holding the button (tagline) and set bottom: 0 or bottom: 5px as shown in the example below (adjust according to your preference).

I hope this explanation clarifies things for you.

.box {

  cursor: pointer;
  height: 340px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.box .fa {
    position: relative;
    margin-top: 40%;
    left: 43%;
    font-size: 48px;
}

(remaining CSS styles omitted for brevity)
 
<div class="box"> <h2>Managed IT Solutions</h2>

(remaining HTML code snippets omitted for brevity)
    
</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

get the value of the last selected element using jQuery

I am facing an issue where I cannot retrieve the selected value from my second select element. Even though I have selected the second option in the dropdown, it keeps returning the value of the first option as empty. Here is a snippet of the HTML code: & ...

When the browser window is minimized, the top section of the website becomes concealed

For the past few weeks, I have been working on creating a new website. The progress is looking good overall, but there is one issue that I have encountered. When viewing my website in a browser window smaller than the actual webpage size, the top menubar ...

What is the best way to incorporate a .mov file into a webpage?

I recently exported a video file in .mov format from Final Cut Pro and I am looking to embed it into my HTML webpage. I attempted the following: <object width="800" height="600" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="htt ...

Guide to using two UI grids simultaneously with the directives ng-hide and ng-grid

As a newcomer to AngularJS, I am attempting to create a page with two ui-grid elements and a button labeled "other-grid". The goal is for the first grid to load initially, and when clicked again, it should be replaced by the second grid. However, I am en ...

Troubleshooting the "Access-Control-Allow-Origin" header issue in ASP.NET

I have two projects running simultaneously on different URLs: http://localhost:497 and http://localhost:580 On http://localhost:580, I need to display an HTML file from a PDF folder in http://localhost:497 within an iframe. <iframe src="http://localho ...

Absence of MVC5 Vanilla Layouts

Creating my first MVC5/Razor application from the ground up, I want to avoid including unnecessary references that cause bloat. In the Views folder, I have separate Home and Shared subfolders. The Home folder contains Index.cshtml, while the Shared folder ...

Vue component retrieval on the client side

I am attempting to retrieve a component using Vue with cdn in order to dynamically re-render from a public project that contains a file named cash-sale.vue with the .vue extension. <script> export default { data(){ return { "rows&quo ...

Stop Text Input resizing in Internet Explorer

Encountering an issue with handling input field widths in Internet Explorer. The code pertains to a portlet, requiring dynamic widths as the user can position it across three columns on the page with varying widths. While functionality is smooth in Firefox ...

Utilizing a dynamic URL to set the background image of a div element (with the help of

Currently, I am in the process of designing a user registration page that allows users to input an image URL and view a preview of the image within a designated div. The div already contains a default image set by a specific class. The HTML code for displa ...

What is the best way to eliminate the empty space at the bottom of my Bootstrap site?

Help needed with my Bootstrap webpage! I'm encountering an issue where there is a 5px gap at the bottom of my page that I can't seem to get rid of. I've tried adjusting the margins and padding to no avail. Any suggestions on how to fix this ...

List items are not appearing correctly on display

When attempting to design a basic navbar, I encountered an issue where the list items were stacking on top of each other instead of displaying horizontally as intended. The parent container has a position of relative, while the child is set to absolute. ...

What's the issue with HTML Table column width when using fixed-layout and 100% width?

Why does the table ignore column width and make them all even when using fixed-layout with a 100% width setting? Here is how the table looks without the 100% width: https://i.sstatic.net/MNrjZ.png However, setting the table width to 100% causes all colu ...

Constructing a list without a specific order using data from various MySQL databases

I am currently in the process of constructing a menu that will display categories, subcategories, and tertiary categories sourced from three distinct tables within my database. Here is how the data is structured: TABLE A ------------------------ | ID | na ...

Expanding footer to match dimensions of HTML webpage and customizing icons - a guide

I need assistance in making my 'footer' element stretch along the bottom of the page. Currently, it seems to fit around 95% of the bottom area. Additionally, I am looking for guidance on how to evenly space each icon towards the bottom left of th ...

Using Jquery to load Intranet HTML files

My current project involves creating a system for users to access a specific application on the work intranet. The setup consists of directing them to a splash index.html page containing links that lead to various network drives, some accessible only to ce ...

Steps for accessing a file using HTML form input data:

I have a unique setup with two distinct fields featuring drop-down lists - one for selecting a User and the other for choosing Data. Additionally, I've included a button that is intended to serve as an output based on the selected options from the dro ...

Tips for generating dynamic rows and storing them in a database

Hey everyone, I'm facing a major issue with my timesheet. I need to add dynamic rows and save them to my database. Here's what my timesheet looks like: . For each day, I want to be able to add details like project client, location, description, a ...

Tips on eliminating horizontal scrolling in HTML and CSS

I am working on a simple web page template and encountering an issue with a horizontal scroll appearing on the page. I would like to remove it. Below is the code I am using: <html lang="FA"> <head> <meta charset="UTF-8&qu ...

Issues with retrieving data from Firestore and storing it into an array in a React

Struggling to fetch data from my firestore and display it on the webpage. Despite trying all possible solutions and searching extensively, I am unable to get it working. When using the code below, nothing appears on the website. However, if I switch to th ...

CSS Padding Hover Transition solution for Eliminating Flickering Text issue

Is it possible to achieve this? I'm attempting to animate the padding around a centered text link. When the text link is clicked, the padding changes from 20% to 100%, which works correctly. The text is horizontally and vertically centered using CSS ...