kali dass
kali dass

Reputation: 37

How to rotate accordion body text?

I am using accordion function for adding port details in my module. I want to display that body contents only in horizontal. Please see the following fiddle.

html, body {
    background-color:#e9eaed;
}

.panel-group {
    width:430px;
    z-index: 100;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateX(-100%) rotate(-90deg);
    -webkit-transform-origin: right top;
    -moz-transform: translateX(-100%) rotate(-90deg);
    -moz-transform-origin: right top;
    -o-transform: translateX(-100%) rotate(-90deg);
    -o-transform-origin: right top;
    transform: translateX(-100%) rotate(-90deg);
    transform-origin: right top;
}
.panel-heading {
    width: 430px;
}
.panel-title {
    height:18px
}
.panel-title a {
    float:right;
    text-decoration:none;
    padding: 10px 430px;
    margin: -10px -430px;
}
.panel-body {
    height:830px;
}
.panel-group p {
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateX(0%) rotate(90deg);
    -webkit-transform-origin: left top;
    -moz-transform: translateX(0%) rotate(90deg);
    -moz-transform-origin: left top;
    -o-transform: translateX(0%) rotate(90deg);
    -o-transform-origin: left top;
    transform: translateX(0%) rotate(90deg);
    transform-origin: left top;
}
<div class="container">
    <div class="row">
        <div class="content">
            <div class="panel-group" id="accordion">
                <div class="panel panel-default">
                    <div class="panel-heading">
                         <h4 class="panel-title">
                        <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
                          Accordion 1
                        </a>
                      </h4>

                    </div>
                    <div id="collapseOne" class="panel-collapse collapse">
                        <div class="panel-body">
                            <p><h1>Title</h1><br>A paragraph of text about something pertinant to the site which people could read should the feel the need to read about it. They could skip it as well but this keeps the initial view a good deal less text heavy, see?<br>- Some Source</p>
                        </div>
                    </div>
                </div>
                
            </div>
        </div>
    </div>
</div>

http://jsfiddle.net/xct25urv/

Here, I want to display the body contens only in horizontal wise, and dont change the header format. Header is Vertical only. Body only want horizontal.

Please help me how can I do this?

Upvotes: 1

Views: 285

Answers (1)

Sathish
Sathish

Reputation: 2460

Try this,

I just added transform in your css,

.panel-body {
    padding: 15px;
    transform: rotate(90deg);//added
    transform-origin: 188px 241px 0;//added
}

Demo

I hope this is used to achieve what you needed!!!

Upvotes: 2

Related Questions