Generate a voltage that is 7 volts below the input voltage for at least 250 mA in the range of 20-26 volts
You could try something like this, though the accuracy might not be good enough.



simulate this circuit &ndash; Schematic created using CircuitLab
Q1 dissipates about 7V * 256mA = 1.8W so it needs a bit of a heat sink.