There seems to be an infinite amount of padding between the menu bar and content space on the right side

I am having trouble aligning the menu bar and content side spaces. The issue is that the right side of the menu bar and content space doesn't have any side space. I would like to add some space to them similar to the left-hand side. Below, you'll find my CSS and HTML code:

body { 
  
  background-color: #7c8da2; 
  background-image: linear-gradient(#0b3262, #7c8da2);
}

#bannerPx {
  padding: 0;
}

/* Banner Wrapper */
#banner {
  position: relative;
  top: 0;
  /*background-image: linear-gradient(to right, #fff, #C8102E, #C8102E);*/
  display: block;
  /*float: left;*/
  width: 250px;
  height: 40px;
  z-index: 10;
  background-color: #f2fed1;
}

/* Banner Text */
#banner_text {
  position: absolute;
  text-aligh: center;
  padding-left: 5%;
  width: 60%;
  height: 100%;
  top: 45%;
  /*right: 300px;*/
  transform: translate(0, -50%);
  /*padding: 10px;*/
  font: bold 36px Century Gothic;  /* Banner Text Font */
  color: #000000;            /* Banner Text Colour */
  z-index: 11;
}
#banner_text2 {
  position: absolute;
  text-aligh: center;
  padding-left: 65%;
  width: 40%;
  height: 100%;
  top: 45%; 
  transform: translate(0, -50%);
  font: bold 34px Century Gothic;  /* Banner Text Font */
  color: #00c000;            /* Banner Text Colour */
  z-index: 11;
}

#bannerimg {
  height: 100%;
}

#bannerIncludePx {
  height: 100%;
  position: relative;
}

#content {
  overflow: hidden;
  z-index: 9999;
}

#content iframe {
  margin: 35px 0px auto;
  padding: 0;
  width: 1917px;
  height: 870px;
  z-index: 300;
  background-color: #7c8da2;
}

#console {
  height: 150px;
  margin-top: 0px;
  overflow: auto;
}

#console iframe {
  width: 100%;
  z-index: 200;
}

nav {
  margin: 0px 0px auto;
  position: relative;
  z-index: 2;
}

ul li img {
  margin-left: -20px;
  padding-right: 10px;
  vertical-align: middle;
}

#ci_wrapper {
  margin: 0 auto;
  width: 1900px;
}

#menu, #menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#menu {
    margin: 0px auto;
    ...
...
...

Answer №1

Have you achieved the desired outcome?

To create the layout, I first set the body margin to zero and then added padding inside #ci_wrapper.

body { 
  background-color: #7c8da2; 
  background-image: linear-gradient(#0b3262, #7c8da2);
  margin: 0;
}

#bannerPx {
  padding: 0;
}

/* Banner Wrapper */
#banner {
  position: relative;
  top: 0;
  display: block;
  width: 250px;
  height: 40px;
  z-index: 10;
  background-color: #f2fed1;
}

/* More CSS styles... */
<div id="ci_wrapper">
     
     <nav id="menu-wrap">
      <ul id="menu">
        
        <li id="banner">
            <div id="banner_text">TTTT</div>
        </li>
     
   <!-- Menu Items -->    
  </ul>
  </nav>
  
    <div id="content">
      <iframe src="" name="contentFrame" frameborder="0"/>
    </div>
    
    </div>

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

Step-by-step guide for dynamically including dropdown options

Is there a way to dynamically add a dropdown using JavaScript? I currently have a dropdown with numbers that creates another dropdown when selected. However, I want to add the dynamic dropdown through JavaScript. How can I achieve this? Below is the PHP ...

Tips for safeguarding registration forms against spamming

The ASP.NET/Mono MVC2 E-shop includes a registration form that requests mandatory customer name, address, phone password (entered twice) and some optional fields. Should we add spam protection to the form? The current setup verifies that the password and ...

sidebar that appears upon the initial page load

I'm currently working on implementing a sidebar navigation panel for my website using JavaScript, HTML, and CSS. However, I am facing an issue where the sidebar automatically opens when the page is first loaded, even before clicking on the icon to ope ...

Creating a navigation bar with an active tab feature using Nuxt.js and Vue

Currently, I am working on a side navbar and attempting to activate it based on the page click. The sidenav.nav is a component that I am using for this purpose. <template> <aside class="col-md-3"> <nav class="list-group ...

