Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Change fonts in accordeon CSS

Change fonts in accordeon CSS

Scheduled Pinned Locked Moved General Discussion
6 Posts 2 Posters 589 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    D
    dennisbern
    wrote on last edited by
    #1

    Hi everyone

    I want to change the fonts in the accordeon CSS code that Amir wrote. Have I got it right I need to do this in this line?

    <div class="accordion-title lay-textformat-parent">.

    I have already created a font in the Wordpress "Text Formats". The HTML class is called _accordion_title.

    Can I use this HTML_Class or do I need to change the fonts somewhere else?

    All the best and thanks

    Dennis

    1 Reply Last reply
    0
    • D
      D
      dennisbern
      wrote on last edited by dennisbern
      #2

      Does anyone know how to change fonts in Amir's accordion CSS code?

      1 Reply Last reply
      0
      • arminunruhA
        arminunruhA
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        i dont know which code you mean, do you have a link or can you post the code here

        if you can change the html code, you can just add class="_accordion_title" to some container or insert _accordion_title into an existing class attribute

        1 Reply Last reply
        0
        • D
          D
          dennisbern
          wrote on last edited by
          #4

          Sure. I put this in the "Custom CSS & HTML" under Custom <head> content:

          <script>
          window.laytheme.on('newpageshown', function(){
          jQuery(".accordion-title").on("click", function(){
          jQuery(this.parentNode).toggleClass("active")
          })
          })
          </script>
          <style>
          .accordion-title{
          cursor: pointer;
          }
          .accordion .minus, .accordion .plus{
          margin-left: 30px;
          }
          .accordion .minus{
          display: none;
          }
          .accordion .accordion-content{
          display: none;
          margin-top: 20px;
          }
          .accordion.active .minus{
          display: inline;
          }
          .accordion.active .plus{
          display: none;
          }
          .accordion.active .accordion-content{
          display: block;
          }
          .accordion-title{
          display: inline-block;
          }
          </style>


          And this in a "Edit HTML" on a project site:

          <div class="accordion">
          <div class="accordion-title lay-textformat-parent">
          <span>Chris Leuenberger & Marcel Schwald</span>
          <span class="plus">+</span>
          <span class="minus">-</span>
          </div>

          <div class="accordion-content lay-textformat-parent">
              <p>Chris Leuenberger und Marcel Schwald haben s.....</p>
              <p><br><a href="https://www.marcelschwald.com/">www.marcelschwald.com</a><br><a href="https://chrisleuenbergerproductions.com">https://chrisleuenbergerproductions.com</a></p>
          </div>
          

          </div>

          1 Reply Last reply
          0
          • arminunruhA
            arminunruhA
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            <div class="accordion-title _accordion_title">

            1 Reply Last reply
            0
            • D
              D
              dennisbern
              wrote on last edited by
              #6

              THX it worked.

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              Online Users
              Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
              laytheme.com
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Recent
              • Tags
              • Popular
              • Users
              • Search