Padding-top showing when height on div is set to 0%












0














I have a nav that is positioned at the bottom with the following CSS:



#myFirstNav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
justify-content: space-around;
padding: 10px;
background-color: black;
}


I then have an overlay menu that pops up, when you click on one on the links in #myFirstNav. It has the following CSS:



.overlay {
height: 0;
right: 0;
position: fixed;
z-index: 1;
left: 0;
bottom: 0;
overflow-x: hidden;
background-color: white;
transition: 0.5s;
border: 2px solid rgb(204, 204, 204);
border-bottom: 0;
}


What troubles me is that the 2px border on the .overlay is showing up on the #myFirstNav background. Is there anyway to shift the .overlay div 2px down, so that the border doesn't show up on the #myFirstNav background?



The padding showing at the bottom










share|improve this question
























  • This is a bit difficult to visualize. Is it possible to include a screenshot, or create a working snippet that reproduces the issue?
    – Alexander Nied
    Nov 20 at 19:26










  • @AlexanderNied Added a picture where the border is showing at the bottom. It is the gray line.
    – user3403590
    Nov 20 at 19:35






  • 1




    Giving bottom: -2px; to overlay and height:100%; wont solve your problem? If you provide a fiddle i can help you more. Regards
    – Colin Cline
    Nov 20 at 19:48






  • 1




    There are a number of things that could potentially be causing this, but there is no way to tell for sure without you also sharing the markup on your page as well.
    – brianespinosa
    Nov 20 at 19:51










  • @ColinCline I tried that early today, and it gave me some really weird result. But now it works, sometimes the hard things has the simplest answers :)
    – user3403590
    Nov 20 at 19:58
















0














I have a nav that is positioned at the bottom with the following CSS:



#myFirstNav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
justify-content: space-around;
padding: 10px;
background-color: black;
}


I then have an overlay menu that pops up, when you click on one on the links in #myFirstNav. It has the following CSS:



.overlay {
height: 0;
right: 0;
position: fixed;
z-index: 1;
left: 0;
bottom: 0;
overflow-x: hidden;
background-color: white;
transition: 0.5s;
border: 2px solid rgb(204, 204, 204);
border-bottom: 0;
}


What troubles me is that the 2px border on the .overlay is showing up on the #myFirstNav background. Is there anyway to shift the .overlay div 2px down, so that the border doesn't show up on the #myFirstNav background?



The padding showing at the bottom










share|improve this question
























  • This is a bit difficult to visualize. Is it possible to include a screenshot, or create a working snippet that reproduces the issue?
    – Alexander Nied
    Nov 20 at 19:26










  • @AlexanderNied Added a picture where the border is showing at the bottom. It is the gray line.
    – user3403590
    Nov 20 at 19:35






  • 1




    Giving bottom: -2px; to overlay and height:100%; wont solve your problem? If you provide a fiddle i can help you more. Regards
    – Colin Cline
    Nov 20 at 19:48






  • 1




    There are a number of things that could potentially be causing this, but there is no way to tell for sure without you also sharing the markup on your page as well.
    – brianespinosa
    Nov 20 at 19:51










  • @ColinCline I tried that early today, and it gave me some really weird result. But now it works, sometimes the hard things has the simplest answers :)
    – user3403590
    Nov 20 at 19:58














0












0








0







I have a nav that is positioned at the bottom with the following CSS:



#myFirstNav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
justify-content: space-around;
padding: 10px;
background-color: black;
}


I then have an overlay menu that pops up, when you click on one on the links in #myFirstNav. It has the following CSS:



.overlay {
height: 0;
right: 0;
position: fixed;
z-index: 1;
left: 0;
bottom: 0;
overflow-x: hidden;
background-color: white;
transition: 0.5s;
border: 2px solid rgb(204, 204, 204);
border-bottom: 0;
}


What troubles me is that the 2px border on the .overlay is showing up on the #myFirstNav background. Is there anyway to shift the .overlay div 2px down, so that the border doesn't show up on the #myFirstNav background?



The padding showing at the bottom










share|improve this question















I have a nav that is positioned at the bottom with the following CSS:



#myFirstNav {
display: flex;
position: fixed;
bottom: 0;
left: 0;
right: 0;
justify-content: space-around;
padding: 10px;
background-color: black;
}


