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

  • Home
  • SEARCH
  • 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 9246991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:37:22+00:00 2026-06-18T09:37:22+00:00

Hi im trying to put 2 DIV side by side +——————————–+ +——————————–+ | |

  • 0

Hi im trying to put 2 DIV side by side

+--------------------------------+ +--------------------------------+
|                                | |                                |
|                                | |                                |
|            400px               | |            355px               |
|                                | |                                |
|                                | |                                |
|                                | |                                |
+--------------------------------+ +--------------------------------+

.header{
    background-image: url('../img/button-bg.png');
    padding: 0px;
    background-repeat: repeat-x;
    height: 36px;
}



.div1
{
    width: 400px;
    float: left;
    margin-right: 10px;
}


.div2
{

    width:355px;
}

I need both DIV to be able to clear the header so I can’t use absolute position

I tried the float left attribute, but when the page is too small the other div is going under the first div. I was wondering if it was possible to do so.

edit : When the screen is too small, I want the horizontal bar to appear

  • 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-18T09:37:24+00:00Added an answer on June 18, 2026 at 9:37 am

    You can use display:inline-block; on the divs and white-space: nowrap; on their parent.

    .header div{
        display:inline-block;
        vertical-align:top;
    }
    .header{
        white-space: nowrap;
        background-image: url('../img/button-bg.png');
        padding: 0px;
        background-repeat: repeat-x;
        height: 36px;
    }
    .div1{
        width: 400px;
        margin-right: 10px;
    }    
    .div2{
        width:355px;
    }
    

    http://jsfiddle.net/mowglisanu/a6YNY/

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

Sidebar

Related Questions

Possible Duplicate: Give a CSS styled div a “border-left-image” Im trying to put a
I'm trying to put two divs on the right side of parent div one
Basically, I am trying to put a semi-transparent div over an image to serve
So I have been trying to put a div side by side here but
I am trying to put a div over an image so that it acts
I'm trying to put an empty div on the right side of my content
I'm trying to put an image inside a div. It is actually a multiple
I have a square div (called square) and trying to put another div (caption)
I'm trying to put div elements right next to each other. The problem is,
Look: http://jsfiddle.net/Ak334/ I'm trying to put the divs div_vagas_disponiveis and div_percentual_vagas side by side,

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.