The Twelfth Amendment to the US Constitution describes what happens in the event that no candidate has the number of electoral college votes needed to become president (currently 270 out of 538):
...if no person have such majority [of Electoral votes], then from the persons having the highest numbers not exceeding three on the list of those voted for as President, the House of Representatives shall choose immediately, by ballot, the President.
[...]
if no person have a majority [of Electoral votes], then from the two highest numbers on the list, the Senate shall choose the Vice-President...
I could imagine a situation in which the House of Representatives and Senate are controlled by different parties (e.g. House controlled by Republicans, Senate by Democrats) and they would vote for the candidate that aligns with their own parties. Would this mean that it is possible to have a President and Vice President from different parties, and different tickets, being elected?* Or does something prevent this possibility?
* To give an example, had the 2008 election gone differently, could we have had a President Obama and Vice President Palin?