/    Sign up×
Community /Pin to ProfileBookmark

scrollbars yes!

I need something to ADD scrollbars on pop-up windows if the content isn’t big enough.

I’m using this to get rid of scroll bars:

<style type=”text/css”>
html,body{
overflow:hidden;
}
</style>

Perfect! But now I need something to ADD scrollbars on pop-up windows if the content isn’t big enough.

For example: The store has 4 categories. each has a Flash button. The Flash button opens a new pop-up window (scrollbars=1 ). Three of the categories have many products, so there are scroll bars. On of the categories only has one product, so no scroll bars… and the page looks funny.

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@derekharveyApr 11.2007 — If you are using a shared css file for both the page with the popup link and the popup page then i guess the easiest way to get this to work is by adding an style to overwrite the overflow attribute.

So in the popup window (underneath) the inclusion of the css file add:

<style>

html,body{

overflow:auto;

}

</style>

This should then reset the scrollbar behaviour in the popup window.

I hope this helps, if not then please tell me and i will suggest more ideas ;-)
Copy linkTweet thisAlerts:
@sroberts209authorApr 11.2007 — Thanks! Unfortunately, I will have to wait until I can try this. We built the HTML... but then we hired a php developer to implement the eCommerce part of the site ... sonow all the files are no longer HTML... they're php or something and I can't figure out which are which.

I'll send this css to our guy and see if it works!
Copy linkTweet thisAlerts:
@rozmar564May 16.2007 — I am having some similar problem:

I have a document with 3 frames top, middle and bottom. When I click on a menu in the top frame, it loads a document into the middle frame. In some cases, I need to add scrollbars to the middle frame. My code is as it follows:
[CODE]function loadRevDocs() {
parent.bottom.document.open();
parent.bottom.document.writeln('<head>');
parent.bottom.document.writeln('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
parent.bottom.document.writeln('<title>Untitled Document</title><style type="text/css">');
parent.bottom.document.writeln('<!--');
parent.bottom.document.writeln('body,td,th {');
parent.bottom.document.writeln(' color: #FFFFFF;');
parent.bottom.document.writeln('}');
parent.bottom.document.writeln('body {');
parent.bottom.document.writeln(' background-color: #000000;');
parent.bottom.document.writeln(' margin-left: 10px;');
parent.bottom.document.writeln(' margin-top: 0px;');
parent.bottom.document.writeln('}');
parent.bottom.document.writeln('-->');
parent.bottom.document.writeln('</style></head>');

parent.bottom.document.writeln('<body>');
parent.bottom.document.writeln('<img src="bottom_02.jpg" width="1000" height="120" />');
parent.bottom.document.writeln('</body>');
parent.bottom.document.close();
parent.document.getElementById("middle").scrolling="yes"
}

[/CODE]



The problem is, that this works fine in IE6 and FireFox but does not work in IE7. Any ideas?
Copy linkTweet thisAlerts:
@rozmar564May 16.2007 — I just noticed, that the code seems a little bit strange. I write a lot of staff in the bottom document, but then change the scrollbars for the middle one. Actually, this is the way I want to do it... its not a bug.
×

Success!

Help @sroberts209 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...