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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:03:25+00:00 2026-05-28T01:03:25+00:00

I have a container that drops down like a notification container, I want to

  • 0

I have a container that drops down like a notification container, I want to have two bars side by side inside the absolutely positioned div.I don’t want to have to define a width because each div inside will need to adjust widths (because of the presence of a scrollbar or not)

The problem is odd, when .notification-wrapper has absolute or relative positioning the .left and .right divs won’t align side by side, however when i remove absolute/relative from .notification wrapper they do…(i do need relative/absolute to be applied to notification.wrapper)

Here’s what I have:

<span class="notification-wrapper">
<div class="notification-container">

<div class="left">LEFT</div>
<div class="right">RIGHT</div>

</div>
</span>




.notification-wrapper {
height: 32px;
width: 25px;
margin-right: -12px;
margin-left: -12px;
padding: 0px;
font-size: 0px;
position: absolute;
left: 50%;
top: 15px;
right: 50%;
 }
.notification-wrapper .notification-container {
font-size: 12px;
background-color: #FFF;
height: 100px;
position: absolute;
top: 25px;
}
.notification-container .left {
vertical-align: text-top;
display: inline-block;
background-color: #63F;
width: 50px;
}
.notification-container .right {
vertical-align: text-top;
display: inline-block;
background-color: #FFC;
width: 120px;
}
  • 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-28T01:03:25+00:00Added an answer on May 28, 2026 at 1:03 am

    That’s because when you position an element it “shrink-wraps”, meaning it shrinks to its smallest size. Since there’s nothing forcing your two elements to reside side by side the smallest size it can get is if it stacks the elements instead.

    I think, since you’re using inline-block (rather than float), you could use white-space: nowrap on the container to force the two inline-block elements not to wrap. You will probably wanna set white-space back to normal for the contents of the elements though.

    Also, a span element is an inline version of div and does not allow block level elements as children.

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

Sidebar

Related Questions

I have a container div that holds two internal divs; both should take 100%
I have a UIView container that has two UIImageView s inside it, one partially
I have a menu-like drop down container that hides via binding the mouseleave event.
I have a div that drops down and appears using jQuery when a user
I have a container element that you can drag objects around in. I want
I have an animation on a partially hidden div container that will execute when
i have a div that i use as a container to fit in footer
I'm trying to create a menu that works like the android notification drop-down area.
I have a container that contains an image that I need to drag from
i have a container box that includes a number of thumbnails. i earlier made

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.