# Problem with Relational Selectors

**URL:** https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343
**Category:** HTML/CSS
**Created:** [April 22, 2021, 9:06am UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343 "2021-04-22T09:06:34Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![AraAlex14](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@AraAlex14](https://forum.codewithmosh.com/u/AraAlex14)
#### Post date: [April 22, 2021, 9:06am UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/1 "2021-04-22T09:06:34Z")

</div>

Hi there! I have a little problem about the relational selectors in css part of this course. When I generate section#products in index.html and then I go to style.css and I type:" #products p { color:orange;} " doesn’t works on the chrome… my writing is all black instead of orange :((( please help me . I dont’t know what to do. Thanks for the help in advance.

---

<div class="post-metadata">

### Author: ![SAM](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/sam/32/167_2.png) [@SAM](https://forum.codewithmosh.com/u/SAM)
#### Post date: [April 22, 2021, 4:10pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/2 "2021-04-22T16:10:05Z")

</div>

Compare your code with Mosh’s. Or share your code if you can’t solve the issue yourself.

---

<div class="post-metadata">

### Author: ![AraAlex14](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@AraAlex14](https://forum.codewithmosh.com/u/AraAlex14)
#### Post date: [April 26, 2021, 6:31am UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/3 "2021-04-26T06:31:38Z")

</div>

I solved the problem, thank you!

---

<div class="post-metadata">

### Author: ![addesign1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/addesign1/32/1595_2.png) [@addesign1](https://forum.codewithmosh.com/u/addesign1)
#### Post date: [June 2, 2021, 10:17pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/4 "2021-06-02T22:17:00Z")

</div>

I am having the same trouble right now. All my code is exactly the same. I have restarted all the programs/extensions and even my computer just in case. HELP! 🙂

My Code on the html doc:

Lorem ipsum dolor sit amet.

My code on style sheet:  
body {  
margin: 10px;  
}

#products p {  
color: orange;  
}

---

<div class="post-metadata">

### Author: ![rissathaigirl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/rissathaigirl/32/1818_2.png) [@rissathaigirl](https://forum.codewithmosh.com/u/rissathaigirl)
#### Post date: [June 23, 2021, 10:27pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/5 "2021-06-23T22:27:42Z")

</div>

Hi, how did you solve your problem as I am having the same issue. Thanks!

---

<div class="post-metadata">

### Author: ![level1cr3](https://avatars.discourse-cdn.com/v4/letter/l/82dd89/32.png) [@level1cr3](https://forum.codewithmosh.com/u/level1cr3)
#### Post date: [June 27, 2021, 6:32am UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/6 "2021-06-27T06:32:07Z")

</div>

Check if your stylesheet is linked with html document using link tag.

check if the class or id name are same on both CSS file and html file.

---

<div class="post-metadata">

### Author: ![rissathaigirl](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/rissathaigirl/32/1818_2.png) [@rissathaigirl](https://forum.codewithmosh.com/u/rissathaigirl)
#### Post date: [July 3, 2021, 3:49pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/7 "2021-07-03T15:49:31Z")

</div>

Thank you so much that helped!

---

<div class="post-metadata">

### Author: ![Boroho](https://avatars.discourse-cdn.com/v4/letter/b/e8c25b/32.png) [@Boroho](https://forum.codewithmosh.com/u/Boroho)
#### Post date: [December 1, 2021, 10:09pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/8 "2021-12-01T22:09:54Z")

</div>

Having the same problem  
 ![Css Style](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/9/9d461aacfd9aea6c4ccaf1fb68e5ebe322aaf52a.png)

I think here is all correct, or I’m missing something?  
When i try to user the #product is all good when i need to details with the ‘‘p’’ it consider it as the name of the category

---

<div class="post-metadata">

### Author: ![Boroho](https://avatars.discourse-cdn.com/v4/letter/b/e8c25b/32.png) [@Boroho](https://forum.codewithmosh.com/u/Boroho)
#### Post date: [December 1, 2021, 10:13pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/9 "2021-12-01T22:13:25Z")

</div>

Is all linked to the CSS file

 ![CSS issue](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/d/dab358f70b809b4c7622336e1177256083ae812f.png)

---

<div class="post-metadata">

### Author: ![Boroho](https://avatars.discourse-cdn.com/v4/letter/b/e8c25b/32.png) [@Boroho](https://forum.codewithmosh.com/u/Boroho)
#### Post date: [December 1, 2021, 10:41pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/10 "2021-12-01T22:41:06Z")

</div>

Hello, For anyone who will have my same problem, i solved checking where the ‘‘p’’ was included 😃  
 ![Cattura](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/0/04988c141329187f0edf7ba4b9e4315be262a67f.png)

Just with patient we can find the problem 😃

---

<div class="post-metadata">

### Author: ![AraAlex14](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@AraAlex14](https://forum.codewithmosh.com/u/AraAlex14)
#### Post date: [December 23, 2021, 8:09pm UTC](https://forum.codewithmosh.com/t/problem-with-relational-selectors/4343/11 "2021-12-23T20:09:59Z")

</div>

I m glad that you solve the problem!!
