Custom-designed scroll bars that perfectly match the size of the content window

Currently attempting to adjust the layout of my webpages in order to enable scrolling for dynamic content across various pages. I have made adjustments to the header, footer, and sidebar elements, but am facing issues with implementing proper overflow properties such as overflow: auto or overflow: scroll. Some pages are not displaying all content correctly. As a non-professional enthusiast managing a couple of websites, I am constrained from hiring a professional due to financial reasons.

A recent discovery that caught my attention was a fiddle demo that functions without any overflow settings at all. I included a footer component to accurately replicate the behavior observed on my own site. Notably, the scroll bars persist along the sides despite the presence of both header and footer sections.

http://jsfiddle.net/inquii/Nrs2u/4/

CSS:

html, body {
    height: 100%;

}

body {
    height: 100%;
}

.static {
    width:996px;
    z-index:2;
    height:150px;
    position: fixed;
}

#header {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-style: normal;
    height: 172px;
    width: 996px;
    min-width: 850px;
    margin-bottom: 0px;
    padding-bottom: 0px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    background-image: url(images/wga_banner.jpg);
    position: fixed;
    top:0px;
}


#wrapper {
    background-color: #FFF;
    margin-top: 0px;
    padding-top: 0px;
    width: 994px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    height: auto;
}

#sidebar {
    background-color: #FFF;
    width: 202px;
    float: left;
    margin-top: 0px;
    margin-right: 0px;
    height: 100%;
    min-height: 700px;
    position: fixed;
    top: 202px;
    bottom: 35px;
}

.main_content {
    background-color: #FFF;
    padding-right: 20px;
    padding-left: 20px;
    float: left;
    width: 752px;
    padding-top: 40px;
    color: #000;
    border-left-width: 2px;
    border-left-style: solid;
    border-left-color: #A9B2B1;
    height: 100%;
    position: absolute;
    top: 3px;
    left: 202px;
    overflow-y: scroll;
}


.container {
    background-color: #FFF;
    width: 996px;
    min-height: 100%;
    height: 100%;
    position: fixed;
    top: 202px;
}


#footer {
    background-color: #772432;
    clear: both;
    height: 35px;
    margin: 0;
    color: #FFF;
    padding-top: 10px;
    padding-bottom: 10px;
    width: 996px;
    position: fixed;
    bottom: 0;
}

HTML & PHP:

<body style="margin: 0; background-color: #A9B2B1;">
<div id="wrapper">
    <?php 
    $path = $_SERVER['toast'];
    $path .= "_includes/header.php";
    include_once($path);
    ?>
    <?php 
    $path = $_SERVER['toast'];
    $path .= "_includes/sidemenu.php";
    include_once($path);
    ?>   
</div>   

