Midlothian (UK Parliament constituency, 1708–1918)

For the 1832 general election, as a result of the Representation of the People Act 1832, the constituency was redefined.

The boundaries of counties and burghs for parliamentary purposes ceased to be necessarily those for other purposes, but nominally the Edinburghshire constituency consisted of the county of Edinburgh minus the burghs of Edinburgh, Leith, Portobello, and Musselburgh.

Ramsay resigned by accepting the office of Steward of the Chiltern Hundreds, causing a by-election.

Gladstone's appointment as Prime Minister, First Lord of the Treasury and Chancellor of the Exchequer required a by-election.

Gladstone's appointment as Prime Minister, First Lord of the Treasury and Chancellor of the Exchequer required a by-election.