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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:04:44+00:00 2026-06-02T19:04:44+00:00

I am working with node JS and we built a chat which works perfect

  • 0

I am working with node JS and we built a chat which works perfect and now we are moving onto the CSS part of it.

Now the problem I’m having right now is that when we have multiple tabs, and we click on just one , all the tabs will move up.

This can be viewed in the images below. The red area is the div that the tabs are in showing that they should be able to be moved down with CSS


before


After click on 1 tab


After another click on a tab to show you that i have the jQuery part correct

This is a fixed div sitting at the bottom of the page

This code below is repeated for each tab but with different ids , tramsTalk , Calvin, srcc-test as shown in the image.

<div style="position:fixed;bottom:0;right:26px;background-color:red;">
    <div id="tramsTalk_chat" style="background-color:white;position:relative;bottom:0px;width:275px;float:right">
        <div id="tramsTalk_chat_header" class="chat_header"><p><i class="icon-chevron-up icon-white pull-right"></i>tramsTalk</p></div>
        <div class="overflow_chat" id="tramsTalk_chat_textarea"><hr style="margin-top:-8px;margin-bottom:1px;"></div>
        <div class="chat_textarea_holder" id="tramsTalk_msg_textarea_holder"><textarea class="chat_box" rows="3" id="tramsTalk_msg" ignoreesc="true" name="tramsTalk_chat_message" onkeyup="check(this,event);" style="resize: none; overflow-y: hidden; "></textarea></div>
    </div>
</div>

I thought this would work and it still keeps the tabs at the top.

Just to restate :

jQuery is working fine, we toggle but moves tabs up that should still be pinned to the bottom. (I can click on them and they will then pull down their text boxes). I assume CSS is the problem, I am unsure.

SOLUTION

<style>
.wrappers > div {
   margin-top: 275px;
}

.active {
    height: 300px;
    background-color: white;
    margin-top: 0 !important;
}
</style>

<script type="text/javascript">
$(document).ready(function(){
$('#Calvin_chat').click(function(){
   alert('test');
   $(this).attr('class','active');
});});
</script>

Works like a charm!!!

  • 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-02T19:04:46+00:00Added an answer on June 2, 2026 at 7:04 pm

    Though you state that “This code below is repeated for each tab but with different ids” and give this:

    <div style="position:fixed;bottom:0;right:26px;background-color:red;">
        <div id="tramsTalk_chat" style="background-color:white;position:relative;bottom:0px;width:275px;float:right">
            <div id="tramsTalk_chat_header" class="chat_header"><p><i class="icon-chevron-up icon-white pull-right"></i>tramsTalk</p></div>
            <div class="overflow_chat" id="tramsTalk_chat_textarea"><hr style="margin-top:-8px;margin-bottom:1px;"></div>
            <div class="chat_textarea_holder" id="tramsTalk_msg_textarea_holder"><textarea class="chat_box" rows="3" id="tramsTalk_msg" ignoreesc="true" name="tramsTalk_chat_message" onkeyup="check(this,event);" style="resize: none; overflow-y: hidden; "></textarea></div>
        </div>
    </div>
    

    My guess is, based on what I see from your images and the behavior you state, that you really have this (I’ve eliminated the guts for purposes of illustration):

    <div style="position:fixed;bottom:0;right:26px;background-color:red;">
        <div id="tramsTalk_chat" style="background-color:white;position:relative;bottom:0px;width:275px;float:right">
        </div>
        <div id="sccr_test_chat" style="background-color:white;position:relative;bottom:0px;width:275px;float:right">
        </div>
        <div id="Calvin_chat" style="background-color:white;position:relative;bottom:0px;width:275px;float:right">
        </div>
    </div>
    

    That is, the fixed positioned div is not repeated for each, but in fact wraps them all. If so, then the behavior you experience is what I would expect, because once one tab is enlarged, then the height of the fixed div expands and all the headings go up with it. You start with something like this (I narrowed width for purpose of illustration). You click and expand the height of one and get something like this. One way to perhaps solve it is to set an em unit height on the div’s and likewise with the expanded size, so that you can then control margin-top like this.

    I’m assuming here that your fixed div is not really going to have a red background, but in fact is going to be transparent (that the red was for illustration). If that is not so, then you need to make each element individually a fixed position, but then you will not be able to float them.

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

Sidebar

Related Questions

I'm working on a rails application which is built around a tree data structure.
In the application that I'm working on right now, I need to periodically check
I'm working on a project built entirely in node.js and coffeescript. I want to
I have built an event-base java html parser: Lagarto . Now I am working
i'm working with Zend mvc project with ZendServer. now i read of node.js that
I'm having trouble trying to get my class working in my node.js file. When
I'm writing the JS for a chat application I'm working on in my free
I am working with Node.js to build a web socket server that uses mongodb.
I am working with a MySQL Database and having some issues while trying to
I'm working on a hobby project involving a rather CPU-intensive calculation. The problem is

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.