Edgewall Software
Modify

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#9831 closed defect (worksforme)

How to add CSS style to a HTML table?

Reported by: team@… Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I would like to add CSS style to my table, but can't. I know how to do it in MediaWiki, but similar functionality is missed in Trac (as far as I understand):

{| style="background: yellow;" id="my-html-table" border="2"
|-
|Foo
|-
|Bar
|-
|}

Would be nice to have similar possibility in Trac, e.g.:

||[[style="background: yellow;" id="my-html-table" border="2"]]
|| Foo || Bar ||

Thanks

Attachments (0)

Change History (3)

comment:1 by Remy Blank, 14 years ago

Resolution: worksforme
Status: newclosed

That's what the #!table, #!tr, #!th and #!td WikiProcessors are for. See also WikiHtml#Tables.

comment:2 by Christian Boos, 14 years ago

Ah, you just beat me to it Remy ;-)


Like that?

{{{#!table style="background: yellow;" id="my-html-table" border="2"
|| Foo
|-
|| Bar
|-
|}
}}}

Which renders as:

Foo
Bar

(in 0.12)

comment:3 by team@…, 14 years ago

Looks much better, thanks :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.