File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 54
54
* [ شناور کردن تگ ها] ( #شناور-کردن-تگ-ها )
55
55
* [ وضوح] ( #وضوح )
56
56
* [ سایه] ( #سایه )
57
+ * [ وسط قرار دادن تگ ها] ( #وسط-صفحه-قرار-دادن-تگ-ها )
57
58
58
59
## مقدمه
59
60
@@ -1720,5 +1721,37 @@ img{
1720
1721
1721
1722
برای ساخت راحت box-shadow می توانید داخل نت سرچ کنید [ box shadow generator] ( https://www.google.com/search?q=box+shadow+generator )
1722
1723
1724
+ ## وسط صفحه قرار دادن تگ ها
1725
+
1726
+ قرار دادن المان بلاکی در وسط صفحه
1727
+
1728
+ 1 . عرض المان را مشخص می کنیم.
1729
+ 2 . بهش خصیصه margin: auto قرار می دهیم.
1730
+
1731
+ ``` css
1732
+ div {
1733
+ width : 200px ;
1734
+ margin : auto ;
1735
+ }
1736
+ ```
1737
+
1738
+ برای وسط قرار دادن متن از text-align: center استفاده می کنیم.
1739
+
1740
+ وسط قرار دادن المان inline
1741
+
1742
+ 1 . عرض المان را مشخص می کنیم.
1743
+ 2 . بهش خصیصه margin: auto قرار می دهیم.
1744
+ 3 . و مقدار را مساوی display: block قرار می دهیم.
1745
+
1746
+ ``` css
1747
+ span {
1748
+ width : 300px ;
1749
+ margin : auto ;
1750
+ display : block ;
1751
+ }
1752
+ ```
1753
+
1754
+ راه دیگر برای کار فوق دادن text-align: center به تگ پدر است.
1755
+
1723
1756
1724
1757
</div >
You can’t perform that action at this time.
0 commit comments