--- id: 587d78a3367417b2b2512ad0 title: Center an Element Horizontally Using the margin Property challengeType: 0 videoUrl: '' localeTitle: توسيط عنصر أفقيًا باستخدام خاصية الهامش --- ## Description
أسلوب آخر لتحديد المواقع هو مركز عنصر كتلة أفقيا. إحدى الطرق للقيام بذلك هي تعيين margin الخاص به إلى قيمة تلقائي. هذه الطريقة تعمل للصور أيضا. الصور هي عناصر مضمنة افتراضيًا ، ولكن يمكن تغييرها لحظر العناصر عند تعيين خاصية display للحظر.
## Instructions
قم div على الصفحة بإضافة خاصية margin بقيمة تلقائية.
## Tests
```yml tests: - text: يجب أن يكون div margin على تلقائي. testString: 'assert(code.match(/margin:\s*?auto;/g), "The div should have a margin set to auto.");' ```
## Challenge Seed
```html
```
## Solution
```js // solution required ```