- This topic has 5 replies, 2 voices, and was last updated 8 years, 5 months ago by
Andrew Misplon.
Tagged: css and id
- AuthorPosts
- November 24, 2016 at 5:51 pm #5546
Andrew MisplonKeymasterHi Nube
If you add a class name there must be no period, for example:
my-class-name
You can then target that class in your child stylesheet or Custom CSS plugin:
.my-class-name { color: red; }
If you use the CSS Styles field you must only write declarations (property and value) with no
;
. For example:color: red font-size: 20px
It’s easier to use class names and there will be a wider application. Using your browser’s code inspector is very important in the process, especially if your rules don’t take effect.
Hope this helps.
November 24, 2016 at 5:54 pm #5547
NubeParticipantok thanks, so the best way is to assign a name using the widget’class and then style it in the css file of the child theme, right? 🙂
November 24, 2016 at 5:56 pm #5548
Andrew MisplonKeymasterYes, that gives you the most flexibility and also a wide application. You can make a change in one place and have it impact many widgets/pages in the future.
November 24, 2016 at 5:58 pm #5549
NubeParticipantThanks 🙂
November 25, 2016 at 12:30 pm #5553
Andrew MisplonKeymasterFor sure.
- AuthorPosts
You must be logged in to reply to this topic.