Loading...

Top
PFQ Banner

This is PokéFarm Q, a free online Pokémon collectables game.

Already a user? New to PFQ?

A Guide into Skin CSS Alterations

Forum Index > PokéFarm > Guides >

Pages: 12

Ganorith's AvatarGanorith
Ganorith's Avatar

A Guide into Skin CSS Alteration

Introduction:

So, you made a skin with the perfect color choices that match perfectly together. However, you feel something is off. Maybe you don't like having shadows. Maybe you want everything to have straight corners. That's where this guide comes in! This guide helps to introduce you, the reader, into having full mastery over the simple text box known as "Extra CSS".

The Inspector:

An example of Chrome's Inspector.Most modern internet browsers have something built into them known as the DOM Inspector. This lets you look at the HTML file of the page you are currently on, as well as other things not important to this guide. This will be your main tool for finding what to edit in your "Extra CSS". The way to open your Inspector depends on your browser:
  • Internet Explorer: F12, or Right Click + "Inspect Element".
  • Edge: F12. After you hit F12 for the first time, "Inspect Element" is added to your right click.
  • Chrome/Vivaldi: F12, Ctrl + Shift + I, or Right Click + "Inspect". This most likely works on all Chromium based browers, but there are a lot of them out there and I don't have the patience to test each one.
  • FireFox: Tools > Web Developer > Inspector, or Right Click + "Inspect Element"
  • Opera: Ctrl + Shift + I, Page > Developer > Opera Dragonfly
  • Safari: Safari > Preferences > Advanced then select "Show Develop menu in menu bar" to add "Develop" to your menu bar. Develop > "Show Web Inspector".
For the purposes of the guide, Chrome's Inspector will be used.
Now, with your inspector open, get used to using it and it's features. Your most important tool inside the inspector is what I dub as the "selector", often shown as
in the inspector. This allows you to select any element on the page to find it's class. On most inspectors, to the right/on the bottom of the HTML is a list of Styles. These are what we will be editing.

Editing the Skin:

What you need to copyYou'll need to have CSS knowledge from here on out.
Hopefully you've spent some time playing with the inspector because now it's time to edit your skin. I recommend having two windows open side by side while editing your skin: One with the skin page and one for looking for classes. Now here comes the easy part: copy the the entire selector for your see (as shown in the image) then paste it into your "Extra CSS". This is what we will be applying our CSS to.
#navigation>#navbtns>li>a, #navigation>#navbookmark>li>a { border: 1px solid red; }
...And that's it. Rinse and repeat for everything you want to change. Pat yourself on the back: your skin now looks more different than anyone elses. Keep in mind changes don't happen automatically since browsers typically cache the stylesheet of the site. Most browsers reset this cache after a while, but most browsers let you force a refresh using Shift + F5.

The Media Query Classes

