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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T10:44:38+00:00 2026-05-15T10:44:38+00:00

I have two tabs each with different styles and different text. One recent posts

  • 0

I have two tabs each with different styles and different text. One recent posts and one recent comments the css for each are below with the ones I need to have when they are selected.

So pretty much when a user selects the recent comments it will change the entire block to the second one (2). Pretty much changing width, and swapping the css for both tabs. I am currently using idtabs http://www.sunsean.com/idTabs/

My question: How can I have it change the tab css and width for both when the right tab is selected and then back again when the left tab is selected.

CSS

#sideboxtopleft {
 float: left;
 width: 121px;
 height:20px;
 background-image: url(images/categorysplitter.gif);
 background-position:top right;
 background-repeat:no-repeat;
 text-align: center;
 padding-top: 10px;
 margin: 0;
}

#sideboxtopleft2 {
 float: left;
 width: 173px;
 height:20px;
 background-image: url(images/categorysplitter.gif);
 background-position:top right;
 background-repeat:no-repeat;
 text-align: center;
 padding-top: 10px;
 margin: 0;
}

#sideboxtopright {
 float: right;
 width: 173px;
 height: 20px;
 background-image:url(images/categorybg.gif);
 text-align: center;
 padding-top: 10px;
 margin: 0;
}

#sideboxtopright2 {
 float: right;
 width: 121px;
 height: 20px;
    background-image:url(images/categorybg.gif);
 text-align: center;
 padding-top: 10px;
 margin: 0;
}

HTML

<div id="sidebox" style="padding: 0px; width:294px;">
<div class="idTabs">
<div id="sideboxtopleft">
<a href="#post"><h3>RECENT POSTS <img src="images/arrow.gif" width="9" height="5" alt="v" border="0" /></h3></a>
</div>
<div id="sideboxtopright">
<a href="#comments"><h3>RECENT COMMENTS <img src="images/arrow2.gif" width="6" height="9" alt=">" border="0" /></h3></a>
</div>
</div>
<div style="padding: 10px;">
<div id="post">
SUP?
</div>
<div id="comments">
SUP?>>!?>!!
</div>
</div>
</div>

<div id="sidebox" style="padding: 0px; width:294px;">
<div class="idTabs">
<div id="sideboxtopleft2">
<a href="#post2"><h3>RECENT COMMENTS <img src="images/arrow.gif" width="9" height="5" alt="v" border="0" /></h3></a>
</div>
<div id="sideboxtopright2">
<a href="#comments2"><h3>RECENT POSTS <img src="images/arrow2.gif" width="6" height="9" alt=">" border="0" /></h3></a>
</div>
</div>
<div style="padding: 10px;">
<div id="post2">
SUP?
</div>
<div id="comments2">
SUP?>>!?>!!
</div>
</div>
</div>
  • 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-15T10:44:39+00:00Added an answer on May 15, 2026 at 10:44 am

    I would recommend defining the two formats in classes, rather than applying them to the element directly. If you do that you can use the toggleClass() (http://api.jquery.com/toggleClass/) method to toggle between the two classes when a user clicks on the tab.

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

Sidebar

Related Questions

I have a tab contol with two tabs. Each one containing listviews. When the
I have two tabs one called Sale-Items and the other All-Items and for each
I have two tabs on my app that handle different flows. For each tab
I have two lists, each on different tabs (sub-sites) of the site. I would
I have a tabhost with two tabs. Each tab has his own activity. My
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I have the following extJs window which has two tabs in it. One of
I'm using two jquery ui widgets, autocomplete and tabs. They each have their own
I am using Flex AS3, i have a accordian with two tabs each tab
I need to create a tab layout with two tabs . Each tab should

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.