What methods can be used to strategically incorporate gray into both the left and right sides of a page design?

I'm currently working on an asp.net MVC layout page and I'm trying to create a layout where the left side and right side are gray.

However, I'm not sure how to achieve this using HTML, CSS, or Bootstrap.

I specifically need to know how to designate the left and right sides as gray areas.

Here is an example of the layout I am aiming for:

The layout page should look like this:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Resignation Submission Form</title>
    <style>
        .container {
            width: 80%;
            margin-top: -50px;
            margin-left: 130px;
            padding-left: 130px;
        }

        .header {
            width: 100%;
            display: flex;
        }

        .header-Title {
            flex: 1;
            font-family: Arial;
        }

        .header-CompanyLogo {
            width: 150mm;
            display: flex;
        }
        
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="header-Title">
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:30px;">Employee Self Service</b>
                <br /><br />
                <b style="font-size:12px;"><u></u></b>
            </div>
        </div>
    </div>
    <hr/>
  
    <div class="container body-content">
        <footer>
            <p>Resignation Submission Form Application</p>
        </footer>
    </div>
</body>
</html>

https://i.sstatic.net/Yjloi.png

Updated post

I just need to adjust the script above to have the left and right sides gray, excluding the middle section. Can anyone help me with this?

Could someone provide a fiddle or a sample to demonstrate this, please?

Answer №1

