Litton Das completed his eighth Test century to go with Towhid Hridoy's 137 as Bangladesh were bowled out for 400, their highest total against South Africa, on the second day of the first Test in Johannesburg on Monday.
South Africa were 56 for one after 13 overs in reply, still 344 runs behind, at the time of filing.
Litton resumed on 92 and reached three figures in the fourth over of the day, pulling Marco Jansen for four. He raised his bat and helmet and then took a note from his pocket.
It reads: "Happy birthday, my princess, this century is for you."
His daughter Anayra turned three on Monday.
Litton's century came after his 206-run sixth-wicket stand with Hridoy on the opening day, Bangladesh's highest partnership against South Africa, home or away.
The pair had come together with Bangladesh on 121 for five, after Kagiso Rabada took all five wickets to fall, including debutant Mahfijul Islam with the first ball of the match. Hridoy fell lbw to Jansen off the last ball of the first day.
Bangladesh resumed on 327 for six and added 73 runs for their last four wickets.
Mehidy Hasan Miraz edged Dane Paterson to first slip for 10 off 16 balls. Litton was the next to go, caught at short midwicket pulling a short ball from Wiaan Mulder, leaving Bangladesh on 374 for eight.
Hasan Mahmud was caught behind off Paterson trying to pull. Taskin Ahmed took the total to 400 with a four off Paterson, but was caught by Mulder off the next ball.
No team has lost a Test at the Wanderers Stadium after scoring more than 320 in the first innings. Twelve such matches have been won and seven drawn.
Hasan struck in the second over of South Africa's innings, when Aiden Markram edged a ball just outside off stump to Litton behind the stumps.
Zubayr Hamza survived an lbw decision off Taskin when the delivery was called a no-ball. South Africa were 18 for one at lunch.
After the break, Bangladesh lost both their reviews off successive balls from Hasan, appealing for lbw against Hamza. The first impact was outside the line, and the second ball was missing the stumps.
Earlier, a loud lbw appeal from Taskin against Ackermann was turned down. Bangladesh did not review, and replays showed the ball would have narrowly missed the stumps.