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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:24:33+00:00 2026-06-16T01:24:33+00:00

I have a search container with a fixed width. It has 2 children: A

  • 0

I have a “search” container with a fixed width. It has 2 children:

  1. A “quantity” container that is anchored to the bottom right corner of the parent. It’s width is dynamic, but should always be quite a bit smaller than the parent container.
  2. A “breadcrumbs” container that displays the current search criteria. It’s width can vary and even wrap.

I have managed to get this almost working, however there is an edge case where when “breadcrumbs” is a certain length, text from both child containers overlaps.

Below are some examples of how it should look and an example of how it is currently broken:

sample

And here is the HTML/CSS code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<style type="text/css">
.search {
    border: 1px solid blue;
    width: 600px;
    position: relative;
}
.breadcrumbs {
    border: 1px solid green;
}
.quantity {
    border: 1px solid red;
    position: absolute;
    right: 0;
    bottom: 0;
}
</style>
</head>
<body>
<b>Sample 1</b>
<div class="search">
    <div class="breadcrumbs">Search Criteria: Blah Search Filter 1 &gt; Blah Search Filter 2 &gt; Blah Search Filter 3</div>
    <div class="quantity">51-100 of 5000</div>
</div>
<b>Sample 2</b>
<div class="search">
    <div class="breadcrumbs">Search Criteria: Blah Search Filter 1 &gt; Blah Search Filter 2 &gt; Blah Search Filter 3 &gt; Blah Search Filter 4</div>
    <div class="quantity">51-100 of 5000</div>
</div>
<b>Broken Sample</b>
<div class="search">
    <div class="breadcrumbs">Search Criteria: Blah Search Filter 1 &gt; Blah Search Filter 2 &gt; Blah Search Filter 3 &gt; Uh Oh!</div>
    <div class="quantity">51-100 of 5000</div>
</div>

</body>
</html>

NOTE: If it is not possible to do exactly what am am requesting, below is a potential alternative: alternative

Thanks for your help.

  • 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-16T01:24:34+00:00Added an answer on June 16, 2026 at 1:24 am

    Without needing to change your markup, this CSS will work:

    .search {
        border: 1px solid blue;
        width: 600px;
        overflow: hidden;
    }
    .breadcrumbs {
        border: 1px solid green;
        display: inline;
    }
    .quantity {
        border: 1px solid red;
        float: right;
    }
    

    http://jsfiddle.net/mC5QG/ (minor modifications so you can see the full effect)

    http://jsfiddle.net/mC5QG/2/ (added margin-top: -1px to .quantity)

    Changed the absolute positioning to a float and set the first child element to display: inline. Should work no matter what width the element is.

    Alternate solution to match alternative appearance:

    .search {
        border: 1px solid blue;
        display: table-row;
    }
    
    .breadcrumbs, .quantity {
        display: table-cell;
    }
    
    .breadcrumbs {
        border: 1px solid green;
    }
    .quantity {
        border: 1px solid red;
        white-space: pre;
        vertical-align: bottom;
    }
    

    http://jsfiddle.net/mC5QG/1/

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

Sidebar

Related Questions

the div on website below that have search at the bottom and it always
I have a JSP, say view.jsp , that's using the basic Liferay search container
I currently have a fixed div that acts as a search bar on the
I have an ASP.NET page that contains two div's. Both have search fields and
I have a search page on my MVC site that contains a list of
I have search screen which has 10 fields and involves around 5 to 6
OK so i have this script that submits the input of a search box
I have been trying to use Fixed footer not displaying the bottom-most list item
Suppose that I have an n -sided loaded die, where each side k has
I have an html page called search.html which contains sliders, they work perfectly in

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.