قسم التواصل
جزء من قسم Styling with CSS في رحلة HTML على Coddy — الدرس 70 من 76.
التحدي
سهلفي هذه المهمة، ستقوم بوضع الجدول الذي يحتوي على معلومات الاتصال في منتصف قسم .contact.
استخدم تقنيات التخطيط لضمان وضع الجدول بشكل جيد وجذاب بصرياً. اتبع الخطوات التالية:
- اكتب قاعدة CSS تستهدف عنصر
<section>الذي يحمل الفئة.contact. - اضبط خاصية
displayالخاصة به علىflexلتمكين التموضع المرن للعناصر التابعة. - استخدم
flex-direction: columnلترتيب العناصر عمودياً. - قم بتطبيق
align-items: centerلتوسيط المحتوى أفقياً. - حدد
min-heightبقيمة30vhلضمان مساحة كافية للمحتوى.
جرّب بنفسك
<html>
<head>
<title>Swim with Whales in Tonga</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<nav class="menu">
<a href="#about">About</a>
<a href="#experience">Experience</a>
<a href="#contact">Contact</a>
</nav>
<header class="welcome">
<h1>Swim with Whales in Tonga</h1>
<p>Experience the magic of swimming alongside majestic humpback whales.</p>
</header>
<section class="about">
<h2>About Tonga</h2>
<img src="https://upload.wikimedia.org/wikipedia/commons/8/88/Hawaiian_Islands_Humpback_Whale_National_Marine_Sanctuary_breaching_2018.png">
<p>Tonga is a stunning Polynesian archipelago in the South Pacific, famous for its crystal-clear waters and vibrant marine life. From July to October, humpback whales migrate here to breed, offering a rare chance to swim with these gentle giants. Beyond whale encounters, Tonga boasts pristine beaches, lush tropical landscapes, and a rich cultural heritage. Visitors can explore traditional villages, experience authentic Tongan hospitality, and enjoy activities like snorkeling, diving, and sailing. Whether you're seeking adventure or relaxation, Tonga provides an unforgettable escape into nature’s beauty.</p>
</section>
<section class="contact">
<h2>Plan Your Adventure</h2>
<table>
<tr>
<td>Phone Number</td>
<td>+676 123 4567</td>
</tr>
<tr>
<td>Email</td>
<td>info@tongawhales.com</td>
</tr>
</table>
</section>
</body>
</html>جميع دروس Styling with CSS
4أساسيات النصوص
لون النصعائلة الخطحجم الخطسمك الخطمحاذاة النصزخرفة النصتحدي المراجعة رقم 1تحدي المراجعة رقم 27نموذج الصندوق - الجزء الأول
ما هو نموذج الصندوق؟المسافات الداخلية (Padding)الهوامش (Margins)الحدود (Borders)العرض والارتفاعتحدي المراجعة8نموذج الصندوق (Box Model) - الجزء الثاني
تحجيم الصندوق (Box Sizing)حواف العناصر (Border Radius)التدفق الزائد (Overflow)ظل الصندوق (Box Shadow)تحدي المراجعة