Padding-top showing when height on div is set to 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?
css css3
|
show 1 more comment
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?
css css3
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
Givingbottom: -2px;
to overlay andheight: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
|
show 1 more comment
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?
css css3
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?
css css3
css css3
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
Givingbottom: -2px;
to overlay andheight: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
|
show 1 more comment
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
Givingbottom: -2px;
to overlay andheight: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
|
show 1 more comment
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 andheight: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