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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:51:51+00:00 2026-05-13T05:51:51+00:00

I’m to implement a fullscreen layout for a Web app according to custom specs.

  • 0

I’m to implement a fullscreen layout for a Web app according to custom specs. I’ve got most of it under control but there’s one part I have some trouble with.

To economize on space in an otherwise already crowded GUI, a “Log out” button should go into the title row rather than elsewhere. The title row, of course, contains a title. The button should appear in its default dimensions for the given browser/opsys combination at the top right, with a little padding. The title should be centered in the remaining space in that row. Here’s a picture:

+====================+=======+
|    ACME Widgets    | [Btn] |
+====================+=======+

I don’t know how wide the button will be, nor should I need to. The layout should scale smoothly on a range of devices and resolutions, from about 200 px width to 2000:

+==================================================+=======+
|                   ACME Widgets                   | [Btn] |
+==================================================+=======+

…with the title continuing to be centered in its area, which again will always be (total available width – width required for the button). The page may end up being used in a JavaScript-less environment, so dynamic size calculation is not an option. Nor (before you ask) is talking the customer out of his design.

Can anyone please suggest HTML (and, if required, CSS) to achieve this layout?

Update More constraints/explanation (sorry): This app could be viewed by people with poor vision, who like to use their zoom button (Ctrl–+) to blow up font sizes. Therefore, I’d like to go with as few assumptions about things like text sizes as possible. Obviously, on a tiny display with big zoom I would eventually not have enough space for the unpadded title and button; but until then I’d like to stay flexible.

  • 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-13T05:51:52+00:00Added an answer on May 13, 2026 at 5:51 am

    I have two possible solutions. I will admit, they seem like these are simply modifications to some answers already given but should hopefully address the comments you’ve left so far.

    CSS approach:

    Lets say you determine that a nice width for your button is 5em. This of course scales with the browser’s text zoom to always be, well, 5em.

    Then perhaps you could float this to the right, and put a margin-right on your title of 5em.

    #buttonContainer {
     float:right;
     display:inline;
     width:5em;
     text-align:right;
    }
    #titleContainer {
     text-align:center;
     margin-right:5em;
     border:1px solid blue;
    }
    
    <div id="buttonContainer">
        <input id="btnLogOut" type="button" value="Log Out" />
    </div>
    <div id="titleContainer">
        <h1 style="text-align:center;" id="title">ACME Widgets</h1>
    </div>
    

    This approach may not be picture-perfect, but you can tweak the em unit and arrive at a nice solution hopefully.

    Table-approach:

    Another approach is a modification of the table-based approach given by borayeris. I have modified this to not make any assumptions about the width of the button…

    <table border="0" width="100%">
      <tr>
        <td width="99%" align="center">ACME Widgets</td>
        <td width="1%" align="right">button</td>
      </tr>
    </table>
    

    Good luck!

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

Sidebar

Ask A Question

Stats

  • Questions 367k
  • Answers 367k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Just guessing here... When you first build a solution, it… May 14, 2026 at 5:01 pm
  • Editorial Team
    Editorial Team added an answer The add method is add(E e), so all is right… May 14, 2026 at 5:01 pm
  • Editorial Team
    Editorial Team added an answer What I did which is not great: private void UserControl_Loaded(object… May 14, 2026 at 5:01 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.