it should be the first one, because the total voters is 12 + 18, and only 12 voted a so it's the total in the bottom and 12 on the top. you get the fraction of the voters of a of total. to change the fraction into percentage, just multiply by 100%
sorry if my English is bad