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 6958787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:11:09+00:00 2026-05-27T15:11:09+00:00

I have a CSS class: .something{ //all my css stuff here } I have

  • 0

I have a CSS class:

.something{
//all my css stuff here
}

I have 10 different elements that use this class:

<div class='something'></div>
<div class='something'></div>
<div class='something'></div>
<div class='something'></div>
<div class='something'></div> //ect ect....

Each of those divs need to be positioned differently and I don’t want to make like 10 copy’s of .something and point each one at a different class because its only the position that needs to change.

Also, I’m using JQuery to animate these divs, like:

$('.something').animate();

But that will animate all the divs attached to that class right? Is there any way around that?

  • 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-05-27T15:11:10+00:00Added an answer on May 27, 2026 at 3:11 pm

    You can specify an ID as well. So, you can do something like this:

    <div class="something" id="s1"></div>
    <div class="something" id="s2"></div>
    

    Then:

    $('#s1').animate({ ... }, speed); // animation of element 1
    $('#s2').animate({ ... }, speed); // different animation of element 2
    

    And still apply styles like:

    .something {
        /* css */
    }
    

    Or, alternatively, you can not use IDs and simply loop: edited for simplicity

    $('.something').animate({"top": "+=100px"}, speed);
    

    If you’ll be animating each div in somewhat the same way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a button CSS class that uses background images with different positions
I have a div having a css class MyClass. Inside this div, I can
How can I select all elements that have a specific CSS property applied, using
I have several textboxes that are all of the same css class MyClass. I'm
Let's say we have defined a CSS class that is being applied to various
I have a span that is generated through javascript, with its css class as
Let's say I have this table: <table class=live_grid> <tr> <td> <h3>Something!</h3> </td> </tr> </table>
I have many divs in ids: <div class=nameclass id=name<?= $id; ?>> something </div> And
I have a CSS class called grid which I place on my tables. I
I have a css class where the LEFT needs the be the WIDTH of

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.