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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:32:36+00:00 2026-06-06T00:32:36+00:00

I have a container that is used to show a breadcrumb path through a

  • 0

I have a container that is used to show a breadcrumb path through a series of documents as they are selected.

Each breadcrumb element is a single div, floated to the left so that they stack up nicely behind one another. Their width is set by their text content, which is the title of a document. Lengths will vary greatly.

What should happen:
When the breadcrumb list of elements becomes too long to be displayed in the container they should resize, ensuring that all of them remain visible within the container.

The problem:
This seems to work, but only up to a point. Once the list of breadcrumbs become too long for the container I divide the container width by the number of breadcrumb elements that exist, and set the elements widths accordingly.
However, this will not work consistently, sometimes showing the last document in the list, but refusing to show its direct parent if selected.

Ideally the breadcrumb elements should simply keep shrinking to make sure they are all displayed, in much the same way as window icons are sized to display in the windows taskbar.

Iv made a little fiddle to highlight roughly what is going on, and even here you can see that the elements are not resizing correctly to make sure they are all displayed. This is most obvious as 8 or more elements are added.

http://jsfiddle.net/MaxVK/drw9J/30/

Can anyone tell me what I am doing wrong please?

Many thanks

MVK

  • 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-06T00:32:39+00:00Added an answer on June 6, 2026 at 12:32 am

    You have to subtract the padding, margins and border size (in your case : 9px, 2*3 for the padding, 2*1 for the border and 1 for the left margin) to the buttons width:

    var Lok = (BredWid / ButCount)-9;
    

    http://jsfiddle.net/drw9J/35/

    Here is a simple example:

    http://jsfiddle.net/drw9J/34/

    You will notice that the total width is not exactly equal to the container width (there is a small blank after the buttons), this is due to the rounding of the width.

    In the first example (your version), the blank at the end is due to the buttons that are smaller than Lok.

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

Sidebar

Related Questions

I have a container element that you can drag objects around in. I want
I have created a form that contains fields used to accept a floating value
I have a class which contains a static collection that can be used across
I have a container that is a popup over a page and it has
I have a container that contains an image that I need to drag from
Lets say, for example, I have a container that takes up 100% of the
i have a container box that includes a number of thumbnails. i earlier made
I have a container MovieClip that serves as a content area that I need
I have a UIView container that has two UIImageView s inside it, one partially
I have a single plugin, that takes value for an input and returns the

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.