If you want to use external CSS to target one word, then you need to use additional HTML to target that word – for example:
This is the <span class="myword">word</span> to change.
CSS:
.myword {
color: red;
font-weight: bold;
}
so any which way, I would hav to hardcode into html file.
My concern is updates and so on, I do back up but I have always tried to do eveything with my child theme.
Not sure if I can code html with the style.css? Maybe a stupid question, not sure.
is there not a first word syntax like we use the first-letter to style?
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Your content is not lost in any update, child theme or not.
No you cannot put HTML in a style.css file. In the example above, the first part goes in the content, the second in your child theme style.css file.
I assumed you wanted to style text that you are entering as content. If that’s not the case, please be more specific.
thanks Andrew – so I HAVE to hardcode and remeber changes incase of updates later on?
Please confirm.
What are you changing? Content is not lost upon update.
I assume it is content.
Scenario is this: Widget text has “Hello blau blau de blau” in it.
I want HELLO to be in white and a differnt font and the rest in blackand defualt font.
Just to confirm – your suggestion is then correct for this scenario.
Out of interest is there not a plug in that can do this kind of styling in widgets? Lightbulb moment!!!
Yes, if you are adding it in the dashboard to a widget, it won’t be lost upon updating.
Check these out:
http://wordpress.org/extend/plugins/ultimate-tinymce/
http://wordpress.org/extend/plugins/tinymce-advanced/
thanks WP – I have a look, might be a big time saver overall.
appreciate the time and experience yo give to us novice learners.
Plugins look amazing – great for page and post styling, need to just qualify if it will work with test widgets.