Mass Effect 2 skin
Friday, November 20, 2009 9:02:40 AM
a folder for each skin
With this skin being my 5th theme now I wanted to keep the files in the future to make it easier to switch to different skins. The first step was to create a folder (called /skin5) for the new skin inside the files folder of My Opera. There I could put the central CSS file (called skin.css) and link the user.css directly to it:
@import url("files/skin5/skin.css");That's all. From now on I will be able to switch my skins within seconds.
to be or not to be - sprites and images size
At first I thought about using sprites again, but when I realised that the file size of the whole image would easily exceed 350kB I went back to the more classic way and included the image for each subpage of my blog seperately. That way each page will load faster, while the image quality is still good.
#top2 { background: transparent url('files/skin5/head_01.jpg') no-repeat; height: 665px; }
.top-blog #top2 { background-image: url('files/skin5/head_01.jpg');}
.top-archive #top2 { background-image: url('files/skin5/head_02.jpg');}
.top-albums #top2 { background-image: url('files/skin5/head_03.jpg');}
.top-links #top2 { background-image: url('files/skin5/head_04.jpg');}
.top-friends #top2 { background-image: url('files/skin5/head_05.jpg');}
.top-favorites #top2 { background-image: url('files/skin5/head_06.jpg');}
.top-unite #top2 { background-image: url('files/skin5/head_07.png');}
.top-about #top2 { background-image: url('files/skin5/head_08.jpg');}
You may notice, that all images use the JPEG file format except for one. This was due to file size optimizing. So whenever you save an image to be used in the web make sure to use the smallest possible file that still looks good enough.different skin different basic theme
As I wanted to create some cool space graphics to the left and right of the page image I decided to use a different basic design. So I switched from "Silver" to "Leaves", which also comes with the most important colors I need for my skin. This way I don't need to code every single tag, class and id, I just modify the things I want to look and behave differently.
@font-face
The key feature I wanted to try this time was web embedded fonts. Therefor you define a new font at the beginning of your CSS, add the font as a font-family and upload it on your My Opera files folder. I ran into some trouble as the examples I found didn't do what I wanted, but I found a very good article by Paul Irish and an awesome @font-face generator that even includes the code you need. Afterwards I uploaded all the font files required and included the following CSS code:
@font-face {
font-family: 'Slider';
src: url('slider.eot');
src: local('Slider Regular'), local('Slider'), url('slider.woff') format('woff'), url('slider.ttf') format('truetype'), url('slider.svg#Slider') format('svg');
}
#wrap1 { font-family: "Slider", "Arial", sans-serif; }
This SHOULD work in any browser, but right now it seems that it doesn't work on Firefox (no idea why, the code should be okay) and on a few systems it doesn't work at all. 
I will have another look at it later on... hopefully finding the solution to this very soon.








Robert Jacobsenrobertj # Friday, November 20, 2009 12:43:13 PM
http://img.ipwn.se/Skjermbilde%202009-11-20%20kl.%2013.42.14.png -
Reposted this in the correct place to post it
DavidSchalandra # Friday, November 20, 2009 12:48:06 PM
edit: a collegue of mine just had a look at it on his MacBook and it looks just as intended...
Robert Jacobsenrobertj # Friday, November 20, 2009 5:56:35 PM
Robert Jacobsenrobertj # Friday, November 20, 2009 11:50:01 PM
DavidSchalandra # Saturday, November 21, 2009 3:33:57 AM
Firefox will not load the font due to HTTP access control, which prevents Firefox from loading fonts from sources that are not exactly the same domain as the website itself. I'll try to find a work-around, but that will take some time. Aside from that Firefox loads Arial instead (that worked this way on all 6 different systems).
I'm not really sure, why you're running in such enormous trouble, but I'll check the CSS again this weekend. Maybe I find a fix.
Robert Jacobsenrobertj # Saturday, November 21, 2009 10:31:19 AM
Just a comment: I see you have written "Slider", "Arial", sans-serif, and while I'm not certain it works the same way for web fonts, you don't need to quote one-word fonts. For instance, you can write Times but you need to quote Times New Roman.
Robert Jacobsenrobertj # Saturday, November 21, 2009 10:33:58 AM
@font-face { font-family: 'Slider'; src: url('slider.eot'); src: local('Slider Regular'), local('Slider'), url('slider.woff') format('woff'), url('slider.ttf') format('truetype'), url('slider.svg#Slider') format('svg'); }DavidSchalandra # Saturday, November 21, 2009 11:19:46 AM
I found a line where I forgot to include Arial, maybe that does the trick.
KimberlySqueakeyCat # Sunday, November 29, 2009 2:50:48 AM
Magickal Graphics
Robert Jacobsenrobertj # Sunday, November 29, 2009 1:31:01 PM
#wrap4 { background: #FFFFFF url('bg.png') repeat-y 0px 0px; width: 920px; position: absole; padding: 0px; }It should be absolute, not absole.
DavidSchalandra # Monday, November 30, 2009 3:33:09 PM
@Amnith
It is in fact a typo, but an intended one. I just forgot to delete the whole position-rule. I will fix it as soon as I'm back home.
Robert Jacobsenrobertj # Monday, November 30, 2009 8:19:08 PM
KimberlySqueakeyCat # Thursday, December 3, 2009 2:39:43 AM
Sami Serolaserola # Wednesday, December 23, 2009 5:56:39 AM
DavidSchalandra # Thursday, December 24, 2009 1:24:47 PM
Sami Serolaserola # Monday, December 28, 2009 9:08:32 AM
ArturMithos # Wednesday, December 30, 2009 2:18:48 PM
I have Windows XP and the latest official Opera 10 version.
DavidSchalandra # Tuesday, January 12, 2010 11:00:28 AM
Sami Serolaserola # Tuesday, January 12, 2010 11:21:04 AM
ArturMithos # Tuesday, January 12, 2010 2:11:21 PM
Originally posted by Schalandra:
It works for me now on this page ^^
edit:
Or not. As i posted the comment, the page looks like before with this strange changing text everywhere. Dunno why it now isn't like before.
Sami Serolaserola # Tuesday, January 12, 2010 2:35:52 PM
DavidSchalandra # Wednesday, January 13, 2010 9:17:52 AM
At the end of this month I'll create a new skin and get rid of this problem.
ArturMithos # Wednesday, January 13, 2010 11:40:41 AM
Originally posted by Schalandra:
Still wondering what's the problem. Is the new skin darker or lighter than this one?
DavidSchalandra # Wednesday, January 13, 2010 1:49:09 PM
Sami Serolaserola # Thursday, February 4, 2010 9:57:22 AM
DavidSchalandra # Thursday, February 4, 2010 10:31:25 AM
Sami Serolaserola # Thursday, February 4, 2010 10:46:13 AM
ArturMithos # Saturday, February 6, 2010 6:40:32 PM
Tengwar Blogtengwarblog # Saturday, March 27, 2010 12:30:04 PM
I run into the same problem with Firefox not embedding the @font-face font. For one, I was told by peter.reisio at mozillaZine that there is a workaround by including the font within the very CSS via base64, see for instance my own user.css. This has the drawback that it significantly embiggens the CSS size.
I also filed a bug at mozilla.org: Cross-Site @font-face embedding with cross-site CSS possible with base64, impossible with own file, since I believe this odd Firefox behaviour should be corrected. Let's see what'll become of it.
DavidSchalandra # Saturday, March 27, 2010 10:35:44 PM
Thanks for that great hint!
Phạm Thành Dươngphamthanhduong # Tuesday, November 9, 2010 9:24:58 PM
DavidSchalandra # Monday, November 15, 2010 2:06:24 PM