You'll have to either staple or glue the carpet down or use Tackless Strips to affix the carpet properly. You'll want to roll or fold the edge so a vacuum doesn't pull out the carpet from the edge. The roll or fold will be your padding there, so don't put padding under the edge.