I agree with the previous posters that a riad might not be the best option with a young child.
We went to Marrakech last October when my daughter was 2 and we stayed here
http://www.maison27.com/. It was as lovely as it looks in the pictures and we got an amazing deal - £125 per night for the whole place. It's because the owner (Brian) has a strange charging policy whereby he charges different amounts depending on how many people stay, even though you get the whole place whether there's 1 or 6 of you. It looks like the price has now gone up to £135, but he didn't charge us for our daughter so I imagine you would pay £135 a night.
The positives are that it's a beautiful villa, you get a private pool and full time maid/cook all included in the price and you can get to the medina relatively easily.
On the downside, it's about 30 minutes from the medina. However, there is a free bus running from the villas to the medina a few times a day. It's also pretty much in the middle of nowhere, so there's nowhere to go for dinner in the evening (although you do have your own private cook so that might not be an issue for you).
It depends what you're looking for really but it was a gorgeous place and a bargain price.
One word of warning if you haven't been to Marrakech before. The souks are quite crazy and we had our daughter with us in her pushchair. There are motorbikes going up and down inside the souks and she got a bit freaked out a couple of times. It was fine, but probably a bit overwhelming if you're 2 years old.