In my "Grammar and Style" book it says modifiers should be close as possible to whatever they modify. Is this what they mean?
Stepping slowly in front of her she tried to see around the bags.
Thanks
You understand what the book is saying just fine. Know which word you're modifying, and place the modifier as close to it as you can. Easy, right?
Yup, that's basically it. But I'll have to amend that it's not necessarily the "word" that you're modifying. The book did a good job saying "whatever they modify", because sometimes you're modifying a phrase rather than a word. See blacbird's post for example.
I, for one, prefer to kill adverbs quickly and mercilessly.
If "quickly and mercilessly" were modifying the verb "kill", the book would be advocating:
"to kill quickly and mercilessly adverbs"
I somehow doubt they do that. Instead "quickly and mercilessly" modifies the verb phrase "kill adverbs".
Another possibility would be a split infinitive, of course:
"to quickly and mercilessly kill adverbs"
But this changes emphasis. blacbird's placement of modifiers is impeccable, and I do think the book would agree.
What, I wonder, would the book say about this, though?
Slowly, she stepped in front of her...
One property of adverbs (modifying a verb phrase) is that they can be fronted, despite the SVO word order. This means that, if you front the adverb, there will usually be the subject between the verb phrase and modifier. So do they say you should avoid such a sentence? What about:
Slowly what John had told her yesterday sank in.
Here the modifier doesn't even modify the nearest verb phrase. This works without ambiguity because the nearest verb phrase is not a possible target for "slowly" to modify.
This could be different:
Slowly rotting zombies filled the street.
This could mean:
Slowly-rotting zombies filled the street.
or
Slowly, rotting zombies filled the street.
This sort of ambiguity can also be avoided by not fronting the adverb:
Rotting zombies slowly filled the street.
So, while your example certainly adheres to what they mean to say, grammar is a bit more complex than that, and without reading the book I can't really know what they have in mind with that particular stylistic advice.