Div inside is being cutoff by a div with 100% height

I am currently working on a website that has full height and width. I have a fixed panel on the left side and a scrollable main content area on the right side.

However, in the main content area, the last div is getting cut off for some reason. I have checked it on both Firefox and Chrome, but they show the same issue.

You can view the problem here: removed

As you can see, adding a large margin-bottom (50px or more) seems to solve the issue temporarily, but it doesn't look good aesthetically.

PS: Please disregard any missing images as I have only uploaded this specific page, not the entire website.

Thank you in advance for your help!

Answer №1

  1. It seems that setting the height to 100% can be quite inconsistent across different browsers, so it's best to avoid using it.
  2. If you typically use a CSS reset in your layouts, be cautious about adding overflow: hidden; as it may cause layout issues right from the beginning.

Removing "overflow: hidden;" reveals the problem. Your content pane is taking on the height of the body, causing the "topBar" section to be hidden at the bottom of the page because of the Body element hiding the overflow.

Answer №2

Yes indeed - consider using overflow:scroll; or overflow:visible; You may also want to experiment with removing float:right; as it can disrupt the layout and cause issues with box adjustments.

Update: It appears that the problem lies in the content divs having floats on both left and right sides, which interferes with margins due to disrupting the flow of the page elements.

Update(2): The issue seems to be caused by setting overflow:hidden; in the main style rule affecting multiple elements. Changing this to overflow:visible; and adjusting overflow properties elsewhere should help resolve the problem. Removing inline floats could also improve the situation. Further tweaking may be needed, but addressing these key points should address the underlying issue.

Answer №3

Detected problematic CSS on main-style.css line 5:

overflow:hidden

and also on main-style.css line 127:

overflow-y:auto

This is causing the bottom of the page to be cut off. After correcting this issue, it became apparent that the wrapper div does not span the full height of the window (due to the background gradient ending prematurely), resulting in misaligned content within the main divs. These are common challenges mentioned by other users working on formatting their pages correctly.

Please refer to this JsFiddle here. for a working example in Chrome, FF, IE 6-8, and Safari.

To address the floated div content problem, ensure you specify a width of 50% for both left and right-floated content. You can also use text-align:right for right-floated content to keep it aligned to the right of the div.

 <div class="centerText messageWrapper">
        <div class="messgaeHeader">
            <div style="float:left; width:50%">
                From: 12345678<br />
            </div>
            <div style="float:right; width:50%; text-align:right">
                Date: 123456789<br />
            </div>

        </div>
        1234567890
 </div>

If anyone has a solution for the 100% height issue caused by these adjustments, please share. While my proposed fix may introduce new problems, it could serve as a starting point for finding the ultimate solution.

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

Accessing JavaScript elements from PHP code

Is it possible to recognize JavaScript elements if they are nested within PHP tags? For example: <?php $username = "maniacal"; echo "<p class='welcome' id='greeting'>Hi, Welcome to the site!!</p>" ?> That's ...

The issue with grunt-contrib-compass not functioning properly within npm

I recently installed npm and grunt, followed by installing grunt-contrib-compass. However, when I try to run grunt, I encounter the following error: Running “compass:dist” (compass) task Warning: not found: compass Use –force to continue. Aborted du ...

What could be causing my jQuery script to malfunction?

After scouring through numerous Stack Overflow questions and conducting countless Google searches, I am still stumped by the issue at hand. As a beginner in web development, all I want is for this simple page to function properly. Can someone please point ...

Unable to locate CSS file in subfolder

Comparing two scenarios: Scenario 1 is problem-free, but issues persist in scenario 2. Review the details below: Scenario 1: MasterPages: Main\MasterPages.master Css : Main\Theme\CSS\ Javascript : Main\Theme\Javascrip ...

Bootstrap - What is the best way to increase the gap between card elements?

I've been struggling to create space between my cards. Currently, I have 4 cards displayed next to each other. However, when I tried using mr-3 on the card divs, the last card ends up going below the others. This is not the desired outcome. How can ...

