calculate container width