Added test and some modifications to the creation of the bar htmls

Now forces the width of increased/decreased parts to a minimum of 1
correctly,
also the breaking of the bar will now be prevented.