quick easy question
Results 1 to 3 of 3

Thread: quick easy question

Hybrid View

  1. #1
    Senior Member IcSilk's Avatar
    Join Date
    Aug 2001
    Posts
    296

    quick easy question

    i have this simple code:

    Code:
    <html>
    <head>
       <title>menu mockup</title>
       <style type="text/css">    
          .show {display: none; }
          .hide:focus + .show {display: inline; }
          .hide:focus { display: none; }
          .hide:focus ~ #list { display:none; }
          @media print { .hide, .show { display: none; } }
       </style>
    </head>
    <body>
    <p>Here's a list</p>
          <div>
             <a href="#" class="hide">[hide]</a>
             <a href="#" class="show">[show]</a>
             <ol id="list">
                <li>item 1</li>
                <li>item 2</li>
                <li>item 3</li>
             </ol>
          </div>
      
    </body>
    </html>
    It shows the expanded version and 'hide' link as default. I can't seem to get it to reverse this - show collapsed version with 'show' link as default.

    Anyone??

    Thanks and Blessings
    "In most gardens they make the beds too soft - so that the flowers are always asleep" - Tiger Lily

  2. #2
    Senior Member treanglin's Avatar
    Join Date
    Dec 2003
    Posts
    110
    Not sure if you're trying to not use javascripts intentionally but, if not, you may find these links useful.

    http://www.murraytestsite.com/collapsiblelist.htm#

    For pure CSS check out:
    http://www.thecssninja.com/css/css-tree-menu
    "Do you know why the system is slow?" they ask

    "It's probably something to do with..." I look up today's excuse ".. clock speed"
    -BOFH

  3. #3
    Senior Member IcSilk's Avatar
    Join Date
    Aug 2001
    Posts
    296
    Nothing against JS per se. I just hate the grey button look that I have never been able to change and have it look right cross-browser.

    Im not even trying to do this to display lists, I just used them for the example.
    I want to display the first few lines of essays, and have a <see more> botton that stays in place at the bottom whether expanded or collapsed.
    I haven't used CSS since 2.1 and Im real rusty.

    The code I posted is great, its just the wrong default mode and no tampering that Ive done has fixed it.
    "In most gardens they make the beds too soft - so that the flowers are always asleep" - Tiger Lily

Similar Threads

  1. Quick question...
    By DerekK in forum Network Security Discussions
    Replies: 4
    Last Post: September 10th, 2004, 11:35 PM
  2. I have a stupid, quick question
    By Zelfaldor in forum AntiOnline's General Chit Chat
    Replies: 6
    Last Post: January 26th, 2004, 04:50 AM
  3. quick question
    By Obliterate in forum Newbie Security Questions
    Replies: 16
    Last Post: August 26th, 2002, 11:44 AM
  4. Easy VB Question
    By Black-Mage21 in forum AntiOnline's General Chit Chat
    Replies: 7
    Last Post: August 19th, 2002, 03:43 AM
  5. quick linux question
    By lewzer in forum Newbie Security Questions
    Replies: 3
    Last Post: August 7th, 2002, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •