Jump to content

Accordion fix?


techker

Recommended Posts

Hey guys i got this friend that has a dealership for used cars..so i did him a web site and his wife really wanted an accordion style view.....

 

so i got it going it works great but buggy..is there a way to fix when you click it goes back to the top of the page?

 

here is the link maybe it will be easier to understand when you view it.

 

http://autosspeedy.ca/TEMP/

 

 

code css:

 

 
.wrapper{
width: 95%;
background-color: #FFF;
padding-left: 15px;
height:100%;
}
.wrapperleft{
width: 100%;
 
background-color: #FFF;
 
 
}
 
.st-accordion{
    width:100%;
hight:100%;
    
    margin: 0 auto;
}
.st-accordion ul li{
    height: 180px;
    border-bottom: 1px solid #c7deef;
    border-top:1px solid #fff;
    overflow: hidden;
}
.st-accordion ul li:first-child{
border-top: none;
color: #000;
}
.st-accordion ul li > a{
    font-family: 'Josefin Slab',Georgia, serif;
    text-shadow: 1px 1px 1px #ccc;
    font-size: 36px;
    display: block;
position: relative;
    line-height: 100px;
outline:none;
    -webkit-transition:  color 0.2s ease-in-out;
-moz-transition:  color 0.2s ease-in-out;
-o-transition:  color 0.2s ease-in-out;
-ms-transition:  color 0.2s ease-in-out;
transition:  color 0.2s ease-in-out;
}
.st-accordion ul li > a span{
background: transparent url(../images/down.png) no-repeat center center;
text-indent:-9000px;
width: 26px;
height: 14px;
position: absolute;
top: 50%;
right: -26px;
margin-top: -7px;
opacity:0;
-webkit-transition:  all 0.2s ease-in-out;
-moz-transition:  all 0.2s ease-in-out;
-o-transition:  all 0.2s ease-in-out;
-ms-transition:  all 0.2s ease-in-out;
transition:  all 0.2s ease-in-out;
font-style:normal;
 
}
.st-accordion ul li > a:hover{
    color: #1693eb;
}
.st-accordion ul li > a:hover span{
opacity:1;
right: 10px;
}
.st-accordion ul li.st-open > a{
    color: #1693eb;
}
.st-accordion ul li.st-open > a span{
-webkit-transform:rotate(180deg);
-moz-transform:rotate(180deg);
    transform:rotate(180deg);
right:10px;
opacity:1;
}
.st-content{
    padding: 5px 0px 30px 0px;
}
.st-content p{
    font-size:  16px;
    font-family:  Georgia, serif;
    font-style: italic;
    line-height:  28px;
    padding: 0px 4px 15px 4px;
color:#333 ;
}
.st-content img{
    width:125px;
    border-right:1px solid #fff;
    border-bottom:1px solid #fff;
}
@media screen and (max-width: 320px){
.st-accordion ul li > a{
font-size:36px;
}
}
Link to comment
https://forums.phpfreaks.com/topic/285874-accordion-fix/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.