My question is about the location of "before" and "by". I am not sure which one should be close to "learn".
Chinese people are trying to learn their babies' gender by looking at the calendar before they are born.
My intended meaning is:
Chinese people are trying to learn their babies' gender by looking at the calendar. When are they trying to learn it? Before they(their babies) are born.
So, which one is better?
1-) Chinese people are trying to learn their babies' gender by looking at the calendar before they are born.
or
2-) Chinese people are trying to learn their babies' gender before they are born by looking at the calendar.
In the first sentence, "before they are born" seems to refer to "looking", not "learn". But I want it to refer to "learn", not "looking".
In the second sentence, "by looking" seems to refer to "are born" and of course, it is not my intended meaning.
Finally, which one is better? I think that they are both correct.