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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:28:59+00:00 2026-05-28T14:28:59+00:00

I want to horizontally position some text along with two dropdown menus like: Text

  • 0

I want to horizontally position some text along with two dropdown menus like:

Text One : | I'm a dropdown |     Text Two: | I'm a second dropdown |

where the ‘I’m a dropdown’ elements are absolutely positioned ul elements and will eventually have some JS to act as dropdown menus. I initially thought the HTML would be something like (Here is the JSFiddle):

<div id="wrapper" class="clearfix">
    <div>
        Tet One
    </div>
    <div class="dropdown">
        <ul>
            <li>I'm a dropdown</li>
            <li>Value One</li>
        </ul>
    </div>
    <div>
        Text Two
    </div>
    <div class="dropdown">
        <ul>
            <li>I'm a second dropdown</li>
            <li>Value Two</li>
        </ul>
    </div>
</div>

along with CSS like:

#wrapper > div{
    float: left;
}
#wrapper > div.dropdown{
    position: relative;
}
#wrapper > div > ul{
    position:absolute;
    width: 100%;
}

The result is that the text-only div elements (‘Text One’ and ‘Text Two’) float fine, but the relatively positioned elements don’t maintain a proper width and the absolutely positioned ul elements are placed on top of each other, i.e. everything is squished to the left.

a) can this be fixed?

b) is this the wrong approach and is there a better one (like using display: inline-block?)

  • 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-28T14:28:59+00:00Added an answer on May 28, 2026 at 2:28 pm

    I ended up solving this by using an inline-block outter div, placed each absolutely positioned ul inside a relative div wrapper like so:

    http://jsfiddle.net/timmyomahony/tGn6m/

    On reflection, I didn’t ask this question very well so apologies for those who took the time to answer.

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

Sidebar

Related Questions

Hi I have some elements like these: <div id=one>content</div> <div id=two>content</div> and a corrispondent
I want to position my textview with numbers under the textview that contains text.
I want to display some text below each grid image. Please see my code
What is the proper way to position :before and :after pseudo-elements, like pictures? I've
I want a horizontally centered floating div, i.e. one that always is on top
i am having 4 ButtonField and i want to align all the buttons horizontally.
I have two labels that are stacked. If I want a horizontal line between
I have some text in a link title and also a form box and
I have two columns: the left one is a Canvas containing an mx:Tree and
I'm wondering if there's a simpler way to do this: Position something centre-screen horizontally

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.