I made some changes to the CSS in the code, resulting in a layout where the left and right sides of the page are shaded in gray, while the central content area remains white:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@ViewBag.Title - Resignation Submission Form</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            background-color: #b5b7bb; /* Setting the overall page background color */
        }

        .container {
            max-width: 80%; /* Limiting the content area width */
            margin: 0 auto; /* Centering the content area horizontally */
            background-color: #fff; /* Making the container background gray */
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Adding a subtle shadow effect */
        }

        .header {
            text-align: center;
            padding: 20px;
        }

        .header-Title {
            font-family: Arial;
        }

        .body-content {
            padding: 20px;
        }

        footer {
            text-align: center;
            padding: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="header-Title">
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:11px;"></b>
                <br />
                <b style="font-size:30px;">Employee Self Service</b>
                <br /><br />
                <b style="font-size:12px;"><u></u></b>
            </div>
        </div>
        <hr />
        <div class="container body-content">
            <!-- Your content goes here -->
        </div>
        <footer>
            <p>Resignation Submission Form Application</p>
        </footer>
    </div>
</body>
</html>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

CombineReducers takes all the reducer content and unpacks it into a single reducer

As I work on developing a small application, I am contemplating the best strategy for organizing reducers within it. My objective is to retrieve JSON data from the application state and structure it as shown below: { "fruits": [ {"appl ...

Enhance LCP Performance in Next.js for Faster Loading Speeds

I'm currently working on a next.js project (version 11.1.2) and my goal is to improve the page speed performance. To track this, I am using Google PageSpeed Insight for evaluation. Presently, the scores stand at: 40-50 for mobile (!!) 80-90 for deskt ...

The Angular performance may be impacted by the constant recalculation of ngStyle when clicking on various input fields

I am facing a frustrating performance issue. Within my component, I have implemented ngStyle and I would rather not rewrite it. However, every time I interact with random input fields on the same page (even from another component), the ngStyle recalculate ...

Unable to locate the module '/workspace/mySQL/node_modules/faker/index.js'

Hi there, I'm currently facing an issue while trying to run the app.js file in my project through the terminal. It keeps showing me an error message that I am unable to resolve. To provide some context, I have already installed the faker package using ...

Unable to load the header file as required

As I work on developing my website, I have implemented PHP to include a standard header page across all subsequent pages. The header is basic, containing the navigation bar, logo, and other elements. While the require("header.php") function works for most ...

Creating adaptable breakpoints for content using Bootstrap or pure CSS

I'm trying to create a responsive layout using the Bootstrap "row" and "col" classes, but I'm having trouble figuring out how to structure the content. Here's what I mean: https://i.sstatic.net/WkMmE.png This is my current HTML structure: ...

Display the list items within a div only if the height is lower than a separate div

I have a scenario where I have two divs named left and right. The left div contains a list of bullets (li elements) and is floated to the left, while the right div has text and HTML content. At times, either the left or the right div may be taller than the ...

"Opt for a horizontal WordPress drop-down menu instead of the typical vertical layout

I am looking to customize a menu in WordPress by creating a horizontal drop-down menu instead of the default vertical layout. An example of what I am aiming for can be seen on this website. If you hover over OUR SECTORS, you will see the type of menu I am ...

Can we incorporate the radix-ui/colors variables into a CSS module file?

For my personal project, I am incorporating Radix components alongside radix-ui/colors. However, when attempting to import color variables into the CSS Module, I encountered an error. It seems that using the :root selector in the _app file is necessary, as ...

Thumbnail vanishes upon being selected

To access my template site currently, please click here. Currently, the first thumbnail on my website is set up to display a gallery of images in FancyBox once clicked, similar to a question asked on StackOverflow that you can view here. Below is a snipp ...

Retrieve HTML classes within JavaScript textual templates

<!-- TEMPLATE UPLOAD --> <script id="template-upload" type="text/x-tmpl"> {% for (var i=0, file; file=o.files[i]; i++) { %} <tr class="template-upload fade"> <td class="name"><span>{%=file.name%}</span></td> <td ...

The issue arises when the export function is triggered within the getStaticPaths() method, preventing the top-level

For my Next.js SSG (static site generation) app, I decided to optimize the database connection process by exporting a global promise from one file and then utilizing it in another file called controllers.js. This file houses multiple functions that directl ...

Vue displays error logs within Karma, however, the test failure is not being reflected in the Karma results

Currently, I am in the process of writing unit tests for Vue components within our new project. For testing, I am utilizing Karma with Mocha + Chai, and PhantomJS as the browser. The test command being used is cross-env BABEL_ENV=test karma start client/ ...

Attempting to apply the 'Tw Cen MT Condensed Extra Bold' typeface using CSS styling

I'm having trouble getting the 'Tw Cen MT Condensed Extra Bold' font to work in my website header. Even when I try to style it with bold, it just doesn't look right. I created the banner in Photoshop and now I want to recreate the text ...

AngularJs Http Status Code Generator工場

I am diving into the world of AngularJs and have developed a basic factory using $http get to fetch a .json file containing various HTTP status code numbers as keys, paired with their respective messages. However, I keep encountering the following error: ...

Conceal varying numbers of rows in a table using Jquery based on specific

I am attempting to hide certain table rows, but I am encountering an issue. Currently, when I click on a row with the class 'plevel1', it hides the following row with the class 'plevel2'. However, when I click on the top parent level ro ...

Error: Unable to locate requested resource

I have a scenario in Struts2 where I am utilizing an AJAX code snippet in the Script Section. var url="../scriptWay/myCallToBackEnd.ac?myToy="+myToyInfo; var respObj = ""; new Ajax.Request(url,{ ...

What is the best way to defer the instantiation of a particular controller (not a route) in your

What I'm looking for is a directive that functions like a typical ng-controller, but I need it to be invoked only after a promise has been resolved. To achieve this in HTML, it could be implemented as such: <div ng-controller="myCtrl" ctrl-promise ...

Refreshing the PHP variable without needing to refresh the page

Recently, I've delved into the world of JSON and PHP programming. I am currently working on a web page that displays data from a file called file.py. This data is intended to be visualized on a gauge that updates every second. var gauge1; var x = ...

What is the approach taken by NextJS for ensuring the security of pages when attempting to access them directly in the browser

What happens in NextJS when an unauthorized user tries to access secure pages directly in the browser? Currently, I am attempting to view the /dashboard (which is a secure page). The dashboard DOM elements are displaying. Please refer to the screenshot be ...