• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Centric – Tables Question

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Centric – Tables Question

This topic is: not resolved

Tagged: centric, tables

  • This topic has 5 replies, 3 voices, and was last updated 7 years, 6 months ago by Mike.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • November 14, 2015 at 7:32 am #171072
    kmpro
    Member

    When I create a table using either plugins for that or direct html entry, I end up with a border (thin, grey) at the top and bottom of the table and at each cell separation. I know that I've set to have no borders of any kind. Is there something that I'm missing, like a setting within CSS somewhere that puts borders in tables?

    November 14, 2015 at 7:49 am #171073
    kmpro
    Member

    Did one last search of the forum and found it this time. So found, and fixed.

    November 14, 2015 at 11:27 am #171089
    Mike
    Member

    Hi kmpro,

    Could you provide a link to the topic to help others who have the same question? That would be very cool.

    November 14, 2015 at 11:58 am #171094
    carasmo
    Participant

    Genesis styles all tables globally to do exactly as you described. You can over-ride this behavior by finding:

    /* ## Tables
    --------------------------------------------- */
    

    Removing all the of the styles and replacing with the CSS below. I've created a class .border-table for tables that you want to look this way and then use just the default browser unstyled tables for other tables, which means that you add no class and do nothing. However, if you want tables to have the borders, then you would use the class .border-table on the table itself by editing the html.

    table.border-table{
    	border-collapse: collapse;
    	border-spacing: 0;
    	line-height: 2;
    	margin-bottom: 40px;
    	width: 100%;
    }
    
    .border-table tbody {
    	border-bottom: 1px solid #ddd;
    }
    
    .border-table td,
    .border-table th {
    	text-align: left;
    }
    
    .border-table td {
    	border-top: 1px solid #ddd;
    	padding: 6px 0;
    }
    
    .border-table th {
    	font-weight: 400;
    }

    Usage

    <table class="border-table" >


    Genesis Theme Customization and Help

    November 14, 2015 at 3:51 pm #171116
    kmpro
    Member

    Sure, here's where I found it along with a cut/paste of it:

    Remove All Table Borders

    Below is what you're looking for in your style.css. Simply change border bottom and border top from 1px to 0px. That's all there is to it.

    In your stylesheet, around line 383, find this code:

    /* Tables
    --------------------------------------------- */

    table {
    border-collapse: collapse;
    border-spacing: 0;
    line-height: 2;
    margin-bottom: 40px;
    width: 100%;
    }

    tbody {
    border-bottom: 1px solid #ddd;
    }

    th,
    td {
    text-align: left;
    }

    th {
    font-weight: bold;
    text-transform: uppercase;
    }

    td {
    border-top: 1px solid #ddd;
    padding: 6px 0;
    }

    November 14, 2015 at 5:18 pm #171118
    Mike
    Member

    Thanks kmpro! Great stuff on that and from carasmo as well.

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble