
Yeah, that was helpful to me. Now, at least, I know HOW to get the CSS code onto the wiki… Whether or not it looks any good is a different question… :)
Tag cloud: (all tags)
Users who watch this page:
... and more
Posted by michal-frackowiak on 19 Aug 2006 11:29, last edited by PeterMortensen on 30 Aug 2015 16:30
Tags: color colour css customize layout themes
This document is a work-in-progress. Please contribute if you wish!
This is a how-to that describes a way to create your own appearance for your site.
A theme is a structured template, written in a markup language called Cascading Style Sheets (CSS), that controls the appearance and graphical layout of a page. The theme defines the font to be used, its size, the location of text, colors, and background images. However, themes are independent from the actual informational content of the page, so they make it possible to change the visual presentation without having to re-enter the actual text or other data.
Wikidot.com already offers a several basic CSS themes to choose from. But it is certainly never a bad idea to create your very own look for your site. The whole trick is to write new CSS code that is placed upon the existing themes so you do not have to write everything from scratch. E.g. to just change most of the colors you need to produce as much as 20 lines of code. And this HOWTO will tell you how.
There are collections of user-created CSS-themes on open wikis:
Before you start your own theme you should have a look about possible and existing layouts!
When creating a new theme you will have to extend already existing themes. Custom themes are created per site and are available only within a given site.
To create new themes you will certainly need some CSS and design skills. You can learn a lot at sites like the following:
Go to the Site Manager (by default available at the page admin:manage). There should be a link on the side bar of your pages.
Click on Appearance » Custom Theme.
Of course you will need an administrator role within the Site.
If you already have some custom themes defined you should see them listed. In order to create a new one:
You can basically extend any theme available. However if you want to start from a plain look as much as possible than you should choose Base theme. Every theme on Wikidot.com extends the Base theme. This theme contains basic layout for pages, dialogs, forum, etc. We will come back to it later.
But if you just want to change e.g. colors in an already available theme, then choose this theme (e.g. change colors in the Cappuccino theme).
At the moment suppose you want to extend the Base theme.
The box with the title 'CSS code' shows the CSS in your custom theme. It begins blank (it doesn't display the CSS from the theme you are extending, only the additional CSS you build on top of this. The additional code will appear after the end of the original theme and override existing definitions).
There are two ways to manage your CSS code: put it directly into the box or (which we recommend) keep all the CSS code in a separate special page on your wiki, and use the 'import' button to import it to the box. This way you can easily keep revisions of your theme as you do with wiki pages. The CSS is extracted from the first [[code]] … [[/code]] block in the specified page. The process of taking code from the 'sync' page isn't an automatic one - so each time you change it you have to use the custom theme administration controls and click "import" and "save theme".
So we recommend here to open a new window in your browser and create a (empty) page called css:mytheme (or any other that suits you). Put this name in the theme form.
The “save theme” function will not export the code back in your CSS wiki-page but record the content of the box as a custom theme. If you use this method you must:
Decide if you want to use side/top navigation (menu) elements. Select whether your theme will use it or not?
Even if you do not have CSS ready yet - you will write it later.
This is the most important step. To do this properly you will have to learn first how the theme you are about to extend is implemented.
For the Base theme look at the CSS file: http://www.wikidot.com/common--theme/base/css/style.css
This base CSS includes styles for dialogs (window pop-ups), forums, the wikidot editor, autocomplete and code highlighting near the bottom of the file, all of which you can style in your custom theme.
If you aren't sure of the address of the CSS for the theme you are already using just check the source code on one or your pages (look for 'style type="text/css" id="internal-style")'.
Most likely you will need to know the DOM structure of the page i.e. what elements are there, what classes and ids, etc. Each of the pages has more or less the same layout. You can learn this by:
Let us see how the Flannel Ocean theme is defined - it directly extends the Base theme. The CSS is located here.
What the style actually does:
If you like the Flannel theme but you just want to change the colors you can simply extend this theme and redefine only the colors! The same for other themes of course. The easiest way in each case is just to copy&paste blocks of code from existing themes to your own theme.
Below is a list of selected themes and their styles
Flannel | http://www.wikidot.com/common--theme/flannel/css/style.css |
Flannel (no side bar) | http://www.wikidot.com/common--theme/flannel-no-side-bar/css/style.css |
Flannel Ocean | http://www.wikidot.com/common--theme/flannel-ocean/css/style.css |
Flannel Ocean (no side bar) | http://www.wikidot.com/common--theme/flannel-ocean-no-side-bar/css/style.css |
Flannel Nature | http://www.wikidot.com/common--theme/flannel-nature/css/style.css |
Flannel Nature (no side bar) | http://www.wikidot.com/common--theme/flannel-nature-no-side-bar/css/style.css |
Cappuccino | http://www.wikidot.com/common--theme/cappuccino/css/style.css |
Cappucino (side bar on right ) | http://www.wikidot.com/common--theme/cappucino-right/css/style.css |
So let us assume you have embedded the CSS code within the page css:mytheme. Go to Site Manager » Appearance » Custom themes and open your new theme for editing. If you have the source page configured, just click import and see what happens.
Save theme of course.
To begin with a custom theme won't be assigned to any pages, so you won't immediately see the results of your work. You can preview the theme in two ways:
There are many browser quirks. What some browsers render properly others can not understand at all. Please test your theme with at least major browsers (Firefox, Internet Explorer, and Opera).
CSS Validator
Copy and paste your code into the Validator to check for errors.
When your theme is ready - go to Site Manager » Appearance » Themes and set the new theme for the page categories you want. And… that should be all!
michal-frackowiak. Please visit his/her userPage.
Yeah, that was helpful to me. Now, at least, I know HOW to get the CSS code onto the wiki… Whether or not it looks any good is a different question… :)
I added some links to the basics section. Maybe one can find the answer to this different question there. ;)
Can anyone tell me how to simply change the background of an existing CSS theme??
It would be easier to help you if you provided a link to your site or told us which theme you are using.
Community Admin
I assume your site is [http://xplicit.wikidot.com/start] ?
Looks good - what do you want to change ?
Or - have you find it yourself and is the change done ?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
@Lofty, I see you are using the orange-black theme from the Themes site. To change this you will need to set up a page on your own site to hold the changes. You might want to read my post at http://community.wikidot.com/forum/t-422137/need-some-help-with-css#post-1330975 which explains what you need to do.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
I am really impressed by your research on CSS web design templates. I will definitely looking forward to use this.
I spent hours looking for this info. Not a single tag mentioning color or how to tweak a theme! I better get studying CSS! Thanks for the free blog!
Just go to http://www.blogger.com/start and sign up for a blog there - they're a great blog provider. Using a wikidot site as a blog would end up being a hassle after a while .. lol
If anyone is interested in contributing to another site dedicated to CSS among other things, check out http://hard-drive.wikidot.com and apply for membership.
Cheers
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
er…. how do i do that then?
Yeah, it's been blocked from new membership by the other site admin I am working with. I'll see if I can fix that up now, or at least ASAP. Check back there in a few days.
Sorry about that…
EDIT: ok, ready for new members now :)
~ Leiger - Wikidot Community Admin - Volunteer
Wikidot: Official Documentation | Wikidot Discord server | NEW: Wikiroo, backup tool (in development)
Yeah, me 2!!!!!
Thank you so much!
I'm trying to add a logo to my wiki. I would assume I should do that in the css and I have been messing around wiht it but I can't seem to figure it out. I've tried copying the code for the background image in the header and tried changing the coordinates but my image wont show up.
If anyone is interested in doing it for me :) I just want the image found below in the upper left hand corner of the default Flannel layout.
Thanks much for any help.
In the custom themes section of admin:manage, make a new theme that extends the flannel theme and put the following code:
You will need to re-upload your image and make sure it ends in a valid for (ex: .jpg .gif .bmp) - This is your problem
-Tehraptor
Changed the universal background colour (yes spelt it correctly in the css, US style) and made sure there were no conflicts but refuses to change from default used by co. Any particular reason?
OK, this is basicac CHINESE! I don't get it, it is dificult to navigate.
I have a logo in my computer, how to I attach it next to the name of my wiki??????????
This will do the trick
do the following:
Maybe you need to adjust the width and height that are given by default.
Try it, if it does not work or stops working write me a message
A - S I M P L E - P L A N by ARTiZEN a startingpoint for simple wikidot solutions.
This has no effect if the other members do not have the picture saved.
This is useless
Having struggled a lot to follow these instructions I thought a few extra pieces of information might help - so I've added them. That might be a bit presumptuous, but it's probably simpler than any other options. I won't be offended if someone edits/undoes my changes.
Fine, it is clearer now.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
"Theme" didn't t mean anything to me for a while and neither did CCS ( Cascading Style notes)
It might be good to start this page with something like this.(It may be off base — I am new.).)
A theme is a structured template that provides specific directions that control the appearance of pages. When complete, the template establishes the fount to be used, its size, the location of text, any back ground color, specific images to be used and their location. (and other things that I don't know.)
The theme starts with a basic template and modifies and adds to it, using a markup language called Cascading Style Notes (CSS)
Am I in the ball park? If yes, please modify it and place it at the top of the page.
Regards, Jack
Can we import CSS from other places, or must we use wikidot specific theme modification only? Thanks!
You can import any CSS using
in your CSS.
But remember that any import must go before the rest of the content.
Piotr Gabryjeluk
visit my blog
Hey I think you mentioned that when we import CSS from other places the import should go before the rest of content. I am trying to import CSS themes i downlaoded from otehr websites, but i do not know how to upload the entire content as i know that for the theme to work all files (not jsut the CSS) should be uploaded while keepign structure of folder. Can you tell me how i should proceed.?
Thanks
You can't use a folder structure on Wikidot sites as you would do with a "normal" website.
To use a theme from another site you would need to import the CSS as a file on your site somewhere and then point to it in the @import rule at the top of your custom CSS. (Although I would normally put the CSS rules onto their own page inside [[code type="css"]] .. [[/code]] tags and point to the codeblock on that page).
You would also need to upload to the page holding your imported CSS any images that the theme required and make sure that in the CSS the links to them - ackground-image:url (/local--files/pagename/imagename.jpg) - is correct.
You then need to bear in mind that importing CSS from another site will almost certainly not work without quite a bit of manual work after that: the rule names we use here are usually different and I have never known an imported css from outside Wikidot work first time.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
Have a look at http://vineyard.wikidot.com/supernatural:css which is just a test page. It imports its css from http://vineyard.wikidot.com/supernatural:css2 then adds a bit more. You'll see the syntax used for the @import.
Rob Elliott - Strathpeffer, Scotland - Wikidot first line support & community admin team.
I don't know anything about CSS, but I managed to change the most colours in the Cappucino theme. But can any one please tell me how I can change the colour of the text on the pages???
Please! I need your help!
Have a look on the howto:
Basics contains some important links for the syntax of CSS:
http://community.wikidot.com/howto:design-your-own-css-theme
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
in the theme creation page in site manager, it says the seperate css file is recommended, here it says directly into the box is recommended.
EDIT: here is the "extra" file named like ( "css:mytheme") recommended!
Both can be correct… the diffrence is the "mass of changes" you want to do in CSS.
If you have only ONE thing changed than the direct entry is enough to key in. For a "howto" it is easier to concentrate on little entries.
If you want to experiment more and more - than it is a very good idea to put your CSS code in extra pages - only to save them and to have the history(!) if something goes wrong. This was the first idea of Michal ( the developer of ikidot).
Hope this makes it clearer.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Hey i want my wiki site pe egr .wi kidot.com to customize like ht tp: //w ww. c heap t-cav ta.com c hea est-c aver or like http: // ww w. tru harma.com can anyone help me out regarding this and also i want to know that how can i remove the search box from my wiki site, it will be done by customizing theme.
Any suggestions please.
Jeff Turner
Edit: cleared the links and names no spam on our community site forum with adsense to your wiki.
You have to read all about CSS theme. Go to search center ( left menu) and search for CSS or theme . This is the only way to change the layout.
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
I am hoping someone can help me troubleshoot my css problems:
I am trying to get the css from RubyX template to work on my wiki: http://crazyhappenings.wikidot.com
Here is what it is supposed to look like: http://www.kendahlin.com/demo/rubyx/index.html#
I attached all the image files to this page: http://crazyhappenings.wikidot.com/css
I then took all the code from main.css and replaced the existing url reference with the urls from my wiki. That part seemed to work.
But, it appears to be the code that is messed up.
Is the base code getting in the way?
How can I troubleshoot this problem?
I've spent a long time reading up on css and I can't seem to get past this!
Any help would be much appreciated. Thanks.
regards, crazyhappenings