WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Theme: Graphene] How to change appearance of tables (4 posts)

  1. abingdonhockey
    Member
    Posted 6 months ago #

    I'd like to make the tables in my Graphene theme a bit easier to read. I'm happy to go into the CSS style sheet to do this (will make a child theme if I make any major changes).

    Basically, I want the row colour to alternate. I've tried to do this myself but my changes seem to have no effect. Can someone give me some instructions please? :)

    p.s. I'd also like rounded edges on my tables/images but have literally no idea where to start with that one!

  2. Saeed Salam
    Member
    Posted 6 months ago #

    Hi,

    just style the table tr with css. like,

    table tr:nth-child(odd) {
        background: #eee;
    }

    and, below code will give ALL images rounded edges.

    img {
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    }

    you can make tables with rounded edges by tweaking above code a little bit!

    Thanks!

  3. kjodle
    Member
    Posted 6 months ago #

    will make a child theme if I make any major changes

    If you edit the theme's files directly, you will lose those changes when the theme updates. If you don't update, you lose out on new features and open your site up to potential security issues.

    However, you can add the code Saeed mentioned (not often I hear about the odd n-th child pseudo class—well played) to the custom CSS feature in Graphene options. It's the last item under "Display Options"

  4. abingdonhockey
    Member
    Posted 6 months ago #

    Thanks a lot guys! Saeed's code worked beautifully, and thanks to kjodle I won't lose it whenever I update the theme!

    Nice work :)

Reply

You must log in to post.

About this Topic