• Resolved khit

    (@khittner)


    Very new to this. If I am in wrong forum, I apologize.

    When I use css in my customizer its taking one code and not another. Please see, below. I know I had it working, before using the first example, below.

    My css code:
    a { color: red; }
    is not working in customizer

    I have to use:
    a:link { color: red;}

    What am I doing wrong?

    Also, can anyone tell me if you can change the style attributes of a shortcode? I need to change the box outline so it is more visible on my page. If so, can you please tell me exactly how to do this?

    Example shortcode for a search box:
    [pdb_search]

    Thanks so much for your time and any assistance!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter khit

    (@khittner)

    Any shortcode, actually. Not just the example. Thanks

    Hello!

    You can just use a:link {color: red;} if it works. Otherwise, use a {color: red !important;}.

    Regarding the shortcode: Shortcodes enable pieces of code on your page, therefore you need to check the code and find out the CSS classes to make changes. It’s not so easy if you’re a beginner, unfortunately.

    Or, in some cases, the developers allow users to add certain styles inside the shortcode itself. Check the plugin’s documentation and see if you can find out more info.

    Thread Starter khit

    (@khittner)

    Thank you, Radu.

    I think the reason you need to do these things requires more explanation. When writing CSS you need to understand how the browser choose which rules to apply. The way the browser decides which styles to apply is based on the rule’s specifictity. Visit that link to learn more, but essentially there are 2 main things that determine whether a CSS rule is applied:

    1. Which order the CSS rules are written in. Later rules take priority.
    2. How many classes and IDs are used in the rule. Rules with more classes (or IDs and attributes) take priority, even over later rules.
    Thread Starter khit

    (@khittner)

    Thank you, Mr. Peattie. I will review link provided.

    Thread Starter khit

    (@khittner)

    UPDATE: for anyone reading this thread that is new like me….

    xn*au webdesign provided their article, link below, and within 15 minutes of reading I was able to change the background color of the articles needed, and the search text box background and outline of the shortcode in my page to EXACTLY what I wanted!! These guys ROCK!!

    https://xnau.com/simple-css-techniques-for-wordpress-part-1/

    Thank you to the developer of the Participants Database Plugin!!!!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘css customizer and shortcode attributes’ is closed to new replies.