Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] TARGET P TAG WITHIN SPECIFIC DIV

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #152010
    hendrix940
    Participant

    I know this is extremely simple, but I can’t get it right. I’m trying to target all p tags within a Div Class called bigContact … guys, how do I write this please? I’m confused if I should use a # or a . or nothing at all.

    Thank you!!

    #152011
    Paulie_D
    Moderator

    If the div has an ID of bigContact it’s

    #bigContact p {
    your styles;
    }
    

    If the div has an class of bigContact it’s

    .bigContact p {
    your styles;
    }
    

    Note you would normally have some basic styles that apply to all p tags somewhere in your stylesheet. You should only use the above to change or add specific styles, not repeat those that already apply.

    #152033
    hendrix940
    Participant

    Very good! Thank you sir!!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.