Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9133901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:33:58+00:00 2026-06-17T08:33:58+00:00

I am very new to web design, and specially to technologies like css3 and

  • 0

I am very new to web design, and specially to technologies like css3 and html5,
I want to built a website that will use as much as possible CSS3 and HTML5 and as less as possible JavaScript.

So I want to get pretty much the same behavior using only CSS/HTML.

$(document).ready(function () {
    $("#wrapper section").click(function() {
        var bcn = $(this).next('.box-content');
        if ($('.box-content').is(':visible')) {
            $('.box-content').hide();
            bcn.show();
        }
        else {
            $('.box-content').hide();
            bcn.slideToggle(200);
        }
    });
});

That’s what I want to make without JS: http://jsfiddle.net/8BLD7/7/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:34:00+00:00Added an answer on June 17, 2026 at 8:34 am

    This is roughly approximate to the code you have there, obviously as others have stated this will only work in modern browsers—I wouldn’t recommend purely using this system—but it is something that can be worked in as a progressive enhancement as mentioned by War10ck.

    http://jsfiddle.net/3VQ9X/

    For futher information on how this works, and the issues to be aware of read these links:

    • http://css-tricks.com/on-target/
    • http://reference.sitepoint.com/css/pseudoclass-target
    • http://blog.teamtreehouse.com/stay-on-target

    Here’s the markup and css involved.

    markup

    <div id="wrapper">
      <nav>
        <h3><a href="#content-1">App 1</a><h3>
        <h3><a href="#content-2">App 2</a><h3>
      </nav>
      <section class="main">
        <section class="box-content" id="content-1">
          <p> This is content 1 </p>
        </section>
        <section class="box-content" id="content-2">
          <p> This is content 2 </p>
        </section>
      </section>
    </div>
    

    css (basic element setup, can be modified as you like)

    nav {
      border: 1px solid black;
      float: left;
    }
    
    section.main {
      position: relative; /* this is important */
      overflow: hidden; /* as is this, but everthing else can be modified */
      float: left;
      border: 1px solid red;
      width: 500px; /* having fixed dimensions will make things easier */
      height: 500px;
    }
    

    css (the magic bit)

    section.box-content {
      position: absolute;
      left: 0;
      top: 0;
      -webkit-transition: all 1.0s ease-in-out;
      -moz-transition: all 1.0s ease-in-out;
      -ms-transition: all 1.0s ease-in-out;
      -o-transition: all 1.0s ease-in-out;
      transition: all 1.0s ease-in-out;
      -webkit-transform: translate(0,-500px);
      -moz-transform: translate(0,-500px);
      -ms-transform: translate(0,-500px);
      -o-transform: translate(0,-500px);
      transform: translate(0,-500px);
    }
    
    /* the pseudo selector :target only comes into effect when
       an anchored link has been clicked that targets a specific
       element by id. If the element with the id has this pseudo
       selector applied, then the css will be applied. Tie this
       together with transformations, and you have interactive 
       dynamic css :) */
    
    section.box-content:target {
      -webkit-transform: translate(0,0);
      -moz-transform: translate(0,0);
      -ms-transform: translate(0,0);
      -o-transform: translate(0,0);
      transform: translate(0,0);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm very new to web design...okay, now that that's out of the way, where
I'm a veteran of C and very new to web design altogether. I've found
I am going to create a new web application that is very customized. It
I'm pretty new to web design (but a very experienced programmer) and I'm creating
I am building an ASP.NET web application that will use SQL Server for data
I'm very new to web-design, so this might be a stupid question, but bear
I am very new to web development. I am currently using tablesorter jquery plugin
I'm very new to web app development and I thought I would start with
I'm very new to Web server matters, and relatively a naive student of C++.
I'm very new to Rails and web development. I'm generating a bunch of objects

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.