How to fix these issues in CSS in navigation menu?












-2















Please help me to fix these issues in CSS (without JS). I am studying and can't find answers to some problems with navigation. Please don't blame me :)



I created navigation and first screen for the site but stumbled with these questions. Here is a screenshot with all things: https://prnt.sc/ln3ytx and my pen on Codepen: https://codepen.io/a007mr/pen/mQKyYM




  1. How to make background hover for all line?
    My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6;
    but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm


  2. When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?


  3. How to make navigation button in the corner for any desktop size? I am using
    margin: 15px;
    but it doesn't work well when I will make more screen resolution. It is not responsive. The button will not be in the right corner if I choose the larger desktop.


  4. The same issue with all navigation. How to make a position for navigation
    in one place for any desktop size?


  5. How to open dropdown through click (not hover) and hide drop-down menu only through click? My code li:hover > ul. If I change on li:active > ul then drop-down menu appears only when I hold the button. How to make like *click button -> we show drop-down menu and can choose something -> *other click on "Learn more" and menu is hidden.


  6. How to make margin for below the main button? :)
    I wrote margin-top: 20px; but it doesn't work.


  7. How to make the background of all navigation without margin?



What's wrong? How can I fix it? Please, help.










share|improve this question


















  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a SINGLE specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Nov 26 '18 at 12:43











  • Please read Something on my web site doesn't work. Can I just paste a link to it?. Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a Minimal, Complete, and Verifiable example and put it in the question itself instead.

    – Quentin
    Nov 26 '18 at 12:55
















-2















Please help me to fix these issues in CSS (without JS). I am studying and can't find answers to some problems with navigation. Please don't blame me :)



I created navigation and first screen for the site but stumbled with these questions. Here is a screenshot with all things: https://prnt.sc/ln3ytx and my pen on Codepen: https://codepen.io/a007mr/pen/mQKyYM




  1. How to make background hover for all line?
    My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6;
    but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm


  2. When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?


  3. How to make navigation button in the corner for any desktop size? I am using
    margin: 15px;
    but it doesn't work well when I will make more screen resolution. It is not responsive. The button will not be in the right corner if I choose the larger desktop.


  4. The same issue with all navigation. How to make a position for navigation
    in one place for any desktop size?


  5. How to open dropdown through click (not hover) and hide drop-down menu only through click? My code li:hover > ul. If I change on li:active > ul then drop-down menu appears only when I hold the button. How to make like *click button -> we show drop-down menu and can choose something -> *other click on "Learn more" and menu is hidden.


  6. How to make margin for below the main button? :)
    I wrote margin-top: 20px; but it doesn't work.


  7. How to make the background of all navigation without margin?



What's wrong? How can I fix it? Please, help.










share|improve this question


















  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a SINGLE specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Nov 26 '18 at 12:43











  • Please read Something on my web site doesn't work. Can I just paste a link to it?. Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a Minimal, Complete, and Verifiable example and put it in the question itself instead.

    – Quentin
    Nov 26 '18 at 12:55














-2












-2








-2








Please help me to fix these issues in CSS (without JS). I am studying and can't find answers to some problems with navigation. Please don't blame me :)



I created navigation and first screen for the site but stumbled with these questions. Here is a screenshot with all things: https://prnt.sc/ln3ytx and my pen on Codepen: https://codepen.io/a007mr/pen/mQKyYM




  1. How to make background hover for all line?
    My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6;
    but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm


  2. When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?


  3. How to make navigation button in the corner for any desktop size? I am using
    margin: 15px;
    but it doesn't work well when I will make more screen resolution. It is not responsive. The button will not be in the right corner if I choose the larger desktop.


  4. The same issue with all navigation. How to make a position for navigation
    in one place for any desktop size?


  5. How to open dropdown through click (not hover) and hide drop-down menu only through click? My code li:hover > ul. If I change on li:active > ul then drop-down menu appears only when I hold the button. How to make like *click button -> we show drop-down menu and can choose something -> *other click on "Learn more" and menu is hidden.


  6. How to make margin for below the main button? :)
    I wrote margin-top: 20px; but it doesn't work.


  7. How to make the background of all navigation without margin?



What's wrong? How can I fix it? Please, help.










share|improve this question














Please help me to fix these issues in CSS (without JS). I am studying and can't find answers to some problems with navigation. Please don't blame me :)



I created navigation and first screen for the site but stumbled with these questions. Here is a screenshot with all things: https://prnt.sc/ln3ytx and my pen on Codepen: https://codepen.io/a007mr/pen/mQKyYM




  1. How to make background hover for all line?
    My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6;
    but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm


  2. When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?


  3. How to make navigation button in the corner for any desktop size? I am using
    margin: 15px;
    but it doesn't work well when I will make more screen resolution. It is not responsive. The button will not be in the right corner if I choose the larger desktop.


  4. The same issue with all navigation. How to make a position for navigation
    in one place for any desktop size?


  5. How to open dropdown through click (not hover) and hide drop-down menu only through click? My code li:hover > ul. If I change on li:active > ul then drop-down menu appears only when I hold the button. How to make like *click button -> we show drop-down menu and can choose something -> *other click on "Learn more" and menu is hidden.


  6. How to make margin for below the main button? :)
    I wrote margin-top: 20px; but it doesn't work.


  7. How to make the background of all navigation without margin?



