تسليم حلول: مهمة تمميز الرابط الفّعال

مهمة تميز الرابط الفعال

كود HTML للصفحة home جزئية ال nav

<nav>
        <ul class="navbar">
            <li class="active"><a href="#">home</a></li>
            <li><a href="product.html">product</a></li>
            <li><a href="#">women</a></li>
            <li><a href="#">men</a></li>
            <li><a href="#">kids</a></li>
            <li><a href="#">more</a></li>
        </ul>
    </nav>

كود HTML للصفحة productجزئية ال nav

        <ul class="navbar">
            <li><a href="index.html">home</a></li>
            <li class="active"><a href="#">product</a></li>
            <li><a href="#">women</a></li>
            <li><a href="#">men</a></li>
            <li><a href="#">kids</a></li>
            <li><a href="#">more</a></li>
        </ul>
    </nav>

كود CSS جزئية الactive

.active a{

    background-color: #222;
    color: white;
}
2 Likes

مرحباً :crescent_moon::crescent_moon:

            <nav>
                <ul class="navbar">
                    <li><a href="#" class="active">home</a></li>
                    <li><a href="#">featured</a></li>
                    <li><a href="#">women</a></li>
                    <li><a href="#">men</a></li>
                    <li><a href="#">kids</a></li>
                    <li><a href="#">more</a></li>
                </ul>
            </nav>

.navbar a:hover,
.active{
    border-bottom: 1px solid #999;
}

1 Like

@hamzaabueyada @Wan

You are doing great

2 Likes

HTML

            <h1><a href="index.html">STORE</a></h1>
            <nav>
                <ul class="navbar">
                    <li><a href="#">home</a></li>
                    <li><a href="#">featured</a></li>
                    <li><a href="#">women</a></li>
                    <li><a href="#">men</a></li>
                    <li><a href="#">kids</a></li>
                    <li><a href="#">more</a></li>
                </ul>
            </nav>
        </header>

css

.navbar {
    list-style: none;
    text-align: center;
    border-bottom: 1px dashed #ccc;
}
.navbar li {
    display: inline-block;
}
.navbar a {
    display: block;
    padding: 0 20px;
    text-decoration: none;
    text-transform: capitalize;
    font-size: 18px;
    color: #222;
    line-height: 50px;
    transition-duration: 0.5s;
}
.navbar a:hover {
    color: #fff;
    background-color: #191919;  
}
3 Likes

هلا أحمد، في حلك قمت بعمل النافبار والتنسيقات الخاصة به ولم تقم بتمميز الرابط الفعال. قم بمراجعة المهمة وإذا واجهتك أي مشكلة اخبرني

شكرا اخي الكريم

1 Like

مرحباّ :crescent_moon:
اسمحو لي بمشاركة اخرى بالكولكشن كامل :hatched_chick::baby_chick::baby_chick:

html

            <nav>
                <ul class="navbar">
                    <li><a href="#" class="active">home</a></li>
                    <li><a href="#">featured</a></li>
                    <li><a href="#">women</a></li>
                    <li><a href="#">men</a></li>
                    <li><a href="#">kids</a></li>
                    <li><a href="#">more</a></li>
                </ul>
            </nav>

css1

.navbar a:hover,
.active{
    border-bottom: 1px solid #999;
}


css2

.navbar a:hover,
.active{
    background-color: #222;
    color: #fff !important;
}


css3

.navbar a:hover,
.active{
    background-color: #fcfcfc;
    font-weight: 700;
}

2 Likes

شكرا على المساعدة

1 Like

html

        <header>
           <h1>STORE</h1>
            <nav>
                <ul class="navbar">
                    <li><a href="index.html" class="active">home</a></li>
                    <li><a href="#">featured</a></li>
                    <li><a href="#">women</a></li>
                    <li><a href="#">men</a></li>
                    <li><a href="products.html">kids</a></li>
                    <li><a href="#">more</a></li>
                </ul>
            </nav>
        </header>

css

.navbar {
    list-style: none;
    text-align: center;
    border-bottom: 1px dashed#ccc;
}
.navbar li {
    display: inline-block;
}
.navbar a {
    display: block;
    padding: 0 20px;
    text-decoration: none;
    text-transform: capitalize;
    font-size: 18px;
    color: #222;
    line-height: 50px;
    transition-duration: 0.5s;
}
.navbar a:hover, .active {
    color: #fff !important;
    background-color: #222;
}
1 Like

