• Resolved TheMK850

    (@themk850)


    Is it possible to create a two column title as the expand title?

    For example:

    [expand title="<div id="title-wrap">
    <div id="box1">Sect 7.1</div><div id="box2">really long title that I don't want to go underneath</div></div>[/expand]

    CSS:

    #title-wrap {
      width: 200px;
      height: 700px;
    }
    
    #box1 {
      display: inline-block;
      width: 20%;
      float: left;
      background-color: red;
    }
    
    #box2 {
      display: inline-block;
      width: 80%;
      float: left;
      background-color: blue;
    }

    I hope that this is possible. Thank you for your time.

    https://wordpress.org/plugins/jquery-collapse-o-matic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Baden

    (@baden03)

    couple of things:
    1. you really should try not to include HTML in a shortcode attribute.
    2. if you MUST include html, and you wrap the attribute in double quotes (“) then you must use single quotes (‘) within the HTML. For example:
    Good:

    [expand title="<div id='title-wrap'>Sect 7.1</div>"]...[/expand]

    Bad:

    [expand title="<div id="title-wrap">Sect 7.1</div>"]...[/expand]

    3. Now let’s get to your question: How to bread the trigger text into two columns. You can try using the shortcode, like so:

    [expand title="<div id='title-wrap'>
    <div id='box1'>Sect 7.1</div><div id='box2'>really long title that I don't want to go underneath</div></div>"]...[/expand]

    Alternatively (and recommended), you can use the roll-your-own method to achieve the same thing:

    <div id='title-wrap' class="collapseomatic" id="sec_7_1">
       <div id='box1'>Sect 7.1</div>
       <div id='box2'>really long title that I don't want to go underneath</div>
    </div>
    <div class="collapseomatic_content" id="target-sec_7_1">...</div>

    Hope this helps!

    Thread Starter TheMK850

    (@themk850)

    Thank you, that helped. But it made the drop down animation effect not smooth and I am able to see the text on the side of the expand title upon clicking it before it goes down, so I decided not to use it.

    Thank you for your time.

    Plugin Author Baden

    (@baden03)

    OK. Issue marked as resolved.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Two column title as the expand title’ is closed to new replies.