[Resolved] How to style html code that is inside page sections

Home Forums Support [Resolved] How to style html code that is inside page sections

Home Forums Support How to style html code that is inside page sections

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #980456
    g_younes

    Hello. I am building a homepage using sections. I am placing my HTML inside the text area in the sections (HTML is structured through divs with ids and classes). When I style those divs in the “Additional CSS” section in the customizer, the styles are not being applied.

    Am I doing something wrong? Should I try doing those sections through hooks instead?

    My only problem is the CSS styles are not being applied to my id elements, as though wordpress can’t see them.

    #980551
    David
    Staff
    Customer Support

    Hi there,

    when adding IDs to a HTML element you do not add the # e.g this:

    <div id="#my-id"> should be <div id="my-id">

    This applies to classes as well where you omit the . in the HTML.

    I would advise that you use classes instead of IDs to define your CSS.

    #980793
    g_younes

    Okay, I can’t believe I did that mistake. Thank you! It was just a code problem.

    #980799
    David
    Staff
    Customer Support

    Easily done 🙂 Glad to be of help.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.