هل توجد مشكيل ليش ميسمحلي مواصلة فصل الدراسي

1 Like

رائع مروان أحييك على هذه الروح :+1:

1 Like

الأن ممتاز يا أحمد مية مية :ok_hand:

هل تواجهك أي مشكلة؟

نعم أريد أن اوصيل فصل الدراسي

1 Like

راسلني بالمشكلة التي تظهر لك وسيتم حلها

1 Like
<!DOCTYPE html>
<html>
 <head>
 
   <meta charset="utf-8">
   
   <meta name="viewport" content="width=device-width, initial-scale=1.0">
   
   <title>Store</title>
   
   <link href="https://fonts.googleapis.com/css?family=Domine|Questrial&display=swap" rel="stylesheet">
  
   <link rel="stylesheet" href="Css/Style.css">
   
     
     
  
 </head>
 
 <body>
 
	<header>
	
	  
	  
	   <h1><a href="index.html">STORE</a></h1>
	  
	   <nav>
	     <ul class="navbar">
	  
	      <li><a href="index.html" class="active">home</a></li>
	      <li><a href="featured.html">featured</a></li>
	      <li><a href="women.html">women</a></li>
	      <li><a href="men.html">men</a></li>
	      <li><a href="kids.html">kids</a></li>
	      <li><a href="more.html">more</a></li>
	    
	     </ul>
	  </nav>
	
	</header>
	
	
	
	<main>
	
	  <h2>Featured Products</h2>
	  
	  <p>Refresh your look with pieces of our collection </p>
	  
	  <div>
	  
	  	
	     <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img1.jpg">
	  
	     <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img2.jpg">
	  
	     <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img3.jpg">
	  
	     <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img4.jpg">
	  
	     <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img5.jpg">
	  
	     <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img6.jpg">
	 
	  
	  </div>
	  
	  <a href="Products.html">More products</a>
	  
	</main>
	
	<footer>
	  <p>&copy;All Rights Reserved</p>
	</footer>
 </body>
</html>
 
body{
      	
       margin:0;
       font-family: 'Questrial', sans-serif;
      	 
      }
      
      
header{
      	
       height:80px;
    
      }
      
header h1{
      	
        margin:0;
        font-family: 'Domine', serif;
        text-align:center;
        font-size:24px;
        line-height:80px;
        letter-spacing:6px;
         
      }
      
header h1 a{
      	
      color:#222;
      text-decoration:none;
      
      }
      
.navbar {
	
	list-style:none;
	margin:0;
	padding:0;
	border-top:1px dotted #ccc;
	border-bottom:1px dotted #ccc;
	text-align:center;
	height:50p;
	
} 

.navbar li{
	
  display:inline-block;
  

  
}

.navbar a{
	
	 display:block;
	 text-decoration:none;
	 padding:0 20px;
	 color:#666;
	 line-height:50px;
	 text-transform:capitalize;
	 font-family: 'Domine', serif;
	 transition-dration:.4s;
}

.navbar a:hover,
.active {
	
      background-color:#222;
      color:#fff;
}
   
main{
      	
      	
      max-width:960px;
      text-align:center;
      margin:110px auto 0 auto;
      	
      }
      
main h2{
      	
       font-size:30px;
       font-weight:normal;
       margin:0;
      	
      }
      
main p{
       	
       font-size:18px;
       color:#999;
       	
       
       }
       
main div{
       	
       	
       margin:60px 0 60px 0;
       	
       }
       
       
main img{
       	
       margin:10px;
       width:100%;
       max-width:290px;
       height:100%;
       max-height:335px;
       box-sizing:border-box;
       transition-duration:.4;
       	
       	
       
       }
       
       
main img:hover{
	
       	
       padding:20px;
       background-color:#ddd;
       	
       	
       }
      	
      	
main a{
      	
      
      text-decoration:none;
      color:#666;
      width:160px;
      height:45px;
      display:block;
      line-height:45px;
      font-size:18px;
      border:2px solid #ccc;
      margin:0px auto 0 auto;
      transition-dration:.4s;
      
      }
      
main a:hover{
      	
      background-color:#222;
      color:#fff;
      border-color:#222;
      
      }
      
      