<div class="main_content">
    <p>Don't worry; there's no capital punishment during Toastmasters meetings. Unless, of course, the grammarian is in a bad mood.</p>
    <p>If you think of a club meeting as a project, then you can see the  general evaluator as a kind of project manager. As GE, your  responsibilities include:</p>
    <ul type="disc">
      <li>Ensuring the speech and leadership project evaluators know their responsibilities</li>
      <li>Supervising the timer, grammarian and Ah-Counter</li>
      <li>Evaluating everything that takes place during the club meeting </li>
      <li>Making sure each activity is performed correctly</li>
    </ul>
    <p>Several days before the meeting, contact the person who will be  Toastmaster of the meeting and confirm the meeting program. You should  also develop a checklist to follow during the meeting so you don't have  to keep all the details in your head. Some clubs have a prepared  checklist. If your club doesn't have one, ask the Toastmaster to help  you create your own checklist.</p>
    <p>When discussing the meeting program with the Toastmaster, ask what  evaluation format to use. Typically, an evaluator is assigned to an  individual, but sometimes evaluations are done by panels. The general  evaluator may set up any evaluation procedure he or she chooses, but it  should fit into the meeting program. Remember, too, that every  evaluation must be brief and complete. Review the <em>Effective Evaluation</em> manual for different evaluation formats.</p>
    <p>You'll also need to contact members serving as:</p>
    <ul>
      <li>Timer</li>
      <li>Grammarian</li>
      <li>Ah-Counter </li>
      <li>Individual evaluators</li>
    </ul>
    <p>Remind them of their assignments, and brief evaluators on their  responsibilities, the members they will evaluate and the evaluation  format to use. Make sure the evaluators understand that evaluation is a  positive, helping act that enables fellow Toastmasters to develop their  skills. Point out that an evaluation should enhance the speaker's  self-esteem and encourage evaluators to prepare thoroughly for their  role. Recommend that they call the member they've been assigned to  evaluate to discuss specific project objectives.</p>
    <p>Your final task <em>before</em> the meeting is to prepare a brief verbal explanation detailing:</p>
    <ul>
      <li>The purpose, techniques and benefits of evaluation so guests and new  members will better understand the function of evaluations. </li>
      <li>How evaluation is a positive experience designed to help people overcome flaws and reinforce good habits in their presentations.</li>
    </ul>
    <p>On meeting day:</p>
    <ul>
      <li>Arrive early. </li>
      <li>Make sure all evaluators are present and that they have the appropriate speaker or leader's manual. </li>
      <li>If an evaluator is absent, consult with the vice president education and arrange for a substitute. </li>
      <li>Ask each evaluator if he or she has any questions about the project  objectives to be evaluated, verify each speaker's time and notify the  timer if there are any changes. </li>
      <li>Take your seat near the back of the room. This will ensure you have a good view of the meeting and all its participants.</li>
    </ul>
    <p>The Toastmaster of the meeting usually introduces the general  evaluator before the Table Topics portion of the meeting. But your club  may have a different order for introductions, so check with the  Toastmaster or VPE before the meeting if you're not sure when you'll be  introduced.</p>
    <p>When you're introduced:</p>
    <ul type="disc">
      <li>Stand by your chair and deliver the explanation you prepared. </li>
      <li>Identify the grammarian, Ah-Counter and timer and have these members briefly state the purpose of their jobs. </li>
      <li>Request the word of the day, if your club has one, from the grammarian and then be seated.</li>
    </ul>
    <p>During the meeting, use your checklist and take notes on everything  that happens (or doesn't, but should). For example: Is the club's  property (e.g. trophies, banner, educational material) properly  displayed? Were there unnecessary distractions that could have been  avoided? Did the meeting, and each segment of it, begin and end on time?</p>
    <p>Study each participant on the program, from the person giving the  invocation or thought for the day to the last report by the timer. Look  for good and less than desirable examples of preparation, organization,  delivery, enthusiasm, observation and general performance of duties.  When it's time to begin the evaluation portion of the meeting, the  Toastmaster will introduce you, again. This time, you'll go to the  lectern and introduce each evaluator. After each recitation, thank the  evaluator for his or her efforts.</p>
    <p>Finally, give your general evaluation of the meeting:</p>
    <ul type="disc">
      <li>Use your checklist and the notes you took during the meeting. </li>
      <li>Phrase your evaluation so it is helpful, encouraging and motivates club members to implement the suggestions. </li>
      <li>You may wish to comment on the quality of evaluations. Were they  positive, upbeat, helpful? Did they point the way to improvement? </li>
      <li>When you've completed your evaluation, return control of the meeting to the Toastmaster.</li>
    </ul>
    <p>Being general evaluator is a big responsibility and it is integral to  the success of every single club member. People join Toastmasters  because they have a goal – they want to learn something. The club is  where they learn. If the learning environment isn't focused and fun,  members won't learn what they joined to learn. Your observations and  suggestions help ensure the club is meeting the goals and needs of each  member.</p>
    <p>And what do <em>you</em> get out of the deal? You get the chance to  practice and improve your skills in critical thinking, planning,  preparation and organization, time management, motivation and team  building!</p>
</div>
</div>
<!-- ends container-->


<?php 
   $path = $_SERVER['toast'];
   $path .= "_includes/footer.php";
   include_once($path);
?>
</div> <!-- ends wrapper-->
<script type="text/javascript">
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
var MenuBar2 = new Spry.Widget.MenuBar("MenuBar2", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
</script>
</body>
</html>

Answer №1

I'm not quite sure I understand your question, but I made the following adjustment:

Check it out on jsFiddle

The change I made was removing the CSS rule below:

body {
    height: 300%;
}

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

Interactive search tool for toggling visibility of elements

Hello everyone, this is my initial post on StackOverflow. Keeping my fingers crossed that it goes smoothly! <input type="Text" id="filterTextBox" placeholder="Filter by name"/> <script type="text/javascript" src="/resources/events.js"></scr ...

Positioning of Responsive Slider

I'm currently working on a responsive website, but I am facing challenges with the placement of the slideshow dots. When I switch to the device toolbar, they seem to change position. I have tried various methods such as using relative and absolute uni ...

Does setting white-space:nowrap enlarge the div?

My CSS code for div .name sets the width to 75% to truncate text if it doesn't fit. However, resizing the window causes the text to remain the same size and my entire website structure falls apart. This is the HTML code snippet: <tr> <t ...

Customizing Angular Material Pagination: Replacing First and Last Icons with Text

Looking to customize the pagination layout, I have managed to style most elements except for replacing the first and last icons with text. Here is the current setup: https://i.stack.imgur.com/ZneZs.png I want it to look something like this: https://i.st ...

the display:block property totally ruins my aesthetic

I'm facing an issue with filtering a table using an input box within one of the elements. Whenever I type something in the input box, the table automatically filters its rows based on the input. The strange thing is that when I try to use display:bl ...

What could be causing the footer to not show up at the bottom of the page?

I've encountered an issue with my code where the footer appears to be stuck at the bottom of the h2_c div instead of the bottom of the .content div where it should be. I have tried using positioning but it hasn't resolved the problem. Thank You. ...

Steps for activating all iframes on an HTML page

Seeking a solution to enable all iframes on my webpage without encountering the 'refused to connect' error. Is it feasible with the implementation of a meta tag? If yes, could someone provide a code snippet for reference? ...

What is the best way to elegantly display a block containing background and text using Angular and ngAnimate?

I'm a beginner when it comes to JavaScript and Angular. I am attempting to use ng-show and ng-hide for my background and text elements. However, I am experiencing an issue with my text: It smoothly hides, but when it is shown again, the text appears b ...

What could be causing the malfunction of this JavaScript dropdown select feature in Internet Explorer?

I created a website that requires users to input their location, including the city and state. The process involves two dropdown menus: - The first dropdown menu, labeled "state," loads all USA states as selectable options when the website is loaded. This ...

Adjust the vertical size of the background hue on the span element within the text

Can the height of the background color in my span be adjusted? HTML <span class="highlight">Some highlighted text</span> CSS .highlight{ font-family: 'Roboto', sans-serif; font-weight: 300; font-size: 1.5em; backgr ...

Achieving uniform distribution of items within a flex container

I have been struggling since yesterday to make this work. I just can't seem to get these flex items to fill the container equally in width and height. No matter what I try, it's not cooperating. <html> <meta charset="utf-8"> ...

"Enhance User Interaction with a Bootstrap Popup when Submitting Form Data via

As a junior web master, I have a simple question to ask. I have created a single page application for a client with a contact form at the end of the page. The validation is done using Bootstrap, but the only method I know to send the form data to a mail id ...

Adjust the stacking order to remove focus from the text field

Currently, I am facing an issue with my search box not unfocusing when clicked. My goal is to have the search box lose focus when anything on the page is clicked, especially the background (div.bb). The elements positioned above the background are set to p ...

The CSS Image Gallery refuses to be centered

.imageContainer{ width: 100%; margin: 0 auto; position: relative; text-align: center; } .imageContainer img{ width: 250px; height: 250px; float: left; } .imageContainer img:hover{ opacity: 0.60; } I am having trouble gett ...

Displaying postcode on a category page: A step-by-step guide

I would like to showcase the user input code and present it on the web exactly as entered. <?php #code... ?> Any assistance is greatly appreciated. Please excuse my English. Thank you! ...

Storing data from one file into a different directory in PHP

As a php beginner, I have discovered that the most effective tool for working with MySQL databases and files is php. Currently, I am trying to retrieve a file with the name 'file_name'. <input type=file name="file_name"> and then save th ...

Turn off the scrollbar without losing the ability to scroll

Struggling with disabling the HTML scrollbar while keeping the scrolling ability and preserving the scrollbar of a text area. Check out my code here I attempted to use this CSS: html {overflow:hidden;} Although it partially worked, I'm not complete ...

What is the correct xpath format for the options that are listed?

Is there a way to choose an option from the following HTML tag without using the traditional select tag? How can I generate a dynamic xpath for this particular element? <span class="select2-selection__rendered" id="select2-ContentPlaceHolder1_signup_ ...

Centering a Font Awesome icon within its parent element

Below is the code I am using: <div style="width:60px; height:60px; background-color: lightgrey;"> <a class="" href="javascript:void(0)" style="color: black; width: inherit; height: inherit;"> <i class="fa fa-lg fa-play" aria-hidden="t ...

Ways to repair an element

Can anyone help me troubleshoot the issue with my count text on a div block? It seems to be affected by changes in screen size. Normal https://i.stack.imgur.com/RZkgr.png On screen resize https://i.stack.imgur.com/hTdCG.png The Code: span.right-cor ...