Tags:
create new tag
view all tags

SID-00837: Changing background in table cell

Status: Answered Answered TWiki version: 4.3.1 Perl version: 5.8.8
Category: TablePlugin Server OS: OS X 10.6.3 Last update: 15 years ago

I would like to change the background color for individual cells in tables. Does anyone have any idea how to do this?

-- WilburGoltermann - 2010-05-13

Discussion and Answer

I should add that I have been able to accomplish what I wish by using HTML table tags, but I'm interested in knowing whether the same can be accomplished using the TWIKI markup language.

-- WilburGoltermann - 2010-05-13

I don't think this is directly supported, but you can define some variables and use them in table cells. Example:

   * Background colors. To use, write table cell: | %REDBG% red background color %ENDBG% |
      * Set REDBG = <div style="background-color:#FF8080; padding:0 3px 0 3px">
      * Set PURPLEBG = <div style="background-color:#FF80FD; padding:0 3px 0 3px">
      * Set GREENBG = <div style="background-color:#80FF80; padding:0 3px 0 3px">
      * Set BLUEBG = <div style="background-color:#8080FF; padding:0 3px 0 3px">
      * Set YELLOWBG = <div style="background-color:#FFFF80; padding:0 3px 0 3px">
      * Set ENDBG = </div>

These variables are best defined in Main.TWikiPreferences or a web's WebPreferences.

Example table Row 2
normal
red
purple
green
blue
yellow

(View raw text to see how this works)

-- PeterThoeny - 2010-05-13

Closing this question after more than 30 days of inactivity. Feel free to reopen if needed. Consider engaging one of the TWiki consultants if you need timely help. We invite you to get involved with the community, it is more likely you get community support if you support the open source project!

-- PeterThoeny - 2010-07-04

      Change status to:
ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SupportForm
Status Answered
Title Changing background in table cell
SupportCategory TablePlugin
TWiki version 4.3.1
Server OS OS X 10.6.3
Web server Apache/2.2.14
Perl version 5.8.8
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2010-07-04 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.