• simonstill

    (@simonstill)


    I have some tabular data in some of my pages (see https://www.nicolai-uk.com/index.php/pricing/ )

    How do add formatting to the tables/create a table style. I’d like to add some simple horizontal and vertical lines to divide up the data and maybe some shading. I did find some downloadable table styles (though i’ve now lost the link) but couldn’t work out where i needed to put the css.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter simonstill

    (@simonstill)

    Ok – i’ve found the table formatting. where do i install the downloadable code from these examples?

    https://icant.co.uk/csstablegallery/index.php?css=68

    muelheim

    (@muelheim)

    You can add styles directly to your table or put it in a diff file.
    Use this
    <table class=”tableborderbottom”>….

    add style to file.css
    .tavleborderbottom td {border-bottom:4px solid blue;}

    Thread Starter simonstill

    (@simonstill)

    Excuse me but i’m a real noob to this. I don’t seem to have a file.css. Are you saying i can create a file called file.css, add it to my theme folder and it will then be used for my tables?

    muelheim

    (@muelheim)

    No, I didn’t had a look at your site-source. Your styleshhet is stored here:

    https://nicolai-uk.com/wp/wp-content/plugins/falbum/falbum.css

    In the example you mentioned they use these styles, if you only use one table in your files you can apply it like this (table, tr=row, th= head(first line), td other fields):

    table {
    font-size:0.9em;
    font-family: Arial, Helvetica, verdana sans-serif;
    background-color:#fff;
    border-collapse: collapse;
    width: 100%;
    }
    tr {
    background-color:#fff;
    border-bottom: 1px solid #f0f0f0;
    }
    th {
    border-right: 1px solid #fff;
    color:#fff;
    text-align:center;
    padding:2px;
    text-transform:uppercase;
    height:25px;
    background-color: #a3c159;
    font-weight: normal;
    }
    td {
    color:#414141;
    padding:5px;
    text-align:left;
    }

    Thread Starter simonstill

    (@simonstill)

    No, I’m still not getting this. I’ve created a text file called tables_min.css and placed it in the directory of my current theme.

    If i want to use that style in a post how do i refer to it? My advice was something like placing the following at the top of the post:

    <style type=”text/css” media=”all”>
    @import “tables_min.css”;
    and closing the style tag at the end. That doesn’t work however.

    Chris_K

    (@handysolo)

    Personally, I’d just add the style to your current theme’s style.css.

    Located under wp-content/themes/YourThemeName/style.css

    Thread Starter simonstill

    (@simonstill)

    That was what i tried first but i managed to screw it up. Trying again it *almost* works. I’ll experiment.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Formatting for tables in pages/posts’ is closed to new replies.