Layout change for pagination in small screen widhts