Retrieve the data from the database using PHP and showcase it within the HTML code

Having an issue with my system, I tried following a tutorial on YouTube and made some modifications to the code. Here is what I have: <label>Department</label> <select> <?php include 'php/connect.php'; ...

Set a CSS rule to style every other row in a table, starting from the second row and resetting after

Is there a way to refresh the even and odd count in CSS whenever a specific row is shown? Here's an example setup: header header header even even even odd odd odd Subhead Subhead Subhead even even even How can I ensu ...

knockoutjs - revolutionizing the quiz-making experience

This is the knockoutjs file: $(function () { $('#info').hide(); QuizViewModel(); ko.applyBindings(new QuizViewModel()); $('#restart').click(function () { location.reload(); }); }); function Qu ...

Seems like the ng-show events inside are not being triggered, almost like an invisible image

I am encountering an issue where no JavaScript events are triggering inside an ng-show div in my code. You can access my code through the following link on Plnkr: http://plnkr.co/edit/kGqk8x?p=preview Upon loading data from JSON, I set ng-show to true. Ho ...

Exploring the contrast between a hidden element and an element positioned outside the viewport through Selenium testing

When a selenium element is disabled by the ng-show attribute being false, it will have the values Displayed=false and Enabled=true. However, if a selenium element is enabled with the ng-show attribute set to true but is out of the viewport, it will also ha ...

Nested Bootstrap structure with a column containing two sub-columns

I am attempting to create a grid layout using bootstrap. The layout should consist of a full 12 column layout on desktop, with an 8 column grid and a 4 column grid within it. The 8 column grid will contain an image/text, while the 4 column grid will have t ...

Moving a div on key press can be accomplished using a combination of HTML, CSS

I am currently working on an HTML game where the player can navigate around the webpage. However, I am encountering issues with getting the movement functionality to work. My goal is to have the player move when certain keys are pressed. While I was able t ...

werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The server is unable to process the request sent by the browser or proxy. This error occurred in a Flask web application

Can someone guide me on troubleshooting this issue in Flask? I am still learning. Server running at (Press CTRL+C to exit) 127.0.0.1 - - [26/Jul/2020 11:19:45] "GET /predict HTTP/1.1" 500 - Traceback (most recent call last): raise exceptions. ...

a guide on verifying the presence of a tag with a specific title attribute in HTML using PHP by Ganon

I have a code snippet here in which the variable raw contains an HTML string with multiple "a href" tags, each with different title attributes. My goal is to check if this string contains a hyperlink tag with the title "x". How can I achieve this using G ...

javascript issue with setting the id attribute on a select option

I can't seem to set the id attribute in my select element using JavaScript. When I inspect it, the id attribute isn't showing up... Here's the first method using JS: var selectorElem = document.getElementById('selector') var ...

issues with verifying form data in a popup window using jquery

Hello, I'm struggling to understand why this form isn't validating upon submission. I've chosen not to use jQuery's built-in validate function in this case. Essentially, the code is designed to show an error image and prevent form submi ...

What is a reliable method to retrieve the text from the current LI if all LI elements in the list share the

I'm encountering an issue with retrieving the text from LI elements because I have 10 list items and they all have the same class name. When I attempt to fetch the text using the class name or id, I only get the text of the last item. Here is my code ...

Bug with the button and text input feature in Firefox

I am facing a strange issue where the button and input have the same CSS (except for the background), but Firefox is displaying them differently. This problem does not occur in IE or Chrome. #searchInput { width: 80%; margin: 0 auto; display: ...

Steps for displaying an HTML table in Excel by clicking on a button

My goal is to open an HTML table in XLS format with a single click of a button. Currently, I have a JavaScript function that allows me to export the HTML table to XLS using the "save as" option. However, I want to enhance this functionality so that clickin ...

Generate a jQuery iframe once more by requesting it

How can I use jQuery to create an iframe tag and set it as the only content of a specific div? If the target div already has content, I want to replace it with a dynamically created iframe tag. This is what I have attempted so far: $(".someClass").click ...

How can I assign a class to my Typography component in Material UI?

When using my material-ui component, I wanted to add an ellipsis to my Typography element when it overflows. To achieve this, I defined the following styles: const customStyles = (theme) => ({ root: { textAlign: "left", margin: theme.spacing( ...