Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-01-25 09:47:32
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Textile tables not obeying CSS
I’ve tried searching but found nothing on this or either I can’t come up with the correct search.
I’ve bumped into this problem all the time:
Articles containing textile formatted tables will not obey the style sheet, e.g.:
|example txt |example txt |example txt|
with CSS: table th td {font-family: georgia; text-size: small;}
does not make any effect on the table styling.
Giving the table an id within the article doesn’t make any difference.
Only way to make CSS work is to insert the textile CSS tags in every cell. On large tables it defeats the whole purpose of using Textile.
What am I doing wrong?
Offline
Re: Textile tables not obeying CSS
Hi
have you an url to test that?
Cheers
Offline
Re: Textile tables not obeying CSS
table th td {font-family: georgia; text-size: small;}
The selector (table th td
) indicates td
elements inside a th
inside a table
. Try:
th, td {font-family: georgia; text-size: small;}
Code is topiary
Offline
#4 2010-01-25 12:57:47
- -rr-
- Member
- Registered: 2005-09-11
- Posts: 73
Re: Textile tables not obeying CSS
@jsoo
Thanks but already tried that and other variations. Nothing seems to make tables obey the css. I’m stumped.
This is what the source basically looks like:
<div id="container">
<div id="middle">
<table>
<tbody>
<tr>
<td>example txt</td>
<td>example txt</td>
<td>example txt</td>
</tr>
</table>
</middle>
</div>
Even setting the body CSS to contain the font settings won’t affect the table style in any way.
Last edited by -rr- (2010-01-25 12:58:12)
Offline
Re: Textile tables not obeying CSS
Also, text-size
is not a valid CSS property. Try font-size
.
Code is topiary
Offline
Re: Textile tables not obeying CSS
Well I style the tables on my textpattern sites just fine so it’s not any problem with textile. Must be in the stylesheet itself or a browser overriding with it’s own styling.
Do you use a css reset such as this one ?
I strongly recommend it as it removes any css quirks from browsers. From there use the css suggested above, or simply:
table {font-family: georgia; font-size: small;}
Which will apply the rule to anything contained within the table tags.
Last edited by philwareham (2010-01-25 13:39:08)
Offline
Pages: 1