Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6612225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:04:18+00:00 2026-05-25T20:04:18+00:00

With YUI, I am creating a fixedcenter dialog, giving it a certain width: var

  • 0

With YUI, I am creating a fixedcenter dialog, giving it a certain width:

var myDialog = new YAHOO.widget.Dialog("my-dialog", { 
    width : "300px", fixedcenter: true });

The content of the dialog is dynamic, and might be large enough that the height of the dialog becomes larger than the height of the viewport. For instance, see this example (to see/change the source click on the “+” at the top right). Make your browser window smaller before loading this example, and you’ll see you can’t reach the rest of the content in the dialog.

Truncated dialog

Instead of requiring users to scroll down in the main page to see the rest of the content, I’d like the body of the dialog to expend to the height of the viewport, and when this is not enough, I’d like to have a scrollbar inside the body. This is equivalent to having something like .bd { min-height: viewport-height; overflow: scroll }, where viewport-height is the height of the viewport, maybe minus what is necessary for the titlebar.

Setting this min-height could be done in JavaScript with code running when the dialog is shown and when the window is resized, but is there a better way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:04:18+00:00Added an answer on May 25, 2026 at 8:04 pm

    …but is there a better way to do this?

    Nope – not with CSS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My code for creating the data table looks like this: myDataTable = new YAHOO.widget.ScrollingDataTable(
I am using YUI and need to get the true width of the element.
I am using the YUI Rich Text Editor (YAHOO.widget.Editor), and I got it working
This line in YUI's Reset CSS is causing trouble for me: address,caption,cite,code,dfn,em,strong,th,var { font-style:
DUPE: Any Yahoo YUI validation framework that I can implement in asp.net MVC? Has
I'm using the YUI Uploader component and want to automatically open the browse dialog
I have a YUI dialog that submits a form to a Java servlet. The
Using YUI, I want to create a menu button, passing in the menu widget
I am using YUI's Dialog control to show a Flash movie on my site
I'm trying to use YUI compressor in a maven goal, but I'm pretty new

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.