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 8415517
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:28:11+00:00 2026-06-10T01:28:11+00:00

I added web interface for a program’s output which looks like this: <body> <table

  • 0

I added web interface for a program’s output which looks like this:

<body>
<table id="header" approx height is 100px, width is 50% of screen located in the middle>
...
</table>
<div id="programoutput">my program outputs stuff here using Ajax.PeriodicalUpdater</div>
</body>

I use css for the div

#programoutput{ white-space:pre; }

and output from the program might contain very long lines. So, web page should have horizontal scrollbars then. What I want, is to make sure that the #header is always in the middle of the screen (not the body) and the body might become wider then the viewport based on the width of #programoutput.

I almost got it already, but I have some problems: horizontal scroll bar appears in the #programoutput itself not the window. and if height of the output is small (like a few lines in this case) then the horizoncal scroll bar is located in the middle of the window.

  • 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-06-10T01:28:12+00:00Added an answer on June 10, 2026 at 1:28 am
    #header
    {
     position:fixed;
     width:50%;
     left:25%;
    }
    #programoutput
    {
     white-space:pre;
     overflow:visible;
    }
    

    At this point your table should be placed in the center of view port, and your div should be long enough for your body to generate scrollbar.

    But since the table is position:fixed, your div would “float” over your table. Now you have several options:

    1. Give your div a top position:

    position:relative;
    top:100px; /* you'll have to know your table's height */
    

    2. Place your div at the bottom of the body (this seems valid in your code piece):

    position:absolute;
    bottom:0px;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UserControl which I have added to my web.config <add tagPrefix=BCF src=~/controls/MyMessageBox.ascx
I've got a project which as a reference added to System.Web. However, it can't
I added Comet servlet into Spring web application. This servlet does not differ from
I just added this to my web.xml on my JBOSS server. But it had
I have added this rule in my web.config to redirect non www URLs to
i have the WCF web service within my solution. service has interface which implemeted
I have a WCF web service that defines IInterface interface. This interface declares two
I'd like to add search interface in TabView. I read this document. But it
UPDATED: Added some sample code to help clarify. Hi, Feel like this shouldn't be
I added a web service consumer to a vb 2005 Windows app and tried

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.