I had already made a post here, but because of the way I wrote it, this post is not resolved.
https://answers.unity.com/questions/1914179/size-of-child-elements-of-ugui.html
So I am making a simpler and more concise post.
You may, of course, answer the original post.
The two posts are different questions, but if one is resolved, the other may be resolved.
First, create a new scene, right click on Hierarchy, select UI, ScorrlVIew, and create a ScorrlView.
This ScorrlView has two scroll bars of two different types, which are removed.
Set Scroll View, Viewport, Stretch in Content, and Anchros all to 0.
Then add a Vertical LayoutGroup to Content.
Now it looks like this
Then add child elements to Content.
In the future it would be better to be prefabricated, but here we created an Image from right click.
And here is what I did
Here is the problem.
How can we make the size of this child element to be the same size as Content?
For example, the horizontal size should be the same as Content. The vertical size is 20% of Content. For example, the horizontal size is the same as Content and the vertical size is 20% of Content.
Change the Control Child Size of the Vertical LayoutGroup?
No, this would only spread the child elements over the full Content, not determine a specific size for the child.
Set Layout Element to Child?
No, this can be sized in px, but it cannot be sized according to the size of the Conten for this case.
Thus, this problem cannot be solved.
I also do not know why the text in this post is larger in some parts.
I am seeking a solution to this problem.