CMOS inverter with feedback
Diverger - I recommend to study the V(in)-V(out) transfer characteristic to be found in the relevant CMOS data sheets. As you will see - the output voltage will be at Vdd/2 in case the input also is Vdd/2. Because the transfer curve of the inverter has a negative slope (rising input causes falling output) you can find a stable operating point at V(in)=V(out). This can be simply accomplished using a large feedback resistor Rf between output and input (Rf should be "large" with respect to the overall input resistance of the circuit). 

If you are going to use the CMOS device as an analog amplifier you need an input coupling capacitor to separate dc and ac. The gain is relatively large - however, determined by the slope of the transfer curve which has large tolerances and uncertainties. Thus, it is recommended to use signal feedback using a series resistor between signal source and the input capacitor. This reduces the gain, but stabilizes the gain value against CMOS tolerances.