Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Junior Member
    Join Date
    May 2004
    Location
    Dunfermline, Scotland
    Posts
    3
    Member #
    5954
    I am wanting to put a FAQ section on my website and like the "expaning" format found here:

    http://www.3dwines.com/questions

    Does anyone know how you do this ?

    I have had a look at the Code, but cannot make any sense of it.

    Any help would be appreciated.

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    This is done using CSS, in this case.

    For each of the two major DIV sections, there is a width property defined in terms of percentages. The CSS would look something like this:
    Code:
    div.content {
    width:  75%;
    }
    div.navigation {
    width:  25%;
    }
    As long as the combined widths are less than or equal to 100%, this will work. It's called a liquid website. Personally, I prefer them since, if designed properly, they'll fit nicely into most resolutions.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    May 2004
    Location
    Dunfermline, Scotland
    Posts
    3
    Member #
    5954
    I will try it out.

    Many thanks for your help

  5. #4
    Member benbun's Avatar
    Join Date
    Mar 2004
    Posts
    51
    Member #
    5273
    I'm guessing Steakman meant how do get the faq answers to appear and disappear !.

  6. #5
    Junior Member
    Join Date
    May 2004
    Location
    Dunfermline, Scotland
    Posts
    3
    Member #
    5954
    Correct !

    Will the suggested answer not do this?

  7. #6
    WDF Staff Wired's Avatar
    Join Date
    Apr 2003
    Posts
    7,657
    Member #
    1234
    Liked
    138 times
    Correct. I can't see the source code on this PC, but it's probably using javascript.
    The Rules
    Was another WDF member's post helpful? Click the like button below the post.

    Admin at houseofhelp.com

  8. #7
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    All the divs with the answers in them have an id, and are initially hidden.
    Code:
    <div id="q1" class="answer">Answer</div>
    And the divs are hidden with CSS,
    Code:
    .answer { display: none; }
    Then the answer is shown with JavaScript,
    Code:
    function show_answer(answer_id) {
      document.getElementById(answer_id).style.display = 'block';
    }
    ...
    <a href="javascript:show_answer('q1');">Question 1</a>
    It's a nifty trick.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  9. #8
    Senior Member Aleister's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    250
    Member #
    2329
    Very handy james!
    The Temple of Dagon | Dagon Design
    "That is not dead which can eternal lie, And with strange aeons even death may die." - HPL

  10. #9
    Senior Member james's Avatar
    Join Date
    May 2003
    Location
    Melbourne, AUSTRALIA
    Posts
    364
    Member #
    1352
    Maybe I should do a tutorial. Heaps of people know about it I think, but I've answered that question heaps of times.
    James H
    Home Page · Mars Page · www.fihsf1.net (formerly www·fihs·net)

  11. #10
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    I hate to say, but if you want your script to be cross-browser compatible, Steakman, then you will need to find an alternative to that particular script on the website shown, as I couldn't get the options to stay open in Mozilla Firebird.
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:13 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com