Cardiff City gave their chances of survival in the Premier League a boost with a 1-0 victory over Southampton at St Mary's.