The dollar weakened slightly against the euro and was roughly flat compared to a basket of currencies as markets reacted to the election of centrist rulers in Germany.