I am currently working with a child theme based on "freestore". ()
My goal is to insert custom content into one of my pages using basic HTML and CSS. Although I have successfully made changes to the CSS styles within the theme's style.css file, I am facing issues when trying to add my own HTML along with CSS for styling purposes.
After creating a page named 'home' and inserting my HTML code through the WordPress tinymce text editor, I encountered difficulties applying the CSS from my style.css file. Inline styling does work, but I prefer external stylesheets for better organization.
For instance, in the WordPress text editor, I would include the following line:
<div id="cssTest">TEXT</div>
To style this element in my style.css file, I would write:
#cssTest {
background-color: red;
}
However, the CSS rules are not being applied. On the other hand, adding inline styles directly in the HTML editor works smoothly:
<div id="cssTest" style="background-color: red;">TEXT</div>
My question is as follows:
- How can I ensure that my styles are applied using an external stylesheet?
- Is it advisable to create a custom template for the page and insert the HTML there instead?