As I mentioned in my previous explanation of modifiers, these little words and phrases need to immediately precede or immediately succeed that which they modify. If not, you can end up with two grammar errors. One is called a misplaced modifier; the other is labeled a dangling modifier.
Let’s look at a misplaced modifier first. Here’s an example:
Looking over the menu, a cheeseburger was chosen by Sam.
Actually, we have two problems here. The first is the passive voice construction, but that was necessary for me to make my point. The modifier, looking over the menu, currently modifies cheesburger since it precedes that noun. If we correct this by moving the modifier and leaving the passive construction, we get:
A cheesburger was chosen by Sam, looking over the menu.
It’s still not very good English, so why don’t we just say:
Looking over the menu, Sam chose a cheeseburger.
Now, let’s examine a dangling modifier:
Walking into the room, the phone rang.
Literally, the phone is walking into the room in this tortured example.
We need to add someone to do the walking so we can un-dangle the modifier of walking into the room:
Walking into the room, we heard the phone ring.
Obviously, there are other ways to correct the original sentence, but I hope you now see what a dangling modifier is and how to correct it.