I attend a religious high school in Dallas in which girls are required to wear skirts below their knees, can't wear shirts with a wide neckline, and have to have their sleeves down so that the armpit, shoulder, and bra-strap are not visible. This dress-code, as I have been told by teachers numerous times, is to preserve modesty, and to protect the male gender.
A few weeks ago, my skirt was a few inches above my knees, and so was one of my friend's. A teacher used up class time that could have otherwise been spent learning, to say, "This is a religious school, and you need to come to school with a long skirt. You are precious, like a diamond, and we cover diamonds to keep them safe; the same way you must be covered. If boys see you, you will give them the wrong idea. They will have a reaction to your body, a feeling, and you will cause them to sin. We must be covered, and what is beautiful we cover, to keep safe, we are daughters of God."
If the teachers honestly believe that the school is unsafe for girls and that to make sure that girls are safe, they need to enforce dress-code, then I think it's safe to say that the issue isn't the existence of kneecaps; if they really think that girls are at risk, someone needs to intervene and address this issue directly, without forcing girls to feel guilty for existing and for having a body.
"Sin" is a religious construct, and has no basis in a secular lifestyle; the fact that the teachers believe that girls existing causes boys to "sin" is one example of how our society discretely attacks females, making them feel guilty for the actions of boys so that they cover up, and is rape culture. Girls do not cause boys to "sin", boys can control their actions, and to blame a boy's actions on a girl is enforcing rape culture. This comment by the teacher also erases the entire gay and lesbian population at school, and it makes the assumption that boys are constantly staring at the legs of girls.
I have also been called up by a male teacher who was over 40 years old to his desk, he then proceeded to stare at my legs, making me very uncomfortable. He asked me, in a frustrated tone, "Are you wearing a skirt? Come on..." . The next day, I was called up by the same teacher, he stared at my legs again, and then said "What is this material? What is it made out of...lace?" I looked down at my skirt, saying "Um...I don't know", he then looked at my legs again, and said "Look in a mirror, it's see-through". I was not only wearing black tights under that skirt, but the outer material had a cloth cover under it. Even if I wasn't wearing all of that material under the outer skirt cloth, he has no right to speak to me as he did; his comments were inappropriate, and I would absolutely label this interaction as unprofessional on his part.
There are so many other comments about my clothing I have received from teachers, dozens. The fact that the teachers do this allows the male students to feel comfortable dress-coding girls as well. Many boys have told me to cover up, that I shouldn't be wearing what I'm wearing, etc. This creates a power structure in the student body; one in which male students feel free to talk to the female students however they would like to when it comes to the bodies of the female students.
How can you stop dress-code at your school? Get the other girls to sign a petition, one in which you highlight the problems of dress-code, find a time to meet with the head of school at your school, and then present it to the head of school alongside several other girls. Don't stop until your goal is met; girls do not deserve to feel guilty for having bodies.