Issue
I'm trying to apply styles for Menu class. However, when I'm writing some CSS properties to the menu the styles are not applying. How to select the exact CSS class div inside another div that to div inside header like this code below
<section class="showcase">
<header>
<img src="assets/images/logov2.png" alt="company-Logo" style="width:160px;height:20px;">
<div class="menu">
<ul>
<li><a href="#">How it works</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="Access">
Get Early Access
</div>
</header>
</section>
Solution
Just use the tag header as the start point to reach other selectors.
header>img {
height: 220px;
width: 300px;
}
header>.menu {
background-color: red;
}
header>.Access {
padding: 10px;
background-color: yellow;
}
<section class="showcase">
<header>
<img src="https://images.unsplash.com/photo-1554232456-8727aae0cfa4?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=735&q=80" alt="company-Logo">
<div class="menu">
<ul>
<li><a href="#">How it works</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Team</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="Access">
Get Early Access
</div>
</header>
</section>
Answered By - manjiro sano
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.