Solved

Using CSS to add scrollbars to <div> placed inside fixed-position <div>

Posted on 2013-06-25
2
498 Views
Last Modified: 2013-06-25
Test page:
http://partnersdesign.net/test

Click the "Partners Design, Inc." navigation button at the top. There are two <div>'s nested like this:

<div id="partnersdesignwrapper">
      <div id="partnersdesign" class="clearfix">
            ...content...
      </div>
</div>

Styled like this:

div#partnersdesignwrapper{display:none;
	position:fixed;
	top:0;
	left:0;
	width:100%;
	height:100%;
	margin-top:4em;
	background-color:rgba(0,0,0,0.7);
	}
div#partnersdesign{position:relative;
	width:66em;
	margin:3em auto;
	padding:0 0 2em 0;
	background-color:rgba(255,255,255,0.9);
	color:#000;
	font-family:Arial,Helvetica,sans-serif;
	font-size:0.9em;
	min-height:800px;
	height:auto !important;
	height:800px;
	}

Open in new window


Everything works exactly the way I want, except if you click the "Partners" sub-nav link, for example (and your browser window is not tall enough), no scrollbars appear at the right.

Is it possible to allow that <div> to have its content scroll, even though it is inside a position:fixed <div>? If you look at the page, you can see what the issue is... you can't read the content that is further down the page.

Thank you!
0
Comment
Question by:bbdesign
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39276642
That's because your whole page is very tall
You could add a fixed height to the div and use overflow:auto
That would give scrollbars, but it needs the fixed height
0
 

Author Comment

by:bbdesign
ID: 39276650
Perfect, thanks! I think I got it.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Change how page is organized 3 38
Html using "Or" in condition 3 29
title attribute 5 27
Make Float not to Wrap 15 34
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question