Wiki:
Page name: elftownstylesheets [Logged in view] [RSS]
2005-11-03 03:45:44
Last author: Hedda
Owner: Hedda
# of watchers: 49
Fans: 0
D20: 11
Bookmark and Share
<img:/stuff/elftowntechnology.jpg>


<img:http://elftown.eu/stuff/2237_wiki_help_9y7vcgcflr5.jpg>


You can define your own stylesheets on Elftown and then other people can use them.

What is possible?


It is possible to change colours, move things, resize boxes and change background-images.

What is not possible?


You can't change buttons, text and reconfigure tables.

How to do it?


The best way to create a stylesheet is to copy the text from <URL:index.txt> and put it on "[mywikipagename.css@wiki]" (and edit its colours or what-ever) and then export that page and then press "export as raw". Then go to your house and update your personal data and select "_mywikipagename.css" as your stylesheet.

Don't use the old way:
(First you need to have access to the tech-page (link at top of the page). You have that if you have selected that you want to be a part of the Elftown crew in your personal data. Then you can upload your stylesheet there.)

<img:http://elftown.eu/stuff/2237_wiki_help_9y7vcgcflr5.jpg>


How does it work?


Let's begin with examples:
    TH {
      text-align: left;
    }


First is the html-tag TH. This means that everything between {} will be used on every TH-cell (it is a table cell.). Then there it says that the text should be aligned to the left.

Another example:
    .WELCOME { font-size: large } 


Note that this starts with a dot! It means that WELCOME is not a tag, but a class. On the entrance-page of Elftown there is html that says <DIV CLASS=WELCOME> and it's the appearance of that text we change with this definition. We make the text large.
    .NEWSTEXT P {
      background: black;
      font-family: times; 
      margin-top: 0;
      margin-right: 0em;
      margin-bottom: 0em;
      margin-left: 0;
     } 

Here you have two things before the {}-block. This means that the definition is applied to every P-block inside any NEWSTEXT-block. P is a html-tag and NEWSTEXT is a defined class in the Elftown html, as you can tell by the dot.

And then something simple:
    .NEWNEWSBUTTON {}

This doesn't mean anything! It's just there so that you should see that you can put something there.

<img:http://elftown.eu/stuff/2237_wiki_help_9y7vcgcflr5.jpg>


How your stylesheet should look like


It's very important that your stylesheet is as small as possible. The reason is that Elftown changes a lot, and you don't want to change your stylesheet all the time. Therefore the standard Elftown stylesheet is included in your stylesheet with the line:
     @import url(http://elftown.eu/index.css); 

Then you see a copy of the entire stylesheet again. There you can for example change all colour. Then you remove every line that you haven't changed!

Like this. It says:
    BODY {
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;
      margin-left: 60px;
      background-image: url(leaves1.jpg); 
      /*  background-image: url(test.jpg); */
       background-repeat: repeat-y;
       background-color: #DEF8D8; 
       color: black;
       font-family: verdana, arial, serif;
       font-size: 14px;
       /*
         color: #FFFFFF;
         background-color: black;
         background-image: url(bg1.jpg); 
         font-family: Arial, sans-serif;
      */
     } 

(The things between /* and */ is just comments, so they can be left or removed as you wish.)

You change the lines:
    background-image: url(leaves1.jpg); 
    color: black;

to
    background-image: url(go.gif); 
    color: #500000;

This means that the entire block should be:
    BODY {
      background-image: url(go.gif); 
      color: #500000;
     }

The rest of the definitions of the body should be left out. Maybe you should add
      margin-left: 60px;
because you know that you don't want the margin to the left to change.

<img:http://elftown.eu/stuff/2237_wiki_help_9y7vcgcflr5.jpg>


More


Read more about the stylesheets on http://www.w3.org/ (http://w3.org/Style/CSS/). There you also have a stylesheet-validator, which I suggest that you use, so that you can see if you have forgotten a ; or something like that.

You can also view some examples of finely-tuned stylesheets at the Stylesheet Archive. They might provide some useful information for changing certain aspects of Elftown.

Hope this is enough information to get you going. Good Luck.

<img:http://elftown.eu/stuff/2237_wiki_help_9y7vcgcflr5.jpg>


Go or return to:
-The wiki-index
-The advanced help page
-The Elftown_factory page
-The Elftown technology page
-The Elftown technical pages index
-The help index



Username (or number or email):

Password:


Elftown - Wiki, forums, community and friendship.