Title: Customizing Nameboxes with CSS
Last modified: February 12, 2020

---

# Customizing Nameboxes with CSS

 *  Resolved [dogeofshibe](https://wordpress.org/support/users/dogeofshibe/)
 * (@dogeofshibe)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/customizing-nameboxes-with-css/)
 * Hi Jeroen,
 * I read your FAQ and I understand that .name_directory_name_box refers to the 
   individual name boxes of the entries. However, I am having trouble with styling
   the font colours for each individual unique box entry. Take this site in your
   FAQ for example: [https://goutu.org/cuisine-alimentation/lexique-de-cuisine/](https://goutu.org/cuisine-alimentation/lexique-de-cuisine/)
   the first box says “Appareil
    Préparation servant de base à la confection d’une
   pâte.”
 * and the second box is
    ” Beurre en pommade Beurre ramolli jusqu’à prendre la 
   consistance d’une pommade.”
 * How do I make the first box RED and the second box BLUE for example?
    I tried
   using child selector in CSS to select there 2nd, 3rd child from the .name_directory_name_box
   element but it breaks whenever users search for the actual box since it takes
   the absolute child instead of changing the actual box in the database.
 * Sorry If im not clear enough, and also thanks it advance!
    Also just gave you
   some coffee money in donation for the wonderful widget (=
    -  This topic was modified 6 years, 3 months ago by [dogeofshibe](https://wordpress.org/support/users/dogeofshibe/).
    -  This topic was modified 6 years, 3 months ago by [dogeofshibe](https://wordpress.org/support/users/dogeofshibe/).
      Reason: Formatting for clarity

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

 *  Plugin Author [Jeroen Peters](https://wordpress.org/support/users/jeroenpeters1986/)
 * (@jeroenpeters1986)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/customizing-nameboxes-with-css/#post-12428661)
 * Hi [@dogeofshibe](https://wordpress.org/support/users/dogeofshibe/),
 * Thank you for your kind words and your donation. I am really glad that you did!
 * Just to check, you stated that you used CSS colors. Didn’t this work, or do you
   want every name to have their own color (no matter if a users searched).
 * Kind regards,
 * Jeroen Peters
 *  Thread Starter [dogeofshibe](https://wordpress.org/support/users/dogeofshibe/)
 * (@dogeofshibe)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/customizing-nameboxes-with-css/#post-12428930)
 * Hi,
 * The colouring worked, but however, what I want is exactly what you mentioned,
   for every name to have their own colour (no matter if the user is searched). 
   For example, I want the 1st listing to have red and if I typed in the first listing
   in the search box it will bring out the first listing that is red. If I coloured.
   name_directory_name_box red with CSS it will just repeat red for the entire directory.
 *  Plugin Author [Jeroen Peters](https://wordpress.org/support/users/jeroenpeters1986/)
 * (@jeroenpeters1986)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/customizing-nameboxes-with-css/#post-12429991)
 * Hi [@dogeofshibe](https://wordpress.org/support/users/dogeofshibe/) ,
 * thanks for your answer. At the moment, that is not possible without custom work.
   The classes are all automaticaaly named, but do not take any other parameters
   into account. The way I see it there should be an extra field per name where 
   you can set the class it needs to generate on the frontend.
 * If you know PHP this could be a nice thing to create yourself. The source is 
   free to use. I can do it too if you need it for a commercial project. But the
   feature would be too specific for use in this version of Name Directory. I like
   to keep it a simple plugin and the current version seems to suit people very 
   well.
 * I’m sorry I don’t have a better answer for you. Let me know if you have any other
   questions offcourse!
 * Kind regards,
 * Jeroen Peters

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

The topic ‘Customizing Nameboxes with CSS’ is closed to new replies.

 * ![](https://ps.w.org/name-directory/assets/icon-128x128.png?rev=1008185)
 * [Name Directory](https://wordpress.org/plugins/name-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/name-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/name-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/name-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/name-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/name-directory/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jeroen Peters](https://wordpress.org/support/users/jeroenpeters1986/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/customizing-nameboxes-with-css/#post-12429991)
 * Status: resolved