Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[HACK] Open and close block in css
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / Torrent Trader / Theme code and CSS hacks/mods

2019-12-01 12:41:57
Hello

I propose a method to open and close a block or other.

Open in your theme the theme.css name file and add at the end of the page :

       h1 {
           margin-top: 20px;
           margin-bottom: 40px;
           color: #345;
           text-shadow: 1px 1px 1px #fff;
       }
       h2 {
           color: #678;
           text-shadow: 1px 1px 1px #fff;
           font-size:1.1em
       }
       #volet {
           width: 250px;
           padding: 10px;
           background: #6B9A49;
           color: #fff;  
           font-family: Papyrus;
           font-size: 14px;
       }    
       #volet a.ouvrir,
       #volet a.fermer {
           padding: 10px 15px;
           background: #555;
           color: #fff;
           text-decoration: none;
           font-family: Papyrus;
           font-size: 14px;
       }
       #volet {
           position: absolute;
           left: -270px;  /* test fixed + scroll, on retire la position top */
           -webkit-transition: all .5s ease-in;
           -moz-transition: all .5s ease-in;
           transition: all .5s ease-in;
       }
       #volet a.ouvrir,
       #volet a.fermer {
           position: absolute;
           right: -88px;
           top: 150px;
           -webkit-transform: rotate(270deg);
           -moz-transform: rotate(270deg);
           -o-transform: rotate(270deg);
           -ms-transform: rotate(270deg);
           -moz-radius: 0 0 8px 8px;
           border-radius: 0 0 8px 8px;
       }
       #volet a.fermer {
           display: none;
       }
       #volet:target {
           left: 10px;
       }
       /* code pour la fermeture */
       #volet:target a.fermer {
           display: block;
       }
       #volet:target a.ouvrir {
           display: none;
       }
       #volet_clos:target #volet {
           left: -270px;
       }
        /* test fixed + scroll */
       #volet_clos {
           position: fixed;
           top: 55px; left: 0;
       }



Line of action to place where you like :

<?php
       echo "
   <div id='volet_clos'>
       <div id='volet'>
           <p>Fashion under construction ... </p>
           <p>Will be used very soon! </p>
         
           <a href='#volet' class='ouvrir' aria-hidden='true'>Open !</a>
           <a href='#volet_clos' class='fermer' aria-hidden='true'>Close !</a>
       </div>
   </div>";
?>

2021-02-15 09:22:27
Merci
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 2
  • Members: 0
  • Guests online: 2
  • Comments: 3
  • Messages: 1,728