What's wrong? How can I fix it? Please, help.







html css navigation sites






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 26 '18 at 12:16









GammiGammi

62




62








  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a SINGLE specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Nov 26 '18 at 12:43











  • Please read Something on my web site doesn't work. Can I just paste a link to it?. Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a Minimal, Complete, and Verifiable example and put it in the question itself instead.

    – Quentin
    Nov 26 '18 at 12:55














  • 1





    Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a SINGLE specific, answerable, programming issue, please provide full details.

    – Paulie_D
    Nov 26 '18 at 12:43











  • Please read Something on my web site doesn't work. Can I just paste a link to it?. Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a Minimal, Complete, and Verifiable example and put it in the question itself instead.

    – Quentin
    Nov 26 '18 at 12:55








1




1





Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a SINGLE specific, answerable, programming issue, please provide full details.

– Paulie_D
Nov 26 '18 at 12:43





Welcome to Stack Overflow! This question is either too broad, opinion based or requires discussion and so is off-topic for Stack Overflow. If you have a SINGLE specific, answerable, programming issue, please provide full details.

– Paulie_D
Nov 26 '18 at 12:43













Please read Something on my web site doesn't work. Can I just paste a link to it?. Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a Minimal, Complete, and Verifiable example and put it in the question itself instead.

– Quentin
Nov 26 '18 at 12:55





Please read Something on my web site doesn't work. Can I just paste a link to it?. Questions that depend on external resources to be understood become useless when the external resource goes away or is fixed. Create a Minimal, Complete, and Verifiable example and put it in the question itself instead.

– Quentin
Nov 26 '18 at 12:55












1 Answer
1






active

oldest

votes


















-1














I will be try give you some reply:




How to make background hover for all line? My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6; but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm




1) Try uses block elements. Remember that css property 
display: block; makes your element a block element.



When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?




2) Your items in the list must be made as blocks and it item (li>a) need to be 
increased.


Common example:
https://codepen.io/bear-wolf/pen/YRvoWO?editors=1100#0






share|improve this answer
























  • Thank you so much!

    – Gammi
    Nov 26 '18 at 18:46











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%2f53480950%2fhow-to-fix-these-issues-in-css-in-navigation-menu%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









-1














I will be try give you some reply:




How to make background hover for all line? My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6; but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm




1) Try uses block elements. Remember that css property 
display: block; makes your element a block element.



When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?




2) Your items in the list must be made as blocks and it item (li>a) need to be 
increased.


Common example:
https://codepen.io/bear-wolf/pen/YRvoWO?editors=1100#0






share|improve this answer
























  • Thank you so much!

    – Gammi
    Nov 26 '18 at 18:46
















-1














I will be try give you some reply:




How to make background hover for all line? My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6; but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm




1) Try uses block elements. Remember that css property 
display: block; makes your element a block element.



When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?




2) Your items in the list must be made as blocks and it item (li>a) need to be 
increased.


Common example:
https://codepen.io/bear-wolf/pen/YRvoWO?editors=1100#0






share|improve this answer
























  • Thank you so much!

    – Gammi
    Nov 26 '18 at 18:46














-1












-1








-1







I will be try give you some reply:




How to make background hover for all line? My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6; but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm




1) Try uses block elements. Remember that css property 
display: block; makes your element a block element.



When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?




2) Your items in the list must be made as blocks and it item (li>a) need to be 
increased.


Common example:
https://codepen.io/bear-wolf/pen/YRvoWO?editors=1100#0






share|improve this answer













I will be try give you some reply:




How to make background hover for all line? My code is .menu-item ul a:hover {color: #000000; background: #d2d4d6; but it doesn't work as well. How to make it like this: https://prnt.sc/ln3mvm




1) Try uses block elements. Remember that css property 
display: block; makes your element a block element.



When I open the drop-down menu, part of navigation is jumping to the right. How to avoid this jump?




2) Your items in the list must be made as blocks and it item (li>a) need to be 
increased.


Common example:
https://codepen.io/bear-wolf/pen/YRvoWO?editors=1100#0







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 26 '18 at 12:53









AndrewAndrew

245




245













  • Thank you so much!

    – Gammi
    Nov 26 '18 at 18:46



















  • Thank you so much!

    – Gammi
    Nov 26 '18 at 18:46

















Thank you so much!

– Gammi
Nov 26 '18 at 18:46





Thank you so much!

– Gammi
Nov 26 '18 at 18:46




















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53480950%2fhow-to-fix-these-issues-in-css-in-navigation-menu%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

Contact image not getting when fetch all contact list from iPhone by CNContact

count number of partitions of a set with n elements into k subsets

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks