Inject some vibrancy by incorporating color in the space between the navbar and banner on the

Hello! I am relatively new to front-end development and I am currently working on converting a PSD design to code for a project. I am struggling a bit to understand certain concepts but I am eager to learn and improve. I am using Bootstrap 4 for this project. I have noticed that there is a white space between the banner and the navigation bar, and some green elements below the banner. I am aware that there are mistakes in my code and I have referred to a sample theme for help. Could you please assist me with this project?

<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
  <div class="navbar-header">
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <a class="navbar-brand" href="#"><img src="img/logo.png" style="max-width: 170px; margin-top: -7px;"></a>
  </div>
  <div class="collapse navbar-collapse" id="myNavbar">
    <ul class="nav navbar-nav navbar-right">
      <li><a href="#feature">Features</a></li>
      <li><a href="#organisations">Organisations</a></li>
      <li><a href="#courses">Courses</a></li>
      <li><a href="#pricing">Pricing</a></li>
      <li><a href="#" data-target="#login" data-toggle="modal">Sign in</a></li>
      <li class="btn-trial"><a href="#footer">Free Trial</a></li>
    </ul>
  </div>
</div>

 <div class="banner">
<div class="bg-color">
  <div class="container">
    <div class="row">
      <div class="banner-text text-center">
        <div class="text-border">
          <h1 class="text-dec">Let's Build Something Incredible</h1>
        </div>
        <div class="intro-para text-center quote">
          <h2 class="big-text">Together We Can Achieve More</h2>
          <div>
            <form class="mc-trial row">
              <div class="form-group col-md-3 col-md-offset-2 col-sm-4">
                <div class="controls">
                  <input name="name" placeholder="Enter Your Name" class="form-control" type="text">
                </div>
              </div>
              <!-- End email input -->
              <div class="form-group col-md-3 col-sm-4">
                <div class="controls">
                  <input name="EMAIL" placeholder="Phone Number" class="form-control" type="number">
                </div>
              </div>
              <!-- End email input -->
              <div class="col-md-2 col-sm-4">
                <p>
                  <button name="submit" type="submit" class="btn btn-block btn-submit">
                  Submit <i class="fa fa-arrow-right"></i></button>
                </p>
              </div>
            </form>
              </div>
            </div>
            </div>
          </div>
        </div>
        <a href="#feature" class="mouse-hover">
          <div class="mouse"></div>
        </a>
      </div>
    </div>
  </div>
</div>

Check out the project here

Answer №1

One can easily insert an aside element between the navigation and banner sections in the HTML markup, and then style it using CSS.

aside {
  background-color: your preference;
}

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

issues with functionality in purecss drop down menu

I have been struggling to create a vertical drop-down menu using the purecss library without success. purecss.io/menus/ This is what my CSS code looks like: <div class="pure-menu custom-restricted-width"> <ul class="pure-menu-list"> ...

Can we expect to receive multiple returns?

I have a piece of code and I am looking to add 2 returns to it. What is the correct way to achieve this in PHP? function two_tables($atts, $content = null) { return '<div id="table1"><table class="table table-bordered">'.$co ...

If the <option> "anyTableName" </option> is chosen, then display the column names of the selected table (PHP, MySQL)

Hey there, I'm a newbie on stackoverflow so feel free to correct me if I'm off base ;) Here's my current dilemma: I have a text.php file that contains 2 <select> elements. The first one allows me to choose a table (like "accounts", "c ...

Is it possible to align a row so that it is centered based on one of the columns in the row?

Calling all experts in CSS and HTML: Let's say I have 3 columns in a row, each with a different size (refer to the image). Now, picture this - I want to center the 2nd column right in the middle of my page. If I simply use justify-content: center to ...

When I expand the accordion next to it, the accordion disappears, and it also vanishes when I close that accordion

After incorporating accordions into my site, I encountered a peculiar issue (as shown in this video): when I open one accordion, the adjacent accordion also opens unexpectedly. Similarly, closing one accordion causes its neighboring accordion to mysterious ...