Now that you've edited your skin, with all your fancy effects, you decide to test it on mobile. Then terror strikes as you realize that your skin breaks in certain parts due to how you coded things! Quite a tragic tale, but we can fix that. Normally, this would be done with a @media, but lucky for us, there are classes built into PFQ that let us do exactly that! No need to mess with those pesky widths. Below is a table of classes that you can use and what widths they appear at. All of these are attatched to the <html> near the very top of the document, so they should be the first class in your list. Keep in mind that the classes with the larger widths will always appear with those smaller on the scale (for example, .mq45 will always appear when the width is below a width of 1455px).
Built in Media Query classes
ClassWidth
.mq1320px
.mq15480px
.mq2640px
.mq25800px
.mq3960px
.mq351240px
.mq41280px
.mq451440px
.mq51600px
If you want to see these in action, try changing the width of your browser. You can also use Alt + 1 - 5 to see them (keep in mind Alt + 5 just defaults to your brower's width.)

Using !important:

Using !important forces the browser to render that line of CSS unless another !important is used down the line. The first rule of !important is don't use !important. Not only is it poor practice and can mostly always be avoided, but using !important will affect forum templates, potentially even breaking some. If you want to effect the styling of everything, it would be much better to get all the classes individually.

Final Words:

Thanks for reading the entire way through! Also, thanks to DrWho for the specific widths of the .mq# classes. If you have any questions, feel free to reply to this thread.
PFP/BG/IMG from Golden Sun Code Collection
I adore this guide! But perhaps on another post, you could create a compilation of basic Extra CSS codes, such as changing the notification icon?
avatar [ carousel-horses on dA ]
AM BROKE CHILD, PLS BUY MY ART: chibs
Ganorith's AvatarGanorith
Ganorith's Avatar
Added a section on the .mq# classes. Now go make all your skins responsive without those pesky @media!

QUOTE originally posted by ashlynScribbles

I adore this guide! But perhaps on another post, you could create a compilation of basic Extra CSS codes, such as changing the notification icon?
Couple months late but eh I'll look into adding a list of basic snippits soon.
BEAST22's AvatarBEAST22
BEAST22's Avatar

QUOTE originally posted by ashlynScribbles

I adore this guide! But perhaps on another post, you could create a compilation of basic Extra CSS codes, such as changing the notification icon?
Hi! I saw your post and only then realized how much I wanted to change the icon too, so I set out for a solution and found one online. Here The black box that says CSS in an orange header is what you want. The text in that box needs to be modified in a couple ways for our purposes. 1. The "-moz-box-sizing" property is only necessary if you're using firefox (I'm pretty sure at least). 2. The url for the "background" property needs to be the url of the image that you want to replace the absol head with. The image must be 48px by 48px in order to fit. If the image you wanna use is a file on your computer, you'll need to upload the image to pokefarm first. 3. The width and height properties have to match the height and width of your new image (ex. 48px by 48px is what the absol head image is). 4. The "padding-left" property needs to be the same width as your new image, like in step 3. Now, that's great and all, but in order for us to actually be able to change the image, we need to access that image. If you select the absol head using the selector tool described in this forum, there isnt actually an id to access the image with. To be able to select the specific image, you need to click the three little dots that are next to the selected code in the html viewer, and then mouseover copy from the menu, and select "copy selector." Once thats done, you can paste that selector you copied before the brackets in your "extra CSS" text box. TL;DR because I am way too elaborate for my own good, or you just dont care to know how its done, this is what your final code will look like inside the "extra CSS" text box: #notifs > a > img{ display: block; box-sizing: border-box; background: url(IMAGE_URL_GOES_HERE.jpg) no-repeat; width: 48px; height: 48px; padding-left: 48px; } "#notifs > a > img" being the selector, and the "IMAGE_URL_GOES_HERE.jpg" being whatever picture you want. Sorry that was so long but it works, and it should work for any image in pokefarm you want as well. Hope it helped!
rêveur's Avatarrêveur
rêveur's Avatar
thank you so much for this!! its very helpful
Everstone

Everstone

Special Evolution Item

(: 0)

A peculiar stone that prevents a Pokémon from evolving when held.

Sells for 250

Lv. 58 — 4,183 / 10,267
Aspear BerryAspear Berry
Aspear Berry (SOUR)
Cheri BerryCheri Berry
Cheri Berry (SPICY)
Chesto BerryChesto Berry
Chesto Berry (DRY)
Pecha BerryPecha Berry
Pecha Berry (SWEET)
Rawst BerryRawst Berry
Rawst Berry (BITTER)
Likes:
Sweet food
Rock
Happiness MAX
Jolly nature
Timesheets's AvatarTimesheets
Timesheets's Avatar

QUOTE originally posted by BÊÂST22

QUOTE originally posted by ashlynScribbles