Is it possible to extract the CSS path of a web element using Selenium and Python?

I am working with a collection of elements using find_elements_by_css_selector, and my next task is to extract their css locators. I attempted the following approach: foo.get_property('css_selector') However, it seems to be returning None. ...

When a user clicks anywhere on the website, the active and focused class will be automatically removed

I'm currently working with Bootstrap tabs on my website. I have three tabs, and when a user clicks on one, the active and focus classes are added to indicate which tab is selected. However, I've encountered an issue where clicking anywhere else ...

What is preventing images from displaying in my slider within baguetteBox?

Currently, I am in the process of incorporating a slider into my website using the baguetteBox library. After consulting the documentation, I successfully implemented an example that is functioning smoothly without any issues. In order to display a series ...

Tips on preventing a lone track in Laravel for Server Sent Events

In my Laravel app, I am exploring the use of Server Sent Events. The issue I have encountered is that SSE requires specifying a single URL, like this: var evtSource = new EventSource("sse.php"); However, I want to send events from various parts/controlle ...

Ways to customize the design of a bootstrap button using jQuery

<a class="btn btn-small btn-block btn-warning" type="button" id="999">&nbsp;</a> Looking to customize the button style? Check out http://getbootstrap.com/2.3.2/base-css.html#buttons I'm interested in changing the button's style ...

Incorporating Javascript into HTML

I have developed a script to randomly change the size of an element, but I am struggling to understand how to incorporate it using HTML or iframe code for randomization. <script type="text/javascript"> var banner1 = ["728", "90"]; var banne ...

Tips for sending hidden variables created dynamically with Jquery

I recently developed a dynamic table for my project. You can check out the DEMO here. The dynamic table is nested within a div called 'box' in a form. <div id="box"> </div> To save the dynamically generated data, I am using Jquery ...

php executing javascript - error

I have a question regarding my PHP file code: echo '<script type="text/javascript">'; echo '<audio id="player" src="../cdh/ba1.mp3"></audio>'; echo '<a onclick="document.getElementById( ...

I'm attempting to utilize a basic webcam capture upload feature, but it seems that the upload function is not functioning properly

UPDATE: This is the complete code that I simply copied and pasted. <!DOCTYPE HTML> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script language="JavaScript" type="text/javascrip ...

Why does my dialog box only open the first time and not the second time?

I have created my own custom dialog box using jQuery and it seems to be working fine initially. However, after closing it once, when I try to open it again nothing appears. Can anyone help me identify what's causing this issue? Below is the source co ...

Trouble with Bootstrap Popover's visibility

My current setup involves a popover that is not initializing properly. The code I am using is shown below: HTML: <div data-toggle="popover" data-placement="bottom" data-content="xyz">...</div> JavaScript: $(function () { $('[data-t ...

Tips for adjusting the size of your Navigation bar

I've noticed that most of the questions I've come across are related to WordPress or Bootstrap nav bars, which I'm not familiar with. I've created mine using CSS. I want to enhance my navigation bar for mobile users by making the butto ...

The Impreza theme is experiencing difficulty displaying Font Awesome icons

Recently, I had a client who needed a WordPress website. After working on the project on my own server, I finally completed it and transferred the entire site to the client's main domain at gulugalmarketing.com. Everything was functioning perfectly o ...

jQuery performs perfectly in Chrome but encounters issues in IE9/IE8 and other older versions of Internet

I've implemented this lengthy jQuery script to enable dynamic dropdown loading and updating when selections are changed. However, I'm facing issues in Internet Explorer where the script loads the dropdowns initially but doesn't trigger oncha ...

Having trouble with refreshing the div content when using jQuery's $.ajax() function

My goal is to refresh a div that has the id #todos after saving data in the database. I attempted to use .load() within $.ajax() $('.todo--checkbox').change(function () { let value = $(this).data('value'); $.ajax({ url: ...