i want to know the difference between border and margin and padding
and there is any way to help me in make calculation to these border
thankx
i want to know the difference between border and margin and padding
and there is any way to help me in make calculation to these border
thankx
border ستقوم بتحديد سماكة الاطار الخاص بالجدول. ياخذ قيمة عددية.
مثال
<table border=1> <tr> <td> <table border=3> <tr><td></td></tr> </table> </td> </tr> </table>
padding تتبع CSS, تستخدم للخلايا وتقوم بتحديد حجم الفراغ بين محتوى الخلية واطارها, قيمة عددية.
<table border=1> <tr> <td style="padding: 10px"> <table border=3> <tr><td></td></tr> </table> </td> </tr> </table>
لاحظي اني استخدمتها ضمن style css لاقوم بتخصيص العرض للخلية فقط, اما لو كنت اريد ان استخدم Padding مع خلايا الجدول كاملة فالتغيير يصبح بالشكل:
<table border=1 cellpadding="10"> <tr> <td> <table border=3> <tr><td></td></tr> </table> </td> </tr> </table>
نفس التاثير, لكن اضيفي خلايا اخرى وانظري الفرق.
margin تتبع CSS أيضا, تستخدم لتحديد البعد عن حد ما, كاطار خلية او النافذة للصفحة..
تقسم الى: margin-top / margin-bottom / margin-left / margin-right
يمكن استخدام كل واحدة على حدة او مجتمعة ضمن margin مباشرة..
بعض الامثلة
<style>td.at2000 {margin: 10px 5px 20px auto };</style>
<table margin="20">
<tr>
<td>
<table margin-top="5" margin-left="10">
<tr><td class="at2000">hello world</td></tr>
</table>
</td>
</tr>
</table>لو احتجت الى معلومات اكثر عن مثل هذه الوسوم tags, يمكنك مراجعة: http://www.w3schools.com
تم تعديل هذه المشاركة بواسطة Xacker في 11 سبتمبر 2006 في 05:26
Do as I say, not as I do
We are Anonymous. We are Legion. We don't forgive. We don't forget
شكرا جزيلا
هذا الموضوع مغلق.