Title: css customizer and shortcode attributes
Last modified: September 8, 2018

---

# css customizer and shortcode attributes

 *  Resolved [khit](https://wordpress.org/support/users/khittner/)
 * (@khittner)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/)
 * 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](https://wordpress.org/support/users/khittner/)
 * (@khittner)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10668571)
 * Any shortcode, actually. Not just the example. Thanks
 *  [Radu](https://wordpress.org/support/users/broseph/)
 * (@broseph)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10668600)
 * 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](https://wordpress.org/support/users/khittner/)
 * (@khittner)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10669109)
 * Thank you, Radu.
 *  [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10669484)
 * 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_](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity).
   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](https://wordpress.org/support/users/khittner/)
 * (@khittner)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10669629)
 * Thank you, Mr. Peattie. I will review link provided.
 *  Thread Starter [khit](https://wordpress.org/support/users/khittner/)
 * (@khittner)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10670307)
 * 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/](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.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [khit](https://wordpress.org/support/users/khittner/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/css-customizer-and-shortcode-attributes/#post-10670307)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
