Visible background between div elements

There seems to be a background color visible between the image divs. I initially suspected it could be related to margins. Even after attempting to set the div to absolute positioning and the parent to relative, the problem persists. The picture still fails to display without being relative. (Image robot2.jpg in divs sec and sectThree).

Check out the website here: thomasogbourne.me

html,
body {
  margin: 0px;
  height: 100%;
  margin-top: 0px;
  margin-right: 0px;
  margin-left: 0px;
  background-color: #000000;
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
  margin-bottom: 20px;
}

/* Styles for various sections and elements */

<body>
  <!-- Navigation bar -->
  <nav class="container borderXwidth">
    <a id="home" href="#homeSection">HOME</a>
    <a id="about" href="#aboutSection">ABOUT</a>
    <a id="gear" href="#gearSection">MY GEAR</a>
    <a id="portfolio" href="#portfolioSection">PORTFOLIO</a>
    <a id="contact" href="#contactSection">CONTACT</a>
  </nav>

  <!-- Sections with corresponding content -->
  <div id="homeSection" class="sect sectOne">
    <div id="bigname">
      <h1>THOMAS OGBOURNE</h1>
      <a href="#aboutSection">
        <button class="button button2 hvr-icon-hang hvr-fade">Begin</button>
      </a>
    </div>
  </div>

  <div id="aboutSection" class="subSection">
    <div class='content'>
      <div class='visible'>
        <p>Hello I'm Tom:</p>
        <ul>
          <li>Web Developer</li>
          <li>Gamer</li>
          <li>Student</li>
          <li>Computer Guy</li>
        </ul>
      </div>
    </div>
  </div>

  <div id="serviceSection" class="sect sectTwo"></div>
  <div id="gearSection" class="subSection2"></div>
  <div id="portfolioSection" class="sect sectThree"></div>
  <div id="contactSection" class="smallsubSection">
    <h2 style="margin-top:0;">Email: *******************</h2>
    <h2>Phone: **************</h2>
  </div>

  <script src="js/jquery-3.1.1.min.js"></script>
  <script src="js/app.js"></script>
</body>

Answer №1

Is this what you were looking for? :

https://codepen.io/s8cyj5dp/

Essentially, your code appears to be disorganized and disorderly. There are elements like this present:

<a href="#aboutSection"> <button class="button button2 hvr-icon-hang hvr-fade">Start</button></a>
            </div>
        </div>`




        <div id="aboutSection" class="subSection">
            <div class='content'>

Did you notice that ` symbol? It caused a separation between the divs.

Furthermore, the second division is

top:-90px;

This property was added to several sections towards the bottom.

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

What could be the reason for ThemeProvider (Material UI) failing to function properly in this scenario?

I've encountered something puzzling with Material UI. Despite my experience with it, I can't seem to figure out why my H2 tag in the nested component is rendering in Times instead of Arial. I've double-checked the docs and my code, but the i ...

When you reach a scrolling distance of over 300 vertical heights,

Is it possible to show and hide a class based on viewport height? I am familiar with displaying and hiding a class after a specified pixel height, but I'm wondering if it's achievable using viewport height instead? Specifically 3 times the viewp ...

Delete the current row in the table before adding a new one with jquery

Having a HTML table and performing updates using Ajax. Everything is functioning properly so far. When clicking on the Edit button, the values are displayed in the textboxes correctly. However, when clicking on the Add button, the table is updated accordin ...

Exploring CSS3 for Creating Stylish Navigation Bars

Currently, I am attempting to design a Navigation bar that resembles the style shown in this image, complete with a drop-down menu feature. Here is how I have structured my menu: <nav> <ul> <li> <a href="/i ...

Is it possible to monitor the progress of an order placed via my website as a Flipkart affiliate?

As an affiliate for flipkart, I promote their products on my website. I am interested in being able to track the orders and purchases made by users who are redirected to flipkart from my site. Is it possible for us to obtain the order/purchase id for thos ...

