-
AuthorPosts
-
March 31, 2010 at 11:19 am #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.
- micrantha Friend
micrantha
- Join date:
- May 2007
- Posts:
- 465
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 158 times in 148 posts
March 31, 2010 at 12:35 pm #338587Hello,
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,
MicranthaIs this the real code you used for table? Most opening td-tags are not closed properly.
jack705 Friendjack705
- Join date:
- March 2010
- Posts:
- 15
- Downloads:
- 0
- Uploads:
- 0
- Thanks:
- 2
- Thanked:
- 1 times in 2 posts
March 31, 2010 at 12:39 pm #338589I agree for minrantha go for above suggestion your problem will be solved
March 31, 2010 at 12:55 pm #338595Thank 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 Friendmicrantha
- Join date:
- May 2007
- Posts:
- 465
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 158 times in 148 posts
March 31, 2010 at 1:07 pm #338598Hello,
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,
MicranthaMarch 31, 2010 at 1:16 pm #338600Did 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?
micrantha Friendmicrantha
- Join date:
- May 2007
- Posts:
- 465
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 158 times in 148 posts
March 31, 2010 at 1:25 pm #338602Hello,
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,
Micrantha1 user says Thank You to micrantha for this useful post
March 31, 2010 at 1:28 pm #338603Thanks 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 Friendmicrantha
- Join date:
- May 2007
- Posts:
- 465
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 158 times in 148 posts
March 31, 2010 at 1:31 pm #338604No, just a little bit more experience in html/css.
good luckmadeline63 Friendmadeline63
- Join date:
- January 2010
- Posts:
- 92
- Downloads:
- 0
- Uploads:
- 30
- Thanks:
- 11
- Thanked:
- 1 times in 1 posts
May 3, 2010 at 3:55 am #342449Hi,
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 Friendmicrantha
- Join date:
- May 2007
- Posts:
- 465
- Downloads:
- 0
- Uploads:
- 6
- Thanks:
- 6
- Thanked:
- 158 times in 148 posts
May 3, 2010 at 6:07 am #342460Hello,
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,
MicranthaMay 3, 2010 at 9:54 am #342470This 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 australiamadeline63 Friendmadeline63
- Join date:
- January 2010
- Posts:
- 92
- Downloads:
- 0
- Uploads:
- 30
- Thanks:
- 11
- Thanked:
- 1 times in 1 posts
June 25, 2010 at 3:24 am #348034thanks 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.
September 26, 2010 at 7:00 pm #356716I 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; }
*/AuthorPostsViewing 14 posts - 1 through 14 (of 14 total)This topic contains 14 replies, has 6 voices, and was last updated by morsagmon 14 years, 2 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum