I am using a child theme of "freestore". (https://en-gb.wordpress.org/themes/freestore/)
I am attempting to add some content to one of my pages using simple HTML and CSS. I've managed to successfully change CSS styles in the theme via the style.css, however I am trying to add my own HTML and then CSS to style it.
I have created the page 'home' and through the wordpress tinymce text editor I can add my HTML fine. When I try to add the CSS via my style.css, it doesn't apply the styles. I can however add the styles inline, but I would like to add the styles externally.
Example:
On the wordpress text editor I would add the line:
<div id="cssTest">TEXT</div>
In my style.css file I would add:
#cssTest {
background-color: red;
}
The CSS style is not applied. However adding the following to the HTML editor will work fine:
<div id="cssTest" style="background-color: red;">TEXT</div>
My question is either:
- How can I apply my styles via an external stylesheet?
- Should I be creating my own template for that page and adding the HTML there?
style.css. When the theme updates, it'll be reset to default. 2) from what I can see here, it should work. Hence, the issue is elsewhere. Does your stylesheet use@mediaqueries, or similar? If so, did you enter your class in the correct section of the stylesheet?style.cssmight be cached in your browser. Try a hard page refresh to rule that out.