The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Span inside div inside class?
HTMLMAL
post Mar 16 2020, 06:07 PM
Post #1





Group: Members
Posts: 4
Joined: 16-March 20
Member No.: 27,237



Hello,

can someone kindly help me with this html topic i am kind of in a crunch. the tag reads

any span that is inside a div whose class is rainbows that is inside an element whose class is weather would that be weather div.classspan???

or any paragraph whose id is watermelons that is inside an element whose class is fruits would that be .fruits p #watermelons??


Thank you so much
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 16 2020, 06:57 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



Hello!

QUOTE(HTMLMAL @ Mar 17 2020, 12:07 AM) *

any span that is inside a div whose class is rainbows that is inside an element whose class is weather

That should be:

CODE
.weather div.rainbows span


QUOTE
would that be weather div.classspan???

No, that selects for a DIV element with the CLASS "classspan".

QUOTE
or any paragraph whose id is watermelons that is inside an element whose class is fruits

That should be:

CODE
.fruits p#watermelons

...note that there's no space between the P and # characters.

QUOTE
would that be .fruits p #watermelons??

Not with a space between P and #watermelons. The space makes #watermelons the ID of another element inside the P element.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 16 2020, 07:03 PM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



This reminds me of SelectOracle. biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 17 2020, 06:50 AM
Post #4


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Mar 17 2020, 01:03 AM) *

This reminds me of SelectOracle. biggrin.gif

Can barely remember, was that some kind of web site that explained selectors?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 17 2020, 07:44 AM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



Yes. You could enter a complex selector and it explained it exactly like that. I didn't know it was gone, but it is. But quite recently it seems.
https://web.archive.org/web/20160302043715/...m/selectoracle/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HTMLMAL
post Mar 17 2020, 08:07 PM
Post #6





Group: Members
Posts: 4
Joined: 16-March 20
Member No.: 27,237



QUOTE(Christian J @ Mar 16 2020, 07:57 PM) *

Hello!

QUOTE(HTMLMAL @ Mar 17 2020, 12:07 AM) *

any span that is inside a div whose class is rainbows that is inside an element whose class is weather

That should be:

CODE
.weather div.rainbows span


QUOTE
would that be weather div.classspan???

No, that selects for a DIV element with the CLASS "classspan".

QUOTE
or any paragraph whose id is watermelons that is inside an element whose class is fruits

That should be:

CODE
.fruits p#watermelons

...note that there's no space between the P and # characters.

QUOTE
would that be .fruits p #watermelons??

Not with a space between P and #watermelons. The space makes #watermelons the ID of another element inside the P element.


smile.gif thank you so so muchhh
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 06:48 PM