Tips for sending the output of a Python function to the webpage associated with the clicked action button in Python's Bottle framework

Here is a method I have: @post('/home', method='post') def myFunction(): if(len(request.forms.get('Matrix_dimension').strip()) != 0): length = int(request.forms.get('Matrix_dimension').strip()) tableRow = ...

What is the best method to retrieve duplicate fields from a database in HTML5?

this.db.transaction(function (tx) { tx.executeSql('SELECT tsk.*, cont.firstName, cont.lastName ,cont1.firstName, cont1.lastName, list.listId FROM tbl_tasks tsk, tbl_contacts cont,tbl_contactequests cont1, tbl_lists list WHE ...

What steps can I take to modify my webpage, like a dashboard, on the internet?

Whenever I click on a menu item in the sidebar of my HTML file, I want only the body section to change without affecting the navigation or sidebar content. For instance, if I select the "Coding Convention" menu in the sidebar, I would like the page to swi ...

Step by step guide to creating individual counter sections

I have set up a counter section where the numbers go from 0 to a specific value. However, currently all three counters start counting simultaneously. Is there a way for the first counter to count up first, then once it's done, move on to the second c ...

What are some ways to slow down the speed of a canvas animation?

I am currently working on an animation project using JavaScript and canvas. I have a reference fiddle where objects are generated randomly and fall from the top right corner to the bottom left corner, which is fine. However, the issue is that the objects a ...

Stopping the animation of scrollLeft upon user interaction can be achieved by utilizing JavaScript

Here is my current code snippet: <script> $(document).ready(function() { $('.scrolls').stop().animate({ scrollLeft : 4000 },100000, 'linear') }) </script> I am looking for a way to halt the animation once ...

Chosen Dropdown selection - Retrieve/Receive information

One of the challenges I'm facing involves a dropdown list on my web form that contains various dates. My main query is: How can I retrieve data for the selected date from a MySQL database and present it to the user? Additionally, if the chosen date do ...

The folder could not be located by MAMP

For years, I've relied on MAMP to manage my web development projects. However, after performing a clean install of my Mac recently, I reinstalled MAMP only to encounter issues with it not functioning properly. Upon reinstalling the program and placin ...

Add a hovering effect to images by applying the absolute positioning property

On my React website, I am utilizing Tailwind CSS and I am attempting to showcase an image that has interactive elements. I want certain parts of the image to increase in size slightly when hovered over. My approach to achieving this was to save each part o ...

Arrangement of elements across rows and columns in a grid pattern

Is it possible to span a column that is equivalent to two columns in the first row and then have one column each for the second row, as shown in the screenshot? (There are two columns in the second row in this case) CSS main section { display: grid; ...

Use jQuery to manipulate HTML elements

I want to dynamically change text in a div using jQuery when clicked. Here is an example: $(document).ready(function() { $("#hideall").click(function() { $("#hideall").html("<p>SHOW</p>"); }); }); The HTML code for this is: <div id="hidea ...

Stopping a function that is currently running on a website using Javascript

I have a script on my website that triggers a rain feature when a user clicks on a button. However, I am struggling to figure out how to allow the user to deactivate this feature. I've tried various methods such as using break, return, and timeouts, b ...

Utilizing grid for styling headings and paragraphs with h3, h4, and p tags

Looking for help with aligning posts in columns? Here's the code and display challenge: <div class="post-inner"> <h3 class="post-header"><a class="post-title" href="http://www.yellowfishjobs.com/job/sales-representative/">Sales Repr ...

HTML5 allows users to choose data from a list using a ComboBox and submit the 3-digit code

I'm looking to enhance my form by including an input box where users can select airports, similar to the functionality on this website (). When typing in the Destination Input, I want users to see a list of possible values with detailed suggestions su ...

Leveraging tailwind for achieving dynamic height responsiveness

My Tailwind-built page currently has a table in the bottom left corner that is overflowing, and I would like it to adjust its size to fit the available space and scroll from there. I want it to fit snugly in the bottom left corner of the browser viewport ...