There isn't a strict Petra dress code as such. It's the biggest tourist attraction in Jordan, so people pretty much wear what they like when they visit Petra, However, bear in mind that the site of Petra is huge, so be prepared to do a lot of walking.