Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Sticky div under nav on index


dylank1

Question

Site URL: https://www.crescentridgedairybar.com/products

I have a div named .fixedelement with position: sticky; top: 0; on an index page

 

Here is the code block code i'm using:


<style>
  .fixedelement {
    position: sticky;
    top: 00px;
    width:100%;
    margin: 0px;
    background-color: white; 
    padding: 5px;
    min-width: 300px;
    overflow: visible;
    position: -webkit-sticky;
    
  }
</style>
<div class="fixedelement">


  
 
  
<a href="#milk"><button style=" width: 23%;white-space: nowrap; font-size: 18px; font-family: arial;overflow: visible;  transition: opacity 0.1s linear 0s;  border-radius: 300px; background-color: orange; display: inline-block; height: auto; border-width: 0px;  text-align: center; text-decoration: none; cursor: pointer; appearance: none; line-height: normal; padding: 10px; margin-bottom: 10px; min-width: 100px; align: center;">
  <b>Milk </b>
  </button></a>
  <a href="#icecream"><button style="width: 23%;white-space: nowrap; font-size: 18px; font-family: arial;  transition: opacity 0.1s linear 0s;  border-radius: 300px; background-color: orange; display: inline-block; height: auto; border-width: 0px;  text-align: center; text-decoration: none; cursor: pointer; line-height: normal;overflow: visible;  padding: 10px;  min-width: 100px;margin-bottom: 10px;">
    <b>Ice Cream </b>
  </button></a>
    <a href="#beefandpork"><button style="width: 23%;white-space: nowrap; font-size: 18px; font-family: arial;  transition: opacity 0.1s linear 0s; border-radius: 300px; background-color: orange; overflow: visible; display: inline-block; height: auto; border-width: 0px;  text-align: center; text-decoration: none; cursor: pointer;  line-height: normal; padding: 10px; margin-bottom: 10px; min-width: 100px;">
    <b>Beef & Pork </b>
  </button></a>
      <a href="#Novelties"><button style="width: 23%;white-space: nowrap; font-size: 18px; font-family: arial;  transition: opacity 0.1s linear 0s;  border-radius: 300px; background-color: orange; display: inline-block; height: auto; border-width: 0px;  text-align: center; text-decoration: none; cursor: pointer;  line-height: normal; padding: 10px; margin-bottom: 10px; min-width: 100px;overflow: visible; ">
    <b>Novelties </b>
  </button></a>
 
  </div>


 

Link to post
  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...