How does the electricity "know" the ratio of the resistance in a voltage divider?
Let's do another thought-experiment:

Imagine that we gradually shorten the connection between the two resistors until it is infinitesimally small.  Now you effectively have one resistor with the divider-point somewhere in the middle.  One end of this resistor is connected to the supply voltage, let's say 5 Volts.  The other end is connected to ground, which we'll call 0 Volts because we'll use it as the reference point for our voltage measurement.  

Again, imagine that we gradually move the divider-point up toward the 5V end or down toward the 0V end.  At what location along this combined resistor would you expect the measured voltage to drop from 5 Volts to 0 Volts?

Is it clear that the voltage doesn't have a step change at one point, but is proportional to the fraction of the resistor below the divider-point?  Voltage drop is linear along the length of the combined resistance. 

Now imagine that we gradually restore the length of that connection we stretched in the first visualization.  And imagine that the connection itself has no resistance - zero. (It's not quite zero, but it's so close that we can ignore it). Is it clear that the voltage will be no different at either end of the connection as you stretch it out again?

The total voltage drops linearly over the total resistance, and the divider point "samples" that voltage at a specific part of the total.

The current doesn't "care" or "know" whether is flowing through many individual resistors, or one continuous one; the voltage drops continuously along each segment of the resistance path.  The "zero resistance" connections just don't matter.