Dropdown Divs Aligning with Heading ButtonMake a div fill the height of the remaining screen spaceHow to horizontally center a <div>?How to align checkboxes and their labels consistently cross-browsersHow to make div not larger than its contents?Vertically align text next to an image?How to align content of a div to the bottom?How can I know which radio button is selected via jQuery?How to make a div 100% height of the browser window?How do I vertically align text in a div?How to vertically align an image inside a div?

How did Doctor Strange see the winning outcome in Avengers: Infinity War?

What does "I’d sit this one out, Cap," imply or mean in the context?

Where does the Z80 processor start executing from?

How to check is there any negative term in a large list?

What is paid subscription needed for in Mortal Kombat 11?

How to be diplomatic in refusing to write code that breaches the privacy of our users

Pole-zeros of a real-valued causal FIR system

Would a high gravity rocky planet be guaranteed to have an atmosphere?

Valid Badminton Score?

Term for the "extreme-extension" version of a straw man fallacy?

Different result between scanning in Epson's "color negative film" mode and scanning in positive -> invert curve in post?

Is expanding the research of a group into machine learning as a PhD student risky?

Trouble understanding the speech of overseas colleagues

Anatomically Correct Strange Women In Ponds Distributing Swords

Return the Closest Prime Number

Can the discrete variable be a negative number?

How do I extract a value from a time formatted value in excel?

Crossing the line between justified force and brutality

How can a function with a hole (removable discontinuity) equal a function with no hole?

How easy is it to start Magic from scratch?

Why Were Madagascar and New Zealand Discovered So Late?

System.debug(JSON.Serialize(o)) Not longer shows full string

Is there a good way to store credentials outside of a password manager?

Lay out the Carpet



Dropdown Divs Aligning with Heading Button


Make a div fill the height of the remaining screen spaceHow to horizontally center a <div>?How to align checkboxes and their labels consistently cross-browsersHow to make div not larger than its contents?Vertically align text next to an image?How to align content of a div to the bottom?How can I know which radio button is selected via jQuery?How to make a div 100% height of the browser window?How do I vertically align text in a div?How to vertically align an image inside a div?













0















I am currently trying to develop a three button system to display the three collectibles within my game's website. I currently have the buttons ready, but the one on the right flies off the screen, and the middle one looks off.



I am trying to create a look in which the left button has the dropdown content as it is, the middle with the dropdown content aligned centre, and the right with the dropdown content mirroring the left one but going from right, to left.



Here is the current website with the 'Collectibles' section a little ways down the home page:
https://timeandtimeagain.manakeep.com/



Here is the HTML code for the block:
https://pastebin.com/mEECfh2T



Here is the CSS code for the block:



#artifactsButton p 
padding: 5px;
text-align: center;


#floraButton p
text-align: right;
word-wrap: break-word;



#collectiblesHeader
text-align: center;


#artifactsButton
float: left;


#floraButton
float: right;
padding-right: 10px;


#lettersButton
float: right;
padding-right: 290px;


.dropbtn
font-size: 28px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;


.navbar a:hover, .dropdown:hover .dropbtn
background-color: grey;



.dropdown-content
display: none;
position: absolute;
background-color: #f9f9f9;
max-width: 500px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;


.dropdown-content a
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;


.dropdown-content a:hover
background-color: #ddd;


.dropdown:hover .dropdown-content
display: block;










share|improve this question



















  • 1





    Sorry but I can't see the screenshots.

    – IndPendent
    Mar 7 at 13:17











  • timeandtimeagain.manakeep.com Sorry, this is the site for the game. Scroll down a little to find the 'Collectibles' section.

    – Lewis Binnie
    Mar 7 at 14:26












  • Please edit your question to make it self-contained. Even if you don't yet have enough reputation to post images, you can upload them to Stack's own Imgur where it will be easy for someone with more reputation to inline them if they look okay.

    – tripleee
    Mar 7 at 14:29















0















I am currently trying to develop a three button system to display the three collectibles within my game's website. I currently have the buttons ready, but the one on the right flies off the screen, and the middle one looks off.



I am trying to create a look in which the left button has the dropdown content as it is, the middle with the dropdown content aligned centre, and the right with the dropdown content mirroring the left one but going from right, to left.



Here is the current website with the 'Collectibles' section a little ways down the home page:
https://timeandtimeagain.manakeep.com/



Here is the HTML code for the block:
https://pastebin.com/mEECfh2T



Here is the CSS code for the block:



#artifactsButton p 
padding: 5px;
text-align: center;


#floraButton p
text-align: right;
word-wrap: break-word;



#collectiblesHeader
text-align: center;


#artifactsButton
float: left;


#floraButton
float: right;
padding-right: 10px;


