iPhone footer hides table content

Encountering issues on an iPhone while attempting to display a "timeline" consisting of a table content. The problem arises when 30 rows are present, but only 28 are visible on the screen. The remaining two rows are hidden behind the footer, requiring scrolling of the entire page to view them.

How can the table height be adjusted to end at the footer's start rather than at the bottom of the page?

https://i.sstatic.net/SuMFzm.jpg

https://i.sstatic.net/kgsHcm.jpg

The page structure is as follows (table content is loaded dynamically):

        <div class="container-fluid p-0">

            <div class="card rounded-0" id="cardTav">
                <div id="bodyTavoli" class="card-body text-center">
                    <div class="table-responsive tableFixHead">
                        <table class="table table-hover" id="tableLine" border="0" style="border: none; width: 100%; margin-bottom: 0px;">
                            <thead id="timehead">
                                <tr>
                                </tr>
                            </thead>
                            <tbody id="timeline">
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

        </div>

        <footer class="footer">
            <div class="container">
            </div>
        </footer>

Check out the JSFiddle code (note: there is a navigation bar above the container): https://jsfiddle.net/3hvLwt6m/

Answer №1

Kindly adjust your CSS code with the following updates:

CSS

.tableFixHead {
    overflow-y: scroll;
    max-height: 80vh;
}

Answer №2

table {
 margin-bottom: 60px;
}

My suggestion is to give this code a try by adding it to the JavaScript fiddle you shared. Unfortunately, I don't have an iPhone to test it out myself.

Answer №3

To adjust the CSS, follow these steps:

.tableFixHead {
    max-height: 70vh;
    overflow-y: auto;
}

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

Move the divs within the overflow container by sliding them, then take out the initial element and append it to the end

Currently, when I utilize .appendTo(".wrapper") as shown in the code below, it eliminates the animation effect. My goal is to have the div on the far left slide out of view, triggering an overflow hidden effect, and then be placed at the end of the slide c ...

Clicking on navigation does not close Bootstrap dropdown

When I use this code on my HTML page, the dropdown menu appears correctly. However, once I click a link, the menu does not close and remains open. How can I resolve this issue? <div class="col-lg-8 col-md-8 col-xs-2 accordion-menu"> <button t ...

Verify the position of the scrollbar without triggering any reflow

Here is a function I have: is_bottom: function() { if (settings.scrollBottomOffset === -1) { return false; } else { var scroll_height, scroll_top, height; scroll_height = ...

Ensuring the precise alignment of a singular component in Angular 8 while keeping the styles of its child elements unchanged

Is there a way to centralize div elements within a component without impacting the styles of those specific divs? How can I achieve this? I'm currently working with Angular 8. Using the text-align method affects the alignment of the text inside the d ...

JavaScript is proving to be uncooperative in allowing me to modify the

Despite searching through previously asked questions, I have been unable to find a solution to my issue. I am struggling with changing an image source upon clicking the image itself. The following is a snippet of my HTML code: <img id="picture1" oncli ...

Using Perl's regular expressions to perform substitutions

Within an html file, my goal is to incorporate a link to the numbers that appear within the [ ] in various patterns such as: [1] or [1-2] or [1,3,6] or [1,3,4-6, 9]. While I have managed to match the simple pattern like the first one: $html =~ s`\[&b ...

What methods can be used to strategically incorporate gray into both the left and right sides of a page design?

I'm currently working on an asp.net MVC layout page and I'm trying to create a layout where the left side and right side are gray. However, I'm not sure how to achieve this using HTML, CSS, or Bootstrap. I specifically need to know how to ...

Guide on updating a table with query parameters in Html Agility Pack using C#

Struggling with parsing this URL using the Html Agility Pack: " The default table that shows up is always based on the closest contract date and the current date. I can parse the entire page without any issues, but when I try to request a different date ...

What is the best method to apply a background image in HTML that functions properly in Internet Explorer?

Having trouble getting this CSS code to work in Internet Explorer. Need a solution that is compatible with IE for setting the background. body { background: url("images/Login-BG.png") no-repeat center center fixed; -moz-background-size: cover; -webkit ...

What steps should I take to design and implement this basic search form?

Essentially, I have a three-page setup: - One page containing all possible search results such as: 'search result 1' 'search result 2' 'search result 3' - Another page with a search form and enter button. - And finally, a res ...

What is the best way to smoothly transition in an image that is dynamically set using Angular?

I am using Angular to set a background image for my page, but the current loading behavior is not visually appealing as the image loads from top to bottom. I would like to implement a fade-in effect or load the image from a blurry view to enhance the user ...

How to extract the content of a child HTML element using jQuery

Is there a way to extract the text from the h4 tag with the class .media-heading in the code snippet below when a user clicks on the link? I attempted to use the closest method but it didn't yield the desired result. Check it out: <li class="media ...

How can I prevent Bootstrap from conflicting with my custom styles?

My HTML menu was functioning perfectly with specific CSS styles, until I decided to add a Bootstrap reference in the header: New Link Added <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" /> Afte ...

Having difficulty displaying closed captions on HTML5 videos

I'm currently attempting to enable closed captions for an HTML video. Here is the code I am using: <video width="320" height="240" id="video" controls> <source type="video/mp4" src="file.mp4" > <track id="video1" src="file1.srt" labe ...

Error in scrolling previews detected in Jssor horizontal template maker

I've been working with Jssor Slider Maker and I'm using the vertical preview template that features two columns on the left side and a maximized image on the right side. After pulling the code from the developers pack, it includes scripts, CSS an ...

Customizing the appearance of selection dropdown options in React

Is it possible to customize the styling of the choices in a React input dropdown? For instance, I am interested in creating an autocomplete dropdown that presents the options neatly arranged in columns. Essentially, I want to design a dropdown data grid t ...

Google has not detected any hreflang return tag

My website has encountered indexing errors on Google Search Console. According to the reports, many pages are showing an alternate version in a different language without the "return tag". This "return tag" is believed to be the pointer back to the origina ...

Disable the ability to scroll the background when the lightbox is opened

Currently incorporating Featherlight for a lightbox feature. Encountering an issue where the background remains scrollable when the lightbox is open. Typically, lightboxes require adding a class to the body with overflow:hidden; to resolve this problem. S ...

Having issues with CSS animation keyframes not functioning properly in NextJS

Currently, I have a straightforward component in NextJS that is displaying "HI" upon loading. This component fades in when rendered, but I am facing an issue while trying to pass a prop to make it fade out. The problem lies in the fact that even though the ...

Struggling with removing the unattractive left border on my Tumblr page

I am currently working on the website www.fashiontogo.ca To see the source code, please use Google Chrome's feature to view the source since I cannot provide the HTML or CSS directly here. The site is not my own creation, and I did not develop it fro ...