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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:55:00+00:00 2026-05-26T06:55:00+00:00

I have two div blocks, one with tabs, one regular one. Here is the

  • 0

I have two div blocks, one with tabs, one regular one. Here is the html:

<div id = "container"></div>
<div>
<ul class="tabs">
        <li><a href="#tab1">My Quests</a></li>
        <li><a href="#tab2">Friends</a></li>
        <li><a href="#tab3">Find</a></li>
    </ul>

    <div class="tab_container">
        <div id="tab1" class="tab_content">
            <!--Content-->
        </div>
        <div id="tab2" class="tab_content">
           <!--Content-->
        </div>
        <div id="tab3" class="tab_content">
           <!--Content-->
        </div>
    </div>
</div>

I wanted to place these side by side, with space between them.

https://i.stack.imgur.com/QPv2I.png
![]dsd1

  • 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-26T06:55:01+00:00Added an answer on May 26, 2026 at 6:55 am

    You can use float or inline-block for this type of functionality.

    css:

    .tabs, .tab_container{
     float:left;
    }
    

    may be you have to read these articles also:

    http://css-tricks.com/795-all-about-floats/

    http://css-tricks.com/37-the-how-and-why-of-clearing-floats/

    Edit:

    as per the below comment write this:

    .tabs, .tab_container{
         display:inline-block;
         white-space:normal;
        }
    

    & give white-space to its parent

    .parent{white-space:nowrap}
    

    Html :

    <div class="parent">
        <ul class="tabs">
            <li><a href="#tab1">My Quests</a></li>
            <li><a href="#tab2">Friends</a></li>
            <li><a href="#tab3">Find</a></li>
        </ul>
    
        <div class="tab_container">
            <div id="tab1" class="tab_content">
                <!--Content-->
            </div>
            <div id="tab2" class="tab_content">
               <!--Content-->
            </div>
            <div id="tab3" class="tab_content">
               <!--Content-->
            </div>
        </div>
    </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

1) We have a page index.html with blocks: <body> <div id=action1>One</div> <div id=action2>Two</div> <div
I have two divs: one draggable and one droppable <div id=draggable class=block runat=server> </div>
I have 5 stars system in html/smarty below <ul class=star-rating id={$ID}> <li><a href=# class=one-star></a></li>
I have the following two code blocks. Code block 1 var checkboxes = $(div.c1
The scenario is I have two div s: one is where I select items
I have two ULs, one above the other: <ul id=one> <li> <li> <ul> <div
I have a div with two nested divs inside, the (float:left) one is the
I have a container div that holds two internal divs; both should take 100%
I have two tabs each with different styles and different text. One recent posts
I have two Drupal aggregator blocks on my page, one for a Twitter feed,

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.