I adore this guide! But perhaps on another post, you could create a compilation of basic Extra CSS codes, such as changing the notification icon?
Hi! I saw your post and only then realized how much I wanted to change the icon too, so I set out for a solution and found one online. Here The black box that says CSS in an orange header is what you want. The text in that box needs to be modified in a couple ways for our purposes. 1. The "-moz-box-sizing" property is only necessary if you're using firefox (I'm pretty sure at least). 2. The url for the "background" property needs to be the url of the image that you want to replace the absol head with. The image must be 48px by 48px in order to fit. If the image you wanna use is a file on your computer, you'll need to upload the image to pokefarm first. 3. The width and height properties have to match the height and width of your new image (ex. 48px by 48px is what the absol head image is). 4. The "padding-left" property needs to be the same width as your new image, like in step 3. Now, that's great and all, but in order for us to actually be able to change the image, we need to access that image. If you select the absol head using the selector tool described in this forum, there isnt actually an id to access the image with. To be able to select the specific image, you need to click the three little dots that are next to the selected code in the html viewer, and then mouseover copy from the menu, and select "copy selector." Once thats done, you can paste that selector you copied before the brackets in your "extra CSS" text box. TL;DR because I am way too elaborate for my own good, or you just dont care to know how its done, this is what your final code will look like inside the "extra CSS" text box: #notifs > a > img{ display: block; box-sizing: border-box; background: url(IMAGE_URL_GOES_HERE.jpg) no-repeat; width: 48px; height: 48px; padding-left: 48px; } "#notifs > a > img" being the selector, and the "IMAGE_URL_GOES_HERE.jpg" being whatever picture you want. Sorry that was so long but it works, and it should work for any image in pokefarm you want as well. Hope it helped!
Hi! I tried it and it only worked for a few pages on the site. It would return to the Absoul icon. Is there anything I'm doing wrong? Here's my code: #navigation>#navbtns>li>a, #navigation>#navbookmark>li>a{ border: 1px solid red; } #notifs > a > img{ display: block; box-sizing: border-box; background: url(https://pokefarm.com/upload/Timesheets/lol.png) no-repeat; width: 48px; height: 48px; padding-left: 48px; }
KishanHaru's AvatarKishanHaru
KishanHaru's Avatar
Anytime CSS “reverts” trying clearing your cache. It gets stuck sometimes but should fix itself after a few hard cache clears. :o
SCA ♪ 🌸 Wiki Help 🌸 SpecialsPM MeMy Shoppe~ Current Hunt: Mudkip
B> Lunar Wings for 20 ZC ea.
I'm struggling with a CSS template for a journal post. I'm trying to use this free-to-use template from buckembarnes, which I discovered in InsaneHysteria's journal The issue I'm having is with the icon in the .sideIMG class selector

CSS

.sideImg{background-image:url('https://pokefarm.wiki/images/3/3b/Melanistic_Chikorita.png');float:left;width:130px;height:130px;border-radius:30px;border:0px solid #463971;margin-top:30px;background-repeat:no-repeat;background-size:contain;}
It works just fine with that image from the Wiki, but when I try to use an icon that I uploaded to the site with the Image Uploader, I lose all the other images from the template:

Alchemist's Fire

Name: Alchemist's Fire Nature: Quirky, Naughty, Impish Type: Status: testing this template to use it for hunt tracking
TEXT HERE
Avatar credits: Melan Plusle & Minun Galaxy avatar made by Sharpy, (for my use only)
My apologies for double-posting, but this is what it looks like when it's working properly:

Alchemist's Fire

Name: Alchemist's Fire Nature: Quirky, Naughty, Impish Type: Status: testing this template to use it for hunt tracking
TEXT HERE
Mirzam's AvatarMirzam
Mirzam's Avatar
Because your name has a single quote in it, that is ending the image URL too early and causing the problem. If you wrap the image link in double quotes " " instead, or escape the ' in your name with a \ (so it's Alchemist\'s_Fire) you will not have this problem. You will need to do this with any CSS backgruond images you use that are uploaded under your name on the PFQ image uploader. Images using the [ img ] code should be fine.
.sideImg{background-image:url(
"
https://pokefarm.com/upload/Alchemist's_Fire/Art/Avatars/Gluebag-fireavi.jpg
"
);float:left;width:150px;height:150px;border-radius:30px;border:0px solid #463971;margin-top:30px;background-repeat:no-repeat;background-size:contain;}

Pages: 12

Cannot post: Please log in to post

© PokéFarm 2009-2024 (Full details)Contact | Rules | Privacy | Reviews 4.6★Get shortlink for this page