Jump to content

Photo

New Theme CSS


  • Please log in to reply
85 replies to this topic

#1 Zorg

Zorg

    Chief Technical Officer

  • Administrators
  • PipPipPip
  • 698 posts
  • Badge
  • United Kingdom

Posted 07 November 2011 - 19:29

The new UI theme options allow players to write their own CSS (Cascading Style-sheets) under the Themes tab.

To give you an idea of what you can accomplish with CSS, the classic theme is just the default theme with a few graphics and a CSS file. Before you try playing with it please make note of this link, if you break your template you'll need it to reset your theme.

http://www.fallenswo... ... =revertcss

Simply login, navigate to that link and it will fix any changes you've made. You should also make note of this link before trying out anyone else's CSS.

The easiest thing to change is the theme background...
html {
  background: yellow;
}
The above code when pasted in to the Customize Theme box will change your background to yellow. Similarly you could do...
html {
  background: url('http://www.huntedcow.com/media/images/team/hoof.jpg');
}
If you really like Hoofmaster, that would give you his avatar as your wallpaper!

You can find lots of guides about CSS on Google, feel free to post any cool theme changes you come up with in this thread. :)

~ Chief Technical Officer
Wayne 'Zorg' Robinson


#2 evilbry

evilbry

    Veteran

  • Members
  • PipPipPip
  • 3,172 posts
  • New Zealand

Posted 09 November 2011 - 06:07

For those toying with background, if you have Hide Background Image (Beta): ticked under preferences, the css changes won't appear on your main game screen (even if you are just using a colour and not an image). The css changes will however appear on the buff pop up screen.

#3 fs_deadlystrk

fs_deadlystrk
  • Guests

Posted 09 November 2011 - 06:42

sweet got mine set to pink!

#4 koenvdv

koenvdv

    Veteran

  • Members
  • PipPipPip
  • 1,327 posts
  • Badge
  • Belgium

Posted 09 November 2011 - 18:24

Great, love to play with CSS it has been to long XD.

Tried this and it works :):
h1
{color: red;
font-family: Comic Sans MS,arial;
font-size: 30px;
font-weight:bold;
}