I then have an overlay menu that pops up, when you click on one on the links in #myFirstNav. It has the following CSS:



.overlay {
height: 0;
right: 0;
position: fixed;
z-index: 1;
left: 0;
bottom: 0;
overflow-x: hidden;
background-color: white;
transition: 0.5s;
border: 2px solid rgb(204, 204, 204);
border-bottom: 0;
}


What troubles me is that the 2px border on the .overlay is showing up on the #myFirstNav background. Is there anyway to shift the .overlay div 2px down, so that the border doesn't show up on the #myFirstNav background?



The padding showing at the bottom







css css3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 at 19:35

























asked Nov 20 at 19:20









user3403590

599




599












  • This is a bit difficult to visualize. Is it possible to include a screenshot, or create a working snippet that reproduces the issue?
    – Alexander Nied
    Nov 20 at 19:26










  • @AlexanderNied Added a picture where the border is showing at the bottom. It is the gray line.
    – user3403590
    Nov 20 at 19:35






  • 1




    Giving bottom: -2px; to overlay and height:100%; wont solve your problem? If you provide a fiddle i can help you more. Regards
    – Colin Cline
    Nov 20 at 19:48






  • 1




    There are a number of things that could potentially be causing this, but there is no way to tell for sure without you also sharing the markup on your page as well.
    – brianespinosa
    Nov 20 at 19:51










  • @ColinCline I tried that early today, and it gave me some really weird result. But now it works, sometimes the hard things has the simplest answers :)
    – user3403590
    Nov 20 at 19:58


















  • This is a bit difficult to visualize. Is it possible to include a screenshot, or create a working snippet that reproduces the issue?
    – Alexander Nied
    Nov 20 at 19:26










  • @AlexanderNied Added a picture where the border is showing at the bottom. It is the gray line.
    – user3403590
    Nov 20 at 19:35






  • 1




    Giving bottom: -2px; to overlay and height:100%; wont solve your problem? If you provide a fiddle i can help you more. Regards
    – Colin Cline
    Nov 20 at 19:48






  • 1




    There are a number of things that could potentially be causing this, but there is no way to tell for sure without you also sharing the markup on your page as well.
    – brianespinosa
    Nov 20 at 19:51










  • @ColinCline I tried that early today, and it gave me some really weird result. But now it works, sometimes the hard things has the simplest answers :)
    – user3403590
    Nov 20 at 19:58
















This is a bit difficult to visualize. Is it possible to include a screenshot, or create a working snippet that reproduces the issue?
– Alexander Nied
Nov 20 at 19:26




This is a bit difficult to visualize. Is it possible to include a screenshot, or create a working snippet that reproduces the issue?
– Alexander Nied
Nov 20 at 19:26












@AlexanderNied Added a picture where the border is showing at the bottom. It is the gray line.
– user3403590
Nov 20 at 19:35




@AlexanderNied Added a picture where the border is showing at the bottom. It is the gray line.
– user3403590
Nov 20 at 19:35




1




1




Giving bottom: -2px; to overlay and height:100%; wont solve your problem? If you provide a fiddle i can help you more. Regards
– Colin Cline
Nov 20 at 19:48




Giving bottom: -2px; to overlay and height:100%; wont solve your problem? If you provide a fiddle i can help you more. Regards
– Colin Cline
Nov 20 at 19:48




1




1




There are a number of things that could potentially be causing this, but there is no way to tell for sure without you also sharing the markup on your page as well.
– brianespinosa
Nov 20 at 19:51




There are a number of things that could potentially be causing this, but there is no way to tell for sure without you also sharing the markup on your page as well.
– brianespinosa
Nov 20 at 19:51












@ColinCline I tried that early today, and it gave me some really weird result. But now it works, sometimes the hard things has the simplest answers :)
– user3403590
Nov 20 at 19:58




@ColinCline I tried that early today, and it gave me some really weird result. But now it works, sometimes the hard things has the simplest answers :)
– user3403590
Nov 20 at 19:58

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400086%2fpadding-top-showing-when-height-on-div-is-set-to-0%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53400086%2fpadding-top-showing-when-height-on-div-is-set-to-0%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'