#lettersButton
float: right;
padding-right: 290px;


.dropbtn
font-size: 28px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;


.navbar a:hover, .dropdown:hover .dropbtn
background-color: grey;



.dropdown-content
display: none;
position: absolute;
background-color: #f9f9f9;
max-width: 500px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;


.dropdown-content a
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;


.dropdown-content a:hover
background-color: #ddd;


.dropdown:hover .dropdown-content
display: block;










share|improve this question



















  • 1





    Sorry but I can't see the screenshots.

    – IndPendent
    Mar 7 at 13:17











  • timeandtimeagain.manakeep.com Sorry, this is the site for the game. Scroll down a little to find the 'Collectibles' section.

    – Lewis Binnie
    Mar 7 at 14:26












  • Please edit your question to make it self-contained. Even if you don't yet have enough reputation to post images, you can upload them to Stack's own Imgur where it will be easy for someone with more reputation to inline them if they look okay.

    – tripleee
    Mar 7 at 14:29













0












0








0








I am currently trying to develop a three button system to display the three collectibles within my game's website. I currently have the buttons ready, but the one on the right flies off the screen, and the middle one looks off.



I am trying to create a look in which the left button has the dropdown content as it is, the middle with the dropdown content aligned centre, and the right with the dropdown content mirroring the left one but going from right, to left.



Here is the current website with the 'Collectibles' section a little ways down the home page:
https://timeandtimeagain.manakeep.com/



Here is the HTML code for the block:
https://pastebin.com/mEECfh2T



Here is the CSS code for the block:



#artifactsButton p 
padding: 5px;
text-align: center;


#floraButton p
text-align: right;
word-wrap: break-word;



#collectiblesHeader
text-align: center;


#artifactsButton
float: left;


#floraButton
float: right;
padding-right: 10px;


#lettersButton
float: right;
padding-right: 290px;


.dropbtn
font-size: 28px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;


.navbar a:hover, .dropdown:hover .dropbtn
background-color: grey;



.dropdown-content
display: none;
position: absolute;
background-color: #f9f9f9;
max-width: 500px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;


.dropdown-content a
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;


.dropdown-content a:hover
background-color: #ddd;


.dropdown:hover .dropdown-content
display: block;










share|improve this question
















I am currently trying to develop a three button system to display the three collectibles within my game's website. I currently have the buttons ready, but the one on the right flies off the screen, and the middle one looks off.



I am trying to create a look in which the left button has the dropdown content as it is, the middle with the dropdown content aligned centre, and the right with the dropdown content mirroring the left one but going from right, to left.



Here is the current website with the 'Collectibles' section a little ways down the home page:
https://timeandtimeagain.manakeep.com/



Here is the HTML code for the block:
https://pastebin.com/mEECfh2T



Here is the CSS code for the block:



#artifactsButton p 
padding: 5px;
text-align: center;


#floraButton p
text-align: right;
word-wrap: break-word;



#collectiblesHeader
text-align: center;


#artifactsButton
float: left;


#floraButton
float: right;
padding-right: 10px;


#lettersButton
float: right;
padding-right: 290px;


.dropbtn
font-size: 28px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: inherit;
margin: 0;


.navbar a:hover, .dropdown:hover .dropbtn
background-color: grey;



.dropdown-content
display: none;
position: absolute;
background-color: #f9f9f9;
max-width: 500px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;


.dropdown-content a
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;


.dropdown-content a:hover
background-color: #ddd;


.dropdown:hover .dropdown-content
display: block;







html css web






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 14:27







Lewis Binnie

















asked Mar 7 at 13:06









Lewis BinnieLewis Binnie

11




11







  • 1





    Sorry but I can't see the screenshots.

    – IndPendent
    Mar 7 at 13:17











  • timeandtimeagain.manakeep.com Sorry, this is the site for the game. Scroll down a little to find the 'Collectibles' section.

    – Lewis Binnie
    Mar 7 at 14:26












  • Please edit your question to make it self-contained. Even if you don't yet have enough reputation to post images, you can upload them to Stack's own Imgur where it will be easy for someone with more reputation to inline them if they look okay.

    – tripleee
    Mar 7 at 14:29












  • 1





    Sorry but I can't see the screenshots.

    – IndPendent
    Mar 7 at 13:17











  • timeandtimeagain.manakeep.com Sorry, this is the site for the game. Scroll down a little to find the 'Collectibles' section.

    – Lewis Binnie
    Mar 7 at 14:26












  • Please edit your question to make it self-contained. Even if you don't yet have enough reputation to post images, you can upload them to Stack's own Imgur where it will be easy for someone with more reputation to inline them if they look okay.

    – tripleee
    Mar 7 at 14:29







1




1





Sorry but I can't see the screenshots.

