Site logo

Archived topic

How to style html code that is inside page sections

3 replies · Started by g_younes on August 10, 2019

Viewing posts 1–4 of 4

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.

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.

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

Easily done :) Glad to be of help.

This archived topic is closed to new replies.