Cardiff proved their promotion credentials by taking three points from one of their poorest displays of the season in the 2-1 win against struggling Cheltenham.
An eighth-minute strike from Peter Thorne should have ensured an easy afternoon for the home side, but they were made to fight after John Finnigan produced a surprise equaliser after 19 minutes.
Thorne opened the scoring with a clinical finish from Graham Kavanagh's corner but Cheltenham were soon on level terms.
Finnigan took advantage of some slack defending to rifle the ball in at the far post and give the visitors a glimpse of a result.
However, their hopes were dashed when Kavanagh produced anther excellent delivery shortly before half-time which Robert Earnshaw converted for his 26th goal of the season.