div not recognizing the minimum height specified in percentage

I'm encountering an issue where one of my divs, content_wrap, is not adhering to the CSS property min-height:100%

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <link rel="stylesheet" type="text/css" href="css/main_style.css">


    </head>
    <body>
        <div id="header">

        </div>
        <div id="center_content_common">
            <div id="menu_wrap">

            </div>
            <div id="content_wrap">
                <div id="content_block">
                </div>
            </div>
        </div>
        <div id="footer">

        </div>
    </body> 
</html>

CSS

html,body
 {
    padding:0px;
    margin:0px;
    font-family:"Trebuchet MS", Helvetica, sans-serif;
    height:100%;
    width:100%;
 }
 #header
 {
    width:100%;
    height:15%;
    background-image:url('../images/header_gradient.png');
    background-repeat:repeat-y;
    background-size:100% 100%;
    border-bottom:3px solid #b8babc;
 }
#center_content
{
    min-height:79%;
    height:auto;
    background-image:url('../images/content_area_gradient.png');
    background-repeat:repeat-x;
    background-size:100% 100%;
    overflow:auto;

}
#center_content_common
{
    min-height:79%;
    width:100%;
    height:auto;
    overflow:auto;
}
#content_wrap
{
    min-height:500px;
    width:84.5%;
    float:right;
    background-image:url('../images/content_area_gradient.png');
    background-repeat:repeat-x;
    background-size:100% 100%;

}
#content_block
{
    min-height:100%;
    width:100%;
    margin:auto;
}
#menu_wrap
{
    width:15%;
    min-height:100%;
    height:auto;
    float:left;
}
#footer
{
    height:5%;
    width:100%;
    background-image:url('../images/footer_gradient.png');
    background-repeat:repeat-y;
    background-size:100% 100%;
    border-top:3px solid #b8babc;
}

What might be causing this CSS problem?

Answer №1

Try setting height:100% on your #center_content instead of using height:auto. This should help resolve the issue.

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

Having trouble retrieving the accurate count of buttons with a particular class identifier

I have a task where I need to count the number of buttons within a dynamically created div using JavaScript. The buttons are added from a separate JS file and when I view the code in the browser's inspection tool, everything appears to be correct. How ...

modern marquee

I have implemented a marquee tag that displays news from my database. In order to keep the marquee up-to-date without refreshing the entire page, I utilized ajax (update_panel + timer). However, I am encountering an issue where the marquee does not continu ...

Conceal the overflow from absolutely positioned elements

I've gone through all the similar examples but still struggling to find the correct solution. My issue involves a basic Side Menu that toggles upon button click. Within the menu, there is a list of checkboxes positioned absolutely with the parent con ...

Move the cursor over the text to reveal an image

Hello, I'm trying to replicate the same animation effect as seen on these websites: and . Specifically, when hovering over the "selected works" section, an image is displayed. I suspect it's using a JavaScript library, but I can't seem to i ...

Incorporate a CSS style element to a hyperlink button in JQuery Mobile

I am trying to apply a style to a link button element using JQuery. The code I have written is not working. Can anyone provide suggestions on how to achieve this? Below is the snippet of the HTML <div data-role="content"> <a href="#" class= ...

Controlling File Upload Edits: A Guide to Effective Management

I am facing an issue on my product page related to adding and updating products in the database. The problem lies with images not displaying correctly. During the product insertion process, everything works fine. In my aspx page, I have the following code ...

Align both the image and text in the center with no space between

How can I center two blocks containing both images and text vertically and horizontally while using flexbox? I notice that when the text is longer, padding appears between the image and the text. How can I remove this padding?1 .product-teaser { width ...

Customizing Paths in Express Handlebars

I have a query regarding setting up custom folders in Express.js Here's my situation: I need to implement logic where if a specific name is present in my database, the paths for CSS and JS files should be altered before rendering. By default, my pat ...

Both JOINs are being performed on the identical table

Currently, I am working on a website that displays soccer scores with two teams and two scores stored in my database. Below is the code I am using: <?php $result = mysql_query( "SELECT * FROM resultat LEFT JOIN brukere ON resultat.do ...

In HTML, the size and position of an <a> element cannot be altered or adjusted

I am having trouble with an anchor element that is contained within a div. No matter what I try, I cannot resize or move it up or down without it covering its sibling element. I have attempted using transform-translate and margin properties, but to no avai ...

Retrieving Data from an Unnamed HTML Table using Selenium

I'm currently exploring ways to extract the output generated by this website: mailtester.com upon inputting a complete email. Let's take the email address [email protected] for demonstration. Once this address is entered and submission is ma ...

div within a fixed width container with 100% width inside

Is there a way to ensure that div B has a width of 100% when nested inside Div A, which already has a fixed width? .divA{width:600px; margin:0 auto;} .divB{width:100%; height:20px; background-color:black} .filler{height:800px; background-color:grey} ...

react elements are consistently positioned at the bottom of the webpage

I am currently in the process of developing an airline reservation system using the MERN stack. I have successfully implemented the navbar, however, whenever I try to add a new div or element, it appears outside of the page and requires additional styling ...

Modifying the calendar from a 7-day week to a 5-day week

I am currently in the process of developing a 7-day calendar (Sunday to Saturday) which is functioning well. However, I am interested in adding an option to switch it to a 5-day calendar (Monday to Friday). I was wondering if there is a way to modify the e ...

Loss of Image Quality when Zooming out Canvas

I have developed a code to implement zoom-in and zoom-out functionality for a canvas image. However, I am facing an issue where the quality of the image deteriorates when zoomed more than once. I am using the canvas2image plugin to convert the canvas into ...

How float elements can affect z-index through opacity

While troubleshooting the alignment of my floated images, I came across an unexpected issue related to opacity: http://jsfiddle.net/tshwbnLo/ It appears that when an element has opacity, it does not adhere to the usual behavior and instead overlaps the f ...

What is the best way to add padding to each line within a block of text containing multiple lines

My <span> tag has a background color and left and right padding applied to it. However, the padding is only visible at the beginning and end of the <span>, not on each line when the text wraps onto multiple lines. Is there a way to add padding ...

Saving user input from a PHP form into a text file

Below is a simple PHP form that performs a calculation when submitted. Now, I want to save the inputs (height, weight) and calculation result to a text file without displaying the path of the file. Ideally, I would like each submission to add a new line in ...

How can I style the inner HTML text of an element without altering the style of its subelements? (CSS Selector)

I created an html structure that looks like this: <p> This is some test inside the p tag <div class="some-class"> <div class="sub-div-class"> <i title="title test" data-toggle="tooltip" class="some-icon-class" data-ori ...

Is there a way to pick up text where a div element ends using Bootstrap or HTML?

Using Bootstrap, I placed a div on the right and now I want the text outside to seamlessly continue from where the text inside the div ends. You can see the visual representation of what I'm aiming for in this picture. Any suggestions on how to achiev ...