Styling with CSS to ensure divs are displayed in two rows

Check out this example I found: https://jsfiddle.net/n3qs0wke/ .wrapper { max-width: 600px; border: 1px solid #333; } .big-div { min-width: 212px; min-height: 212px; max-width: 212px; max-height: 212px; display: inline-flex; ...

Unable to interact with a button element of type="button" using Selenium, but successful with elements of type

In my attempt to interact with the webpage, I am specifically focusing on this button: <button class="button-text-like marg-l-0 float-l desktop-only remove-button" data-bind="click: $root.removeCartItem" type="button"> <i class="gicon-cross">& ...

Using Angular 2 to toggle the visibility of a component when hovering over and moving away from it

I have developed a custom filtering component in Angular 2, which I have integrated into the table header. My goal is to show the filter when the mouse hovers over a specific span, and hide it when the mouse moves away. <th> <span class="headCol ...

Changing CSS attributes with jQuery when conditions are met

After creating menus with expandable items that change style upon clicking, I encountered an issue where the styling changes were not being applied correctly. To address this problem, I followed Sushanth's suggestion and replaced $this with $(this), ...

Tips on ensuring that PRE elements expand to fit column size without growing when additional data is added

I am facing a design challenge where I have a main card (1) that contains two sub-cards (2 and 3) using Bootstrap columns. Sub-card number 2 adjusts its height dynamically based on the screen size, while sub-card number 3 consists of a code snippet element ...

Deciding the source URLs for external iframes

Is it possible to detect the URL displayed in an iframe? How can we ensure that links within an iframe open in a new tab/window? Moreover, is there a way to achieve this even with the same-origin policy for external frames? If not, what causes this violat ...

Display the remainder of an image's height within a div container

Here is the code snippet I am working with: HTML: <div id="mapWrapper" style="height: 624px;"> <div class="box" id="map"> <h1>Campus</h1> <p>Description Campus Map.</p> <img src="abc.png" ...

"Optimizing meta tags and adjusting text size for better

I recently made some changes to my website by adding a meta tag in order to make it responsive. <meta name="viewport" content="width=1400"> After testing it on an iPad, everything looked great - the text and graphics scaled properly. However, when ...

establishing the dimensions of table data cells

I'm facing a challenge with setting the width and height for table data that changes dynamically based on different values. The dimensions of the table itself are not definite, so I need to find a solution. Here's the code snippet I'm curren ...

Sending an email using Angular is a straightforward process that involves utilizing the built

I need help figuring out how to code a function in Angular or TypeScript that will open Gmail when a specific email address is clicked. I've tried different methods but haven't been successful so far. ...

Moving from the center to the bottom-right with a CSS transition

I have a specific requirement where I need the container to cover the entire page and shrink when clicked, with an animation. Currently, I am using CSS transition to animate the container shrinking towards the top: The container shrinks slowly to the sp ...

Bootstrap navbar and its underlying area

I am struggling to effectively implement a navbar on my website. I currently have the following code snippet in the body section of my base.html file. (Should the navbar be placed in the head section instead?) <body> <div class="row" ...

Tips for wrapping the content of a <span> element within a <td> element

Can someone help me figure out how to wrap the content of a <span> tag that is inside a <td>? The style I have applied doesn't seem to be working. Here's the code snippet: <td style="white-space:nowrap;border:1px solid black"> ...

Placing a group of input fields and a button based on the data-id attribute of the element

I have a form that appears when a button is clicked, and the save button saves input values into an object. Is there a more efficient way to write this function if I need to create 9 more buttons with different data-id attributes (e.g. data-id="2" and so ...

Tips for ensuring your background image is fully displayed and covers the entire size

My dilemma lies within the header div. My intention is to have it fully covered with a background image without any cropping. However, the current setup seems to be stretching and cutting off parts of the image. Here is my CSS code: .header { bor ...