I mean what is the relationship between the empty space between stars such that it contains sparse distribution of gas and our our inability to see the rims of our galaxy. I searched too long time to get an answer but I did not get any thing.
Mixed in with the interstellar gas (which has almost no effect on visible-wavelength light by itself) are dust grains, which scatter and absorb light. Because the density of gas and dust increases as you get closer to the center of the galaxy, looking in the direction of the center of the galaxy (or nearby directions) means trying to look through a lot of dust -- more and more if you consider trying to see things farther and farther away from us -- and this ends up blocking most of the light. In visible-wavelength light, we can't even see the central regions of the galaxy, let alone the far side of the disk beyond the center.
But if you look in the opposite direction, you're looking in a direction where the density of (gas and) dust gets lower the further out you go and where the "rim" of the galaxy is closer to us. So it's generally possible to see the near "rim" of the galaxy.
(With the caveat that galactic disks -- including our own -- do not have "rims" in the sense of sharp edges.)