footer{
      	
      background-color:#222;
      height:50px;
      margin-top:80px;
      color:#999;
      text-align:center;
      line-height:50px;

      	
      }
    
 

تـظـهـر عـنـدي مـشـكـلـتـيـن لـون الـخـط فـي الـرابـط الـمـمـيـز لا يتـغـيـر . الأهـتزاز عـنـد الـتـنـقـل يـظـهـر رغـم أنـي أعـطيـت ال navbar أرتفاع ثـابت 50p !!!

3 Likes

عمل جميل فاتن :grin:، ركزي أنه الإرتفاع الذي جبتيه للـ navbar كتبتي فيه الوحدة p وليس px صلحيها.

الشئ الثاني أصلحي الـ transition-dration:.4s في حيث أن dration ناقصها حرف الـ u لتكون هكذا duration.

اما في القاعدة main img نسيتي أيضاً إضافة الوحدة s للخاصية transition-duration: .4;

لـون الـخـط فـي الـرابـط الـمـمـيـز لا يتـغـيـر

هذه المشكلة راح نناقشها في درس تالي

1 Like

:astonished::sweat_smile::sweat_smile: يـسـلـممواا …

1 Like

ملف html

<!DOCTYPE html>
<html>
    <head><link rel="stylesheet" href="normalize.css">
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>STORE</title>
        <link href="https://fonts.googleapis.com/css?family=Domine|Questrial" rel="stylesheet">
        <link rel="stylesheet" href="style.css">
    </head>
    <body>
        
        <header>
            <h1>
                <a href="index.html">STORE</a>
            </h1>
        </header>
        <nav>
                <ul class="navbar">
                    <li><a href="index.html" class="active">home</a></li>
                    <li><a href="#">featured</a></li>
                    <li><a href="#">women</a></li>
                    <li><a href="#">men</a></li>
                    <li><a href="#">kids</a></li>
                    <li><a href="#">more</a></li>
                </ul>
            </nav>
        <main>
            <h2>Featured Products</h2>
            <p>Refresh your look with pieces of our collection</p>
            <div>
                <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img1.jpg">
                <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img2.jpg">
                <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img3.jpg">
                <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img4.jpg">
                <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img5.jpg">
                <img src="https://demos.coretabs.net/frontend-basics-workshop/img/img6.jpg">
            </div>
            <a href="products.html">More Products</a>
        </main>
        <footer>
            <p>&copy; 2018 All Rights Reserved</p>
        </footer>
    </body>
</html>

ملف css

.navbar{
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    border-bottom: 1px dotted #ccc;
    border-top: 1px dotted #ccc;

    

}
.navbar li{
    display: inline-block;
    
}
.navbar a{
    display: block;
    padding: 0 50;
    width: 100px;
    text-decoration: none;
    text-transform: capitalize;
    color: #666;
    font-family: 'Domine', serif;
    line-height: 50px;
    transition-duration: .4s;

    
}
.navbar a:hover, .active {
    background-color: rgb(199, 193, 193);
    color: #fff;

}

body{
    margin: 0;
    font-family: 'Questrial', sans-serif;
}
header{
    height: 80px;
    border-bottom: 1px dotted #ccc;
}
header h1{
    text-align: center;
    font-family: 'Domine', serif;
    font-size: 24px;
    letter-spacing: 6px;
    line-height: 80px;
    margin: 0;
}
header h1 a{
    color: #222;
    text-decoration: none;
}
main {
    max-width: 960px;
    text-align: center;
    margin: 90px auto 90px auto;
}
main h2{
    font-size: 30px;
    font-weight: normal;
    margin: 0;
}
main p{
    color: #999;
    font-size: 18px;
}
main div{
    margin: 60px 0 60px 0;
}
main img{
    margin: 10px;
    width: 290px;
    height: 335px;
    box-sizing: border-box;
    transition-duration: .4s;
}
main img:hover{
    padding: 20px;
    background-color: #ddd;
}
main a{
    width: 160px;
    height: 45px;
    display: block;
    margin: 0 auto 0 auto;
    line-height: 45px;
    text-decoration: none;
    font-size: 18px;
    border: 2px solid #ccc;
    color: #666;
    transition-duration: .4s;
}
main a:hover{
    background-color: #222;
    color: #fff;
    border-color: #222;
}
footer{
    background-color: #222;
    height: 50px;
    color: #999;
    text-align: center;
    line-height: 50px;
}

1 Like