

Get in touch

Download Plugin Now
  • Follow
  • Follow
WP Data Access
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
    • Tool Guide
    • App Builder
    • Data Explorer
    • SQL Query Builder
    • Plugin Settings
    • Legacy Tools
    • Remote Connections
a
M
M
  • Download
  • Support
  • Features
  • Pricing
  • Documentation
    • Tool Guide
    • App Builder
    • Data Explorer
    • SQL Query Builder
    • Plugin Settings
    • Legacy Tools
    • Remote Connections
Download Plugin Now

Legacy Tools

  • Deprecating in the near future

Tables

  • Getting Started
  • Creating and publishing
  • Responsive data tables
  • SEO friendly data tables
  • Adding hyperlinks
  • Extension Manager
  • Style Manager
  • Language settings
  • Styling
    • Style Manager
    • Premium styling
    • Global styling
    • Code Manager Styling
    • Manual styling
    • Styling issues
  • Filters
    • Static filters
    • Interactive filters
      • URL parameters
      • Search Panes
      • Search Builder
      • Search form
      • Advanced search
      • Geolocation search
  • Export & other buttons
    • Export to PDF, CSV, Excel, SQL
    • Print & copy buttons
    • Column selection buttons
    • Custom buttons
  • Advanced features
    • Advanced settings
    • Large tables & performance
    • Progressively SHOW MORE
    • Custom queries
    • Custom Post Types
    • Row grouping
    • Responsive master-detail
    • Master-detail tables
    • Non admin user access
  • Demos & tutorials
    • Demos
    • Tutorials

Forms

  • Data Projects
  • Projects and templates
  • Supported Data Types
  • One-To-Many relationships
  • Many-To-Many relationships
  • Registration page
  • Manage table options
  • Shortcode usage
  • Data Forms
    • Data Forms
    • Overview
    • Project Demo
    • Page Demo
  • Advanced features
    • Adding filters
    • Custom validation
    • Add less/more button
    • User roles
    • Managing roles and users
    • Advanced table options
    • Advanced lookups
    • Front-end toolbar
    • Transfer to other WP site
  • Demos & tutorials
    • Demos
    • Tutorials

Templates

  • Project Templates
  • Creating templates
  • Table Settings
  • Relationships
  • List Table
  • Data Entry
  • Reconcile

Designer

  • Getting started
  • Introduction
  • Basic mode

Dashboards

  • Getting started
  • Dashboards
  • Sharing dashboards
  • Dashboards Widgets
    • Dashboard Widgets
    • Publication Widget
    • Project Widget
    • Chart Widget
    • Custom Code Widget
    • Database Widget
    • Sharing Widgets

Charts

  • Chart Widget

Code

  • Shortcodes
    • Overview
    • wpdataaccess
    • wpdadataproject
    • wpdadataforms
    • wpdadiehard
    • wpdageomap
    • wpdawidget
  • Plugin Variables
    • Environment variables
  • Hooks & filters
    • Overview
    • Hooks
      • Overview
      • wpda_add_search_actions
      • wpda_add_search_filter
      • wpda_before_list_table
      • wpda_after_list_table
      • wpda_wpdataaccess_prepare
    • Filters
      • Overview
      • wpda_column_default
      • wpda_before_simple_form
      • wpda_after_simple_form
      • wpda_construct_where_clause
  • API
    • WP Data Access API
    • Remote database access
    • CRUD Example
    • Extensions
      • Alternative search algorithm
      • Alternative buttons extension
  • Code Manager
    • Overview
    • Write code
    • Share(d) code
View Categories

Manual styling

Manual styling and fine tuning is available for all styling types, free and premium, and can be used to overwrite and improve the css of a data table. Below are some styling examples. Please scroll down for a more detailed explaination of the data table structure, elements and selectors. A video tutorial “how to add custom css to a WordPress site” is available at the end of this page for users who are new to css styling with WordPress.

Examples #

Change font size for all data tables

.dataTables_wrapper { font-size: 14px; }

Change font size for a specific data table (id = 7, table name = customer)

#customer7_wrapper { font-size: 12px; }

Change font weight and color for column student_lastname

th.student_lastname, td.student_lastname {
	font-weight: 900;
	color: green;
}

Change alignment for numeric column salary (id = 8, table name = employee)

#employee8_wrapper th.salary, td.salary { text-align: right; }

Structure #

To style or fine tune data tables or specific data table elements, we first need to know the structure of a data table. The following image shows all free and premium elements a data table can have.

WP Data Access - Data Publisher - Extension Manager -Publication elements

Elements #

  1. Search Builder (premium)
  2. Search Panes (premium)
  3. Export and display buttons (premium)
  4. Page length
  5. Search box
  6. Processing text (only visible when a query is actually performed)
  7. Table
  8. Summary
  9. Pagination
Styling elements requires us to know the selectors for each element.

Selectors #

All data table elements are accessible through their classes. Most can also be accessed through their unique ID. The ID selector allows unique styling per data table. The ID is prefixed with the table name, id and an underscore.

Element ID Class
Publication table1_wrapper dataTables_wrapper
Search Builder dtsb-searchBuilder
Search Panes dtsp-panesContainer
Buttons dt-buttons
Page length table1_length dataTables_length
Search box table1_filter dataTables_filter
Processing text table1_processing dataTables_processing
Table table1 wpda-datatable dataTable
Summary table1_info dataTables_info
Pagination table1_paginate dataTables_paginate
Each table cell belongs to a certain table column. The column name is added to the cell as a class. This allows us to style each column separately.

Please use the inspector to examine data table element details for fine tuning.

Don’t know how to add custom CSS to your WordPress theme? #

It’s easy to learn in just a few minutes! Watch the video below…
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Still stuck? How can we help?

How can we help?

Updated on 2025-02-09
Code Manager StylingStyling issues

2 Comments

  1. Justin
    Justin on 2022-08-05 at 3:35 am

    Is it possible to add a conditional css where an entire row will be color red if the content IF one cell is equal to something

    Reply
    • Peter Schulz
      Peter Schulz on 2022-08-05 at 12:58 pm

      Yes, you can add conditional CSS to your tables! This requires some javascript knowledge and is explained here: https://wpdataaccess.com/docs/data-tables-advanced-features/advanced-settings/#javascript-functions-more-complex

      Let me know if you need help,
      Peter

      Reply

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • Examples
  • Structure
  • Elements
  • Selectors
  • Don't know how to add custom CSS to your WordPress theme?
WP Data Access
  • Follow
  • Follow
Quick Links
$

Blogs

$

Tutorials

$

Demos

Get in touch
$

Premium support

$

Free support forum

$

Contact us

Resources


WordPress plugin directory



YouTube tutorials

Copyright © 2025 | All Right Reserves

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok