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 7912563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:38:35+00:00 2026-06-03T13:38:35+00:00

Why are there gaps in this website I’m working on ? I’ve tried setting

  • 0

Why are there gaps in this website I’m working on? I’ve tried setting margins, padding etc. to 0px but nothing seems to affect it.

Edit – apologies; I screwed up the link to the website. This is now fixed.

image highlighting gaps between divs

  • 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-03T13:38:36+00:00Added an answer on June 3, 2026 at 1:38 pm

    You may have inserted some styles you have forgotten about. Judging from the pic I would assume your html would look something like this like this

    <ul id="nav">
        <li><a href="#">Home</a></li>
        <li><a href="#">Blog</a></li>
        <li><a href="#">Gallery</a></li>
    </ul>
    
    <div id="something">
    </div>
    

    your nav links or list items look as if they have a margin of 5px, and your div looks like it has top and bottom margin of 20px. Try to add this to your elements your are trying to fix to troubleshoot.

    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important; 
    

    This should override any css styles preceding that may be conflicting. If it doesn’t work then we need to see code to help troubleshoot further.

    [UPDATE]
    You should declare a DOCTYPE instead of simply putting html tags. center tags are deprecated.

    To fix your spacing try this:

    #nav ul{
        list-style-type:none;
        margin:0;
        padding:0;    
        /* REMOVE
        padding-top:6px;
        padding-bottom:6px;  
        */
    }  
    /***********************************
    -- ADD
    ***********************************/
    hr {
        margin: 0;
    }
    h2 {
        margin: 0;
    }
    

    You changed the padding and margin to 0 but added it again in your ul. The hr tag was causing some of your spacing, and the heading tag was causing the rest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There seems to be a similar question to this on here but with the
This seems more of a SuperUser thing but I didn't see any Report Builder
Working with a website (as opposed to a web application) in VS2010 so there
Problem There are data gaps that need to be filled. Would like to avoid
There seems to be too many attributes/parameters in CSS... I want to know all
There is nothing like the 43rd day of your life spent tracking down issues
There's 'Why are there gaps between image rows in tables when the layout engine
I'm completely self-taught, so there are obvious gaps in my knowledge. When I needed
Similar to This Question using linq to SQL , but I don't want to
Is there any other better way to perform this operation? -- USE EXAMPLE: EXEC

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.