I don't know if it is something that is suppose to happen but if you take string and place it on the ground and then you can place carpet on top of the string you can also do it with Redstone. Also you can use water to wash out the Redstone or string that under the carpet and the carpet will still float there without popping off until the water disappears from underneath it. So as long as there is water under the carpet it will just float.
1) place Redstone or string on the ground
2)place carpet on top of it
3)place water to wash out Redstone or string and the carpet will float there until water is gone from underneath it.