• Hello once again. I think that the theme is overriding color codes that I place into posts and pages. Could you please tell me an easy way to allow for posts and pages to have color codes? For example I want to have a table on a page where parts of the table each have different background colors, etc..

    Thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi can you share a link to the incriminated table? ??
    Also how do you build them, how do you set their backgrounds?

    Thread Starter gbowden

    (@gbowden)

    haha ok I just copied this from our old site and it’s probably not good:

    Refer to the following color legend to determine which department or branch is holding specific programs/events.
    <table width="100%" cellpadding="0" cellspacing="0" border="1" align="center">
    <tr>
    <td bgcolor="#d0b694" align="center" width="32%" height="50"><b>Florence County Library System</b></td>
    <td bgcolor="#2b7cbd" align="center" width="32%" height="50"><b>Adult Services</b></td>
    <td bgcolor="#c1698a" align="center" width="32%" height="50"><b>Children's Services</b></td>
    </tr>
    <tr>
    <td bgcolor="#cd8838" align="center" width="32%" height="50"><b>Friends of Florence County Library</b></td>
    <td bgcolor="#944b8d" align="center" width="32%" height="50"><b>Lake City</b></td>
    <td bgcolor="#008814" align="center" width="32%" height="50"><b>Young Adults / Teens</b></td>
    </tr>
    <tr>
    <td></td>
    <td bgcolor="#ad2d2d" align="center" width="32%"><b>Olanta</b></td>
    <td></td>
    </tr>
    
    </table>

    Thread Starter gbowden

    (@gbowden)

    All of this is work in progress: https://74.255.101.82/wordpress/calendar/

    https://www.w3schools.com/tags/att_td_bgcolor.asp
    The bgcolor attribute of <td> is not supported in HTML5. Use CSS instead.
    ??
    And yes customizr has some style about the tables to alternate row background colors.

    tr:nth-child(odd) td, tr:nth-child(odd) th {
    background-color: #f8f8f8;
    }

    So you should add an id or a class to your table, and port those changes in css… Or you can do something like this.

    <table class="my-fancy-table" width="100%" .....> bla bla bla :D
    [...]
    <td align="center" width="32%" height="50"><span style="background-color:#d0b694;display:block"><b>Florence County Library System</b></span></td>
    and so on ...

    And add in your custom css
    table.my-fancy-table td, table.my-fancy-table th {padding:0}

    Hope this helps.

    Thread Starter gbowden

    (@gbowden)

    Yes!!! I figured this old code needed some updating. I’m getting back into this stuff after a long hiatus so I’m new to css and html5. Thank you very much.

    You’re welcome ??
    I wish you good work ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How can I enable color codes for posts and pages?’ is closed to new replies.