Need assistance creating a chatbox with Unity UI

I made the chat box, and a prefab that is a panel, image, and text. The image will be the user’s avatar, and the text will of course be what the user types and sends. I already have the instantiate down but the issues are that the messageObject (Prefab) will stack ontop of eachother instead of moving up the chatbox as u would expect it too. I know this is because I haven’t coded it to do so, and that is one of the things I need help with. How would I do this?

Make the messageObject(Prefab) move up the chatbox as the users hit send

make the panel size scale with the length of the text the user sent.

And using RPC I assume to display them across the network

1930667--124743--temp1.PNG
1930667–124744–ChatBoxScript.cs (1019 Bytes)

Why not use the horizontal layout group and out your objects that contain previous messages in that?

This way it will auto space then out

I added the layoutgroup but the parameters aren’t really cusomizable besides spacing and padding, so when i send messages, they just shrink as more come in not moving up the chatbox