This one changes the player name colours, font type and font size (you can get the colour codes here: http://www.2createaw...hex-colors.html)

I have looked at the CSS further (http://huntedcow.cac...lobal.css?00002) and tried to change the colour from the guild members names in the guild online members box to other colours, but it didn't seem to change anything:

.online_0
{
	color: #34EF13;
}

did this also for .online_2, .online_3 and .online_4.

Did I do anything wrong or are the .online for something else (if so which ones are the ones I am looking for? )?

#5 fs_ozujsko

fs_ozujsko
  • Guests

Posted 09 November 2011 - 19:48

how to change world background image,this gray backgraund is so depresive :cry:

#6 gulp45

gulp45

    New Member

  • Members
  • Pip
  • 29 posts

Posted 10 November 2011 - 01:06

Hey to change the back ground image just copy and paste this to the custom theme page:

html {
background: yellow;
}

replace the yell with url So i now becomes:

html {
background:url;
}

after this is not get a link of the picture u want and place it in perentices like this:

(http://images2.alpha...thumb-78320.jpg) ~ example photo u dont have to go with it

then insert the picture link in perentices next to url and ur good to go it should look like this at the end

html {
background:url(http://images2.alpha...thumb-78320.jpg);
}

Thats all and click save setting hope i helped
}


Tell me what u think and give feedback



:D :mrgreen: :lol:

#7 fs_ozujsko

fs_ozujsko
  • Guests

Posted 10 November 2011 - 10:36

sorry i know that already,but when i get to world screen or any other screen in the game behind is gray background idenpendent of game backgraund,i already have custom backgraund

Posted Image

#8 koenvdv

koenvdv

    Veteran

  • Members
  • PipPipPip
  • 1,327 posts
  • Badge
  • Belgium

Posted 10 November 2011 - 16:44

sorry i know that already,but when i get to world screen or any other screen in the game behind is gray background idenpendent of game backgraund,i already have custom backgraund

Posted Image


yea, that is not the background, you'll have to find how they have put that in their CSS and change it on the right spot.

#9 Zorg

Zorg

    Chief Technical Officer

  • Administrators
  • PipPipPip
  • 698 posts
  • Badge
  • United Kingdom

Posted 10 November 2011 - 19:13

sorry i know that already,but when i get to world screen or any other screen in the game behind is gray background idenpendent of game backgraund,i already have custom backgraund


Yes that is element #pCC so the CSS would be...
#pCC {
  background: green;
}
If you use chrome you can right click and inspect an element to see the CSS it is using and its class / ID.

~ Chief Technical Officer
Wayne 'Zorg' Robinson


#10 fs_tangtop

fs_tangtop
  • Guests

Posted 10 November 2011 - 19:35

If you use chrome you can right click and inspect an element to see the CSS it is using and its class / ID.

Firebug addon will let you do the same in FF.

#11 fs_sangdiablo

fs_sangdiablo
  • Guests

Posted 12 November 2011 - 09:48

So...would having the background turned off kill off ALL custom CSS? I'm still not able to change fonts at all. Or should I be trying to change different elements from what I've already tried? (body for everything but the links and a for the links-as far as the links, I've tried with just a and I've tried with specifying all 4 states for the links individually)

#12 fs_sangdiablo

fs_sangdiablo
  • Guests

Posted 13 November 2011 - 05:07

Nevermind my last post. I've got it working now. :)

Posted Image

#13 Ringhal

Ringhal

    Member

  • New Members
  • PipPip
  • 344 posts

Posted 13 November 2011 - 07:01

Nevermind my last post. I've got it working now. :)

Posted Image


Would you like to share how you did that, please?

#14 fs_bigdaddyj

fs_bigdaddyj
  • Guests

Posted 13 November 2011 - 17:50

Is there any way to remove the brown background so that you can see more of the wallpaper? Like just words written over the background. You can some times see it when paging back before the images load and it looks awesome.

#15 fs_ukyokuonji

fs_ukyokuonji
  • Guests

Posted 15 November 2011 - 18:32

I love the grayscale theme but its middle background is a bit weird..

is there any way I can change it to be exactly like the one used in default theme?

#16 fs_sangdiablo

fs_sangdiablo
  • Guests

Posted 19 November 2011 - 13:58

To be able to 'see through' the background, set the color of the background to transparent.

Example: #pCC {background: transparent;}

Keep in mind that if you set a background to transparent, you may not be able to read any or all of the text without changing the color of the text. For instance, the bottom half of the background image is black in the forums. If all the divs were set to a transparent background, you would not be able to read hardly anything after the first post, as black on black is not a great color scheme. Remember the old web design fad that used tiny light gray text on a white background? Yup, that gave me headaches from eye-strain, too.

As far as how to code what I posted, I suggest against it, as I ended up screwing up the color scheme too much. I'd fix the text color in one place to contrast the background, then the background on another page needed to be changed to contrast the text, requiring me to change the text elsewhere... Well, you get the idea.

For the fonts, I used Tolkien for the main text
#pCC {font-family: Tolkien;}
and for the links, I used Viking, though I had to opt for a smaller size font (Viking is HUGE).
a {font-family: Viking; font-size: x-small;}
You'll have to inspect all the elements (see Tangtop's post and Zorg's quote) and make sure to set each of them to Tolkien. Also, you must have both the Tolkien and Viking fonts installed on your computer, otherwise, the code will do nothing for you and you'll still be looking at default fonts.

#17 fs_mrlucky52

fs_mrlucky52
  • Guests

Posted 19 January 2012 - 06:28

html
{
background:url(http://seekcodes.com... ... ound_5.gif);
}
h1
{
color:green;
font-family: Arnprior;
font-size: 20px;
}
p
{
font-family: Neuropol;
}






a must have for gray scale

#18 koenvdv

koenvdv

    Veteran

  • Members
  • PipPipPip
  • 1,327 posts
  • Badge
  • Belgium

Posted 19 January 2012 - 14:12

I've made a persanolised banner for my guild TTF (gray scale theme):
http://i1091.photobu...vdv/statbar.png

The code is as followed:

#statbar-container {
background-image: url('http://i1091.photobucket.com/albums/i387/koenvdv/statbar.png');
}

I added some more stuff to it, the code is as followed:
#statbar-container {
background-image: url('http://i1091.photobucket.com/albums/i387/koenvdv/statbar.png');
}

html {
  background: url('http://i1091.photobucket.com/albums/i387/koenvdv/backgroundrepeat.jpg');}

h1
{color: #280534;
font-family: Comic Sans MS,arial;
font-size: 30px;
font-weight:bold;
}

It looks like this now:
Posted Image

#19 thering66

thering66

    Member

  • Members
  • PipPip
  • 258 posts

Posted 21 January 2012 - 10:01

more codes please :D also is there a way to stretch a picture? i can't seem to find one big enough.

#20 koenvdv

koenvdv

    Veteran

  • Members
  • PipPipPip
  • 1,327 posts
  • Badge
  • Belgium

Posted 21 January 2012 - 11:41

more codes please :D also is there a way to stretch a picture? i can't seem to find one big enough.


Sorry, I have tried, but I failed ... don't know how to do it trough CSS

But it is possible to stretch a image to 100% height and 100% width of your screen.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Font:
Arial | Calibri | Lucida Console | Verdana
 
Font Size:
9px | 10px | 11px | 12px | 10pt | 12pt
 
Color: