Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #885037

    Hi Team,

    I tried to implement a dropdown button with the following codes in cornerstone by placing the code into a raw content element.

    It doesn’t work (see pic). Can you please let me know what am i missing to make this work with X?

    thank you.

    <html>
    <head>
    <style>
    .dropbtn {
        background-color: #4CAF50;
        color: white;
        padding: 16px;
        font-size: 18px;
        min-width: 260px;
        font-weight:550;
        border: none;
        cursor: pointer;
    }
    
    .dropdown {
        position: relative;
        display: inline-block;
        font-size: 18px;
       
    
    }
    
    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #fafafa;
        min-width: 260px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    }
    
    .dropdown-content a {
        color:#333f4f ;
        padding: 12px 16px;
        text-decoration: none;
        font-weight:500;
        display: block;
      
    }
    
    .dropdown-content a:hover {background-color: #fff}
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
    
    .dropdown:hover .dropbtn {
        background-color: #4CAF50;
    }
    </style>
    </head>
    
    <body>
    
    <div class="dropdown">
      <button class="dropbtn">Get started here</button>
      <div class="dropdown-content">
        <a href="https://a2zmortgages.com.au/free-assessment-new-purchase/">I bought a house and need finance</a>
        <a href="https://a2zmortgages.com.au/i-want-to-refinance/">I want to refinance to a lower rate</a>
        <a href="https://a2zmortgages.com.au/appy-online-i-want-a-preapproval/">I want a pre-approval</a>
        <a href="https://a2zmortgages.com.au/appy-online-i-want-to-build/">I want to buid a house</a>
        <a href="https://a2zmortgages.com.au/invest-in-property/">I want to invest in property</a>
        <a href="https://a2zmortgages.com.au/contact-me-first/">Please contact me first</a>
      </div>
    </div>
    
    </body>
    </html>
    #885790
    Thai
    Moderator

    Hi There,

    Please follow these steps:

    1. Add the following CSS to Customizer > Custom > Global CSS:

    .dropbtn {
        background-color: #4CAF50;
        color: white;
        padding: 16px;
        font-size: 18px;
        min-width: 260px;
        font-weight:550;
        border: none;
        cursor: pointer;
    }
    
    .dropdown {
        position: relative;
        display: inline-block;
        font-size: 18px;
       
    
    }
    
    .dropdown-content {
        display: none;
        position: absolute;
        background-color: #fafafa;
        min-width: 260px;
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    }
    
    .dropdown-content a {
        color:#333f4f ;
        padding: 12px 16px;
        text-decoration: none;
        font-weight:500;
        display: block;
      
    }
    
    .dropdown-content a:hover {background-color: #fff}
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
    
    .dropdown:hover .dropbtn {
        background-color: #4CAF50;
    }

    2. Add the following HTML to the raw content element:

    <div class="dropdown">
      <button class="dropbtn">Get started here</button>
      <div class="dropdown-content">
        <a href="https://a2zmortgages.com.au/free-assessment-new-purchase/">I bought a house and need finance</a>
        <a href="https://a2zmortgages.com.au/i-want-to-refinance/">I want to refinance to a lower rate</a>
        <a href="https://a2zmortgages.com.au/appy-online-i-want-a-preapproval/">I want a pre-approval</a>
        <a href="https://a2zmortgages.com.au/appy-online-i-want-to-build/">I want to buid a house</a>
        <a href="https://a2zmortgages.com.au/invest-in-property/">I want to invest in property</a>
        <a href="https://a2zmortgages.com.au/contact-me-first/">Please contact me first</a>
      </div>
    </div>

    http://i.imgur.com/3hT5DFt.png

    Hope it helps 🙂

    #885829

    Thanks for the response,

    i did that too.

    Appears to be a conflict with the GRid plugin.

    #886575
    Rad
    Moderator

    Ah, thanks for sharing. Is it okay now? Thanks!

  • <script> jQuery(function($){ $("#no-reply-885037 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>