Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • bytemuncher Friend
    #150002

    Issue
    Formatting is lost for tables within articles.

    Test Case
    To make sure it was not an issue with my site config (components, plugins, etc.) I did a fresh install in a virtual machine using the quickstart file, jatc_purity_ii.zip.

    I put a test table on the front page of the default install (using sample content).

    Test Code Used
    <TABLE BORDER=4 CELLSPACING=4 CELLPADDING=4>
    <TR>
    <TD BGCOLOR=”#ffff00″>Yellow Stars
    <TD BGCOLOR=”#00ff00″>Green Clovers
    </TR>
    <TR>
    <TD BGCOLOR=”#ff00ff”>Purple Moons
    <TD BGCOLOR=”00ffff”>Blue something or other…
    </TD>
    </TR>
    </TABLE>

    Result
    I am attaching a screenshot from the editing window where everything appears normal. Also attaching screenshot from the rendered page where the formatting is stripped.

    Tested on FF3.6, IE6, IE7, and IE8 and all show the table with no formatting applied.


    1. Editor
    2. IE8
    3. FF3.6
    micrantha Friend
    #338587

    Hello,

    You could take a look in output code of page.
    Inline style would have to overrule other style rules.
    General style for tables is first set to none in file addons.css.

    Regards,
    Micrantha

    Is this the real code you used for table? Most opening td-tags are not closed properly.

    jack705 Friend
    #338589

    I agree for minrantha go for above suggestion your problem will be solved

    bytemuncher Friend
    #338595

    Thank you for the replies…much appreciated.

    So it sounds like I need to make inline style overrule other styles. Could you tell me how to configure this setting? (I’m google’ing now…)

    @micrantha,
    Yes, that is the code I used for the table. Copy and pasted from a tutorial website. I think the code is okay (renders fine in the editor and JA Purity_v1) but just in case I went ahead and tried this code:

    <TABLE BORDER=4 CELLSPACING=4 CELLPADDING=4>
    <TR>
    <TD BGCOLOR=”#ffff00″>Yellow Stars</TD>
    <TD BGCOLOR=”#00ff00″>Green Clovers</TD>
    </TR>
    <TR>
    <TD BGCOLOR=”#ff00ff”>Purple Moons</TD>
    <TD BGCOLOR=”00ffff”>Blue something or other…</TD>
    </TR>
    </TABLE>

    Same problem occurred.

    micrantha Friend
    #338598

    Hello,
    Indeed end-tags for table cells are correct now.
    but you have to code your table in a different way to overrule default style.
    For example this way:

    <table style="border:4px" CELLSPACING="4" CELLPADDING="4">
    <tr>
    <td style="background-color:#ffff00">Yellow Stars</td>
    <td style="background-color:#00ff00">Green Clovers</td>
    </tr>
    <tr>
    <td style="background-color:#ff00ff">Purple Moons</td>
    <td style="background-color:#00ffff">Blue something or other...</td>
    </tr>
    </table>

    good luck,
    Micrantha

    bytemuncher Friend
    #338600

    Did something change between JA Purity and JA Purity II to cause this to happen? I have many tables that I will need to re-code (several days of work) if this is the case.

    Is there a simple override somewhere?

    Like in that addons.css file could I delete the defaults for table-related stuff?

    Here is a screenshot using the code you posted. Updated table is below the original. Looks like the 4px border is not showing up.

    *EDIT/UPDATE* Okay, I just deleted all the table tags (lines 18-25) from addons.css and now it’s working. Is doing it this way a bad idea for some reason?


    1. UpdatedCode
    micrantha Friend
    #338602

    Hello,
    Sorry, css-rule for order is:

    border: 4px solid #000000
    You can change css-rules in file addons.css
    Open this file. You see first reset code for a number of tags:

    html, body, div, span, applet, object, iframe,
    h1, h2, h3, h4, h5, h6, p, blockquote, pre,
    a, abbr, acronym, address, big, cite, code,
    del, dfn, em, font, img, ins, kbd, q, s, samp,
    small, strike, strong, sub, sup, tt, var,
    b, u, i, center,
    dl, dt, dd, ol, ul, li,
    fieldset, form, label, legend,
    table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    background: transparent;
    }

    Here you can delete the tags for table elements:


    table, caption, tbody, tfoot, thead, tr, th, td

    (also delete the last comma (,) after legend)
    Good luck,
    Micrantha

    bytemuncher Friend
    #338603

    Thanks Micrantha. You’re awesome.

    *EDIT/UPDATE*
    I ended up recoding the tables entirely and decided to use an external cascading style sheet. I think Google had been penalizing that particular page for using deprecated html tags.

    micrantha Friend
    #338604

    No, just a little bit more experience in html/css.
    good luck

    madeline63 Friend
    #342449

    Hi,

    my article is set in a table format,
    however when i align it as “center”, IE is working just fine, while FF is remain to align “left”..

    do anyone have the idea to fix this problem?

    thanks a lot

    micrantha Friend
    #342460

    Hello,
    When your table has a specified width you can center it by using these rules for margin:

    margin-left:auto;
    margin-right:auto;

    or in short:

    margin:0 auto;

    Maybe this solves your issue.

    Regards,
    Micrantha

    spotvice29 Friend
    #342470

    This is only a suggestion why use the DIV tags inside the table by that you will better access in formating the what is inside your table.

    Thanks,
    T.A.S
    – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
    Tax Advice Australia, Business Tax Advice
    starting a business in australia, starting a business australia

    madeline63 Friend
    #348034

    thanks for your quick reply, however i am wondering where should i put the code (margin-left:auto; margin-right:auto;)

    i try to make it in my table form article, but it doesn’t work.

    morsagmon Friend
    #356716

    I had the same problem, but micrantha’s advise did not help.
    Eventually, I commented out lined 106-108 in template.css – these table settings seem to take precedence over the table settings:

    /*
    th { font-weight: bold; padding: 5px; text-align: left; }

    td { font-size: 100%; padding: 5px; }
    */

Viewing 14 posts - 1 through 14 (of 14 total)

This topic contains 14 replies, has 6 voices, and was last updated by  morsagmon 14 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum