Jump to content

Editing drop down boxes

Recommended Posts

Site URL: https://clover-viola-yfne.squarespace.com/our-team

Hello. I am looking to edit drop down buttons I have, but my knowledge of code just isn't up to par. I have the drop down tabs created via CSS, added a header code injection script to make them clickable, and added in some custom CSS to edit them a bit more.

What I would like to be able to do is click on one of the tabs and have it show a photo of that team and the names, then be able to click another tab and have it do the same. Can anyone assist in the CSS to be able to add in photo/text? 

Sitehttps://clover-viola-yfne.squarespace.com/our-team

PW: Xolbe

 

CSS CODE in Code Block:

<div class="tabs-container">
  <button class="tab-btn" id="tab-1" onclick="tabOneClick()">
    Impact School
  </button>
  <button class="tab-btn" id="tab-2" onclick="tabTwoClick()">
    Socioemotional Programs
  </button>
  <button class="tab-btn" id="tab-3" onclick="tabThreeClick()">
    Selection & Project Impulso
  </button>
    <button class="tab-btn" id="tab-4" onclick="tabFourClick()">
    Project Launch
  </button>
    <button class="tab-btn" id="tab-5" onclick="tabFiveClick()">
    Administration
  </button>
    <button class="tab-btn" id="tab-6" onclick="tabSixClick()">
    Fundraising & Comms
  </button>
</div>
<script>
$(document).ready(function(){
$('.markdown-block .sqs-block-content h2').css('cursor','pointer');
$(".markdown-block .sqs-block-content h2").nextUntil("h2").slideToggle();
$(".markdown

CSS CODE in Design > Custom CSS

.tabs-container{
  transform:translateY(10%);
  width:100% !important;
  text-align:center;
  border-bottom: 0px solid #999;
  overflow: auto;
  overflow-x:auto;
  white-space: nowrap;
  z-index:99;
}
.tab-btn{
  max-width:280px;
  display: inline-block;
  border-radius:1px 1px 0 0;
  border:px solid #011E40;
  padding: 5px 10px;
  font-size:0.9em;
  
  background:#f5f5f5;
  margin-bottom:none !important;
  border:  !important;
  border-color: #011E40;
  &:not(:first-of-type){
  margin-left:10px;
  }
}
.tab-btn.active{
  background:lightgrey;
}

Screenshot.jpg

Link to comment
  • Replies 2
  • Views 187
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.