– IndPendent
Mar 7 at 13:17





Sorry but I can't see the screenshots.

– IndPendent
Mar 7 at 13:17













timeandtimeagain.manakeep.com Sorry, this is the site for the game. Scroll down a little to find the 'Collectibles' section.

– Lewis Binnie
Mar 7 at 14:26






timeandtimeagain.manakeep.com Sorry, this is the site for the game. Scroll down a little to find the 'Collectibles' section.

– Lewis Binnie
Mar 7 at 14:26














Please edit your question to make it self-contained. Even if you don't yet have enough reputation to post images, you can upload them to Stack's own Imgur where it will be easy for someone with more reputation to inline them if they look okay.

– tripleee
Mar 7 at 14:29





Please edit your question to make it self-contained. Even if you don't yet have enough reputation to post images, you can upload them to Stack's own Imgur where it will be easy for someone with more reputation to inline them if they look okay.

– tripleee
Mar 7 at 14:29












1 Answer
1






active

oldest

votes


















0














The first thing to do is to set the .dropdown class the position: relative;.
Then you can work with the absolute attribute.



Example:



.dropdown 
position: relative;


#artifactsButton .dropdown .dropdown-content
left: 0;
top: 100%;
min-width: 300px;


#lettersButton .dropdown .dropdown-content
right: 0;
top: 100%;
min-width: 300px;


#floraButton .dropdown .dropdown-content
top: 100%;
left: -160px;
min-width: 300px;



In the case of #floraButton, you'll have to set the left manual, I set it from my resolution.



This is a solution, but I recommend you to distribute the divs in a better way. With flexbox for example.






share|improve this answer






















    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%2f55044532%2fdropdown-divs-aligning-with-heading-button%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









    0














    The first thing to do is to set the .dropdown class the position: relative;.
    Then you can work with the absolute attribute.



    Example:



    .dropdown 
    position: relative;


    #artifactsButton .dropdown .dropdown-content
    left: 0;
    top: 100%;
    min-width: 300px;


    #lettersButton .dropdown .dropdown-content
    right: 0;
    top: 100%;
    min-width: 300px;


    #floraButton .dropdown .dropdown-content
    top: 100%;
    left: -160px;
    min-width: 300px;



    In the case of #floraButton, you'll have to set the left manual, I set it from my resolution.



    This is a solution, but I recommend you to distribute the divs in a better way. With flexbox for example.






    share|improve this answer



























      0














      The first thing to do is to set the .dropdown class the position: relative;.
      Then you can work with the absolute attribute.



      Example:



      .dropdown 
      position: relative;


      #artifactsButton .dropdown .dropdown-content
      left: 0;
      top: 100%;
      min-width: 300px;


      #lettersButton .dropdown .dropdown-content
      right: 0;
      top: 100%;
      min-width: 300px;


      #floraButton .dropdown .dropdown-content
      top: 100%;
      left: -160px;
      min-width: 300px;



      In the case of #floraButton, you'll have to set the left manual, I set it from my resolution.



      This is a solution, but I recommend you to distribute the divs in a better way. With flexbox for example.






      share|improve this answer

























        0












        0








        0







        The first thing to do is to set the .dropdown class the position: relative;.
        Then you can work with the absolute attribute.



        Example:



        .dropdown 
        position: relative;


        #artifactsButton .dropdown .dropdown-content
        left: 0;
        top: 100%;
        min-width: 300px;


        #lettersButton .dropdown .dropdown-content
        right: 0;
        top: 100%;
        min-width: 300px;


        #floraButton .dropdown .dropdown-content
        top: 100%;
        left: -160px;
        min-width: 300px;



        In the case of #floraButton, you'll have to set the left manual, I set it from my resolution.



        This is a solution, but I recommend you to distribute the divs in a better way. With flexbox for example.






        share|improve this answer













        The first thing to do is to set the .dropdown class the position: relative;.
        Then you can work with the absolute attribute.



        Example:



        .dropdown 
        position: relative;


        #artifactsButton .dropdown .dropdown-content
        left: 0;
        top: 100%;
        min-width: 300px;


        #lettersButton .dropdown .dropdown-content
        right: 0;
        top: 100%;
        min-width: 300px;


        #floraButton .dropdown .dropdown-content
        top: 100%;
        left: -160px;
        min-width: 300px;



        In the case of #floraButton, you'll have to set the left manual, I set it from my resolution.



        This is a solution, but I recommend you to distribute the divs in a better way. With flexbox for example.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 7 at 18:13









        IndPendentIndPendent

        1996




        1996





























            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%2f55044532%2fdropdown-divs-aligning-with-heading-button%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

            1928 у кіно

            Захаров Федір Захарович

            Ель Греко