What holds the valves to the wall of veins?

Made that way. The inner lining of veins forms a continuous covering over the valves and the valve is attached all the way around the inside of the vein--360 degrees. In a real sense, the valves are actually part of the wall. Valves open and close as a passive result of blood going through the valve opening. Their movement responds to blood flow rather than causing it.