The problem is that there’s going to be lots of different languages on our site with unknown dynamic text lengths. I need everything to be centered but without manually adding a right margin to every area like this. Would be great if it could do some type of jQuery calculation and make it so they look even like this every time but done automatically:
Click here to see my CSS example
I tried modifying this jQuery script I found but I failed as you can see here jsfiddle.net/UTaSg/86/
This could work if it doesn’t add the additional width to the last child (no space on right side of “Type: All Solo Band Group”).
I’m not sure how to do this, any help would be greatly appreciated. Thanks in advance for any help! Please use examples if possible.
There’s always going to be these 4 filters in the 990px container and I want to keep 25px of space on the ends with all the different languages. So their text length will change slightly and I want the space in-between the 3 filter spaces to be equal.
You can try simply sum the width if each text and substract it from width of the whole, dive by 3 and put it as right-margin to each element except the last one.
You can create generic plugin since this will work for any number of items are inside jQuery object with length, and you can get container using parent().
You can try this: http://jsfiddle.net/UTaSg/104/