Cotterill - 'We Did Enough To Win'
City should have taken the lead towards the end of the first half but Jonathan Kodjia's effort was spectacularly saved by Cardiff keeper David Marshall.
In the second half Bristol City had the better of the chances and more of the ball but Marshall was in no mood to be beaten.
And even when he was beat by a shot from Elliott Bennett, the post came to Cardiff's rescue.
But despite the Robins having the better of things, they were nearly undone late on but Sammy Ameobi could only prod his effort wide of the target from inside the six yard box.
Steve Cotterill told BBC Wales Sport: 'We did enough to win the game, some of our football was excellent and we had some great efforts on goal.
'We've got a very young team, our boys are doing a lot of learning and the Championship is a tough learning curve for them, but they are coming through it with flying colours.
'We've played like we did here all season, that was not a one-off. Things will turn around for us during the season and it will come back to us.'
Cardiff remained in eighth place after the game and Bristol City move up a place to 20th.
The Robins are back in action on Saturday when they take on Fulham.
Click Here To join our Vital BCFC community.
Click Here To visit our Vital BCFC messageboard.