Tags:
create new tag
view all tags

SID-00594: How do you override the base.css and default.css?

Status: Answered Answered TWiki version: 4.2.4 Perl version: Perl 5.8.8
Category: CategorySkin Server OS: Ubuntu 8.04 Last update: 16 years ago

I know, I know, you use a template right! Well, I've been trying for awhile now (read: hours going on days..) trying to get either my css file put in the head of the html or just trying to get the base.css and default.css out.

I can include my current template file if requested!

I've been scouring the PatternSkin and PatternSkinCSSCookbook sites, but either I'm missing the big picture (which is entirely possible as I'm not the smoothest at CSS) or it's just not there.

Basically, I'm trying to migrate an already created site given to me by some clients who would like the site to be within TWiki so that it's users can do the TWiki thing. Any ideas? In the meantime, I'll keep looking...

-- ClayNadeau - 2009-10-27

Discussion and Answer

Oh yeah, I forgot to mention that even putting the CSS in an inline style sheet doesn't over ride it either as I've tried doing that with the following:

<body> <style type="text/css" media="all"> @import url('/var/www/twiki/pub/skin/global.css'); </style>

-- ClayNadeau - 2009-10-27

Continuing on...If I put the style mentioned above into the tmpl file like so: %TMPL:DEF{"skincss"}% <style type="text/css" media="all"> @import url('/var/www/twiki/pub/TestTseenSkin/global.css'); </style> %TMPL:END%

I still can't get it to load in the header and if I try to do something like the MoveableTypeSkin where you can set the CSS in your WebPreferences, it still won't work.

Any help would be highly appreciated!

-- ClayNadeau - 2009-10-28

In general, if you want to make a whole bunch of changes, you can create your own skin (just copy the existing one, and start modifying it).

If you are only making a few changes, you can overload the default settings in Main.TWikiPreferences:
    * Set USERSTYLEURL = %PUBURL%/<path>/YourStyles.css

To make it easy to maintain, I like to define the styles in a TWiki topic, and automagically attach the part with CSS using AttachContentPlugin. For an example of that, see PatternSkinPalette . Then, in Main.TWikiPreferences:
    * Set USERSTYLEURL = %PUBURL%/<Web>/<YourCssTopic>/YourStyles.css

-- SeanCMorgan - 2009-10-28

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 - 2009-12-03

      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 How do you override the base.css and default.css?
SupportCategory CategorySkin
TWiki version 4.2.4
Server OS Ubuntu 8.04
Web server Apache 2
Perl version Perl 5.8.8
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2009-12-03 - 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.