I would like to align div inside parent div to center horizontally for div with unknown width and dynamic content (will wary from use case to use case.
I have read that margin: auto;
usually is usually solution here, but it requires set of width which is unknown for me compile-time. text-align: center
does't work for div inside parent div.
Fiddle example
Here is a Fiddle example.
My two questions
- I would like the three circles to be aligned to the middle. Number of circles can vary from zero to many.
- Another related questions is how I can make the progress bar have a minimum width (for instance when having only one, two or three steps) and strech to right and left when adding more steps? Here is (very bad) illustration in Paint.
As a note I would like this to work for IE 8 as well.