A Guide into Skin CSS Alterations
Forum Index > PokéFarm > Guides >
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 | |
---|---|
Class | Width |
.mq1 | 320px |
.mq15 | 480px |
.mq2 | 640px |
.mq25 | 800px |
.mq3 | 960px |
.mq35 | 1240px |
.mq4 | 1280px |
.mq45 | 1440px |
.mq5 | 1600px |
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
Added a section on the .mq# classes. Now go make all your skins responsive without those pesky @media!
Couple months late but eh I'll look into adding a list of basic snippits soon.
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?
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?
thank you so much for this!! its very helpful
Everstone
Special Evolution Item
(: 0)
A peculiar stone that prevents a Pokémon from evolving when held.
Sells for 250
Likes:
Sweet food
MAX
Jolly nature
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?
Anytime CSS “reverts” trying clearing your cache. It gets stuck sometimes but should fix itself after a few hard cache clears. :o
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
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:
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;}
Alchemist's Fire
Name: Alchemist's Fire Nature: Quirky, Naughty, Impish Type: Status: testing this template to use it for hunt trackingTEXT 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 trackingTEXT HERE
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;}Cannot post: Please log in to post