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

  • SEARCH
  • Home
  • 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 8965197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:45:47+00:00 2026-06-15T16:45:47+00:00

I need to make ui controls panel, that has 100% width and gradient background.

  • 0

I need to make ui controls panel, that has 100% width and gradient background. UI elements on this control panel should have width 1000px and should be centered.

For a moment i have two elements:
panel (width 100%, gradient background), global wrapper
panel-wrapper (width 1000px, transparent background), is placed inside “panel” element, contains UI elements.

It works brilliant in all browsers i need, but i really don’t like to use two HTML elements, when logically it should be just one. Perhaps it is possible to have one element “panel” with fixed width (1000px) and auto-padding, that will cover all free space to the left and to the right? (i’ve made an image to show it if my explanation is crazy :))

enter image description here

It is possible?

  • 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-15T16:45:47+00:00Added an answer on June 15, 2026 at 4:45 pm

    You could potentially use the calc() function, though it isn’t highly browser compliant.

    Here is a quick example and more information on compatibility and usage can be found here.

    *I made the example in Firefox, didn’t test it elsewhere.

    Just for a quick code example, the following shows one solution:

    div {
        width: 100px;
      background-color: blue;
      height: 100px;
      padding-left: calc(50% - 50px);
      padding-right: calc(50% - 50px);
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make a Panel focusable in WPF, so that it captures keyboard
i'm using AJAX to make a user control which contains a panel that contains
I have a panel with a form that has a drop down list with
I need to make a series (1-20) ajax calls and I need to have
I need to make the top header of a report disappear. The part that
Windows 7 has added on its Control Panel, Appearance and Personalization, Display setting, an
I have a Update Panel and other controls in my ASPX page. After user
I need to make some controls static, for example: private static System.Windows.Forms.TextBox infoBox; infoBox
I have a custom control based on a Panel . It's merely a simple
I have a situation where i need to create a left panel. My manager

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.