Loading...

Top
PFQ Banner

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

Already a user? New to PFQ?

Guide to CSS: Beginner to Expert

Forum Index > PokéFarm > Guides >

Pages: 123··· 252627282930

Shiny Espurr's AvatarShiny Espurr
Shiny Espurr's Avatar
Struggling with .expbar haha. Trying to figure out how to make the part that is displaying as pink as a different color. The "active progress" seems to be defaulting to my skin color, which is not what I want.
x0 [Shop] [Journal] [Credits]
Orchid's AvatarOrchid
Orchid's Avatar
This is the code I use: .expbar {padding: 5px; background: @bkg8; color: @text; border-radius: 0px; width: 90%; border: 2px dotted @border5;} .expbar div {background: @bkg9; border-right: 2px solid @border4} .expbar span {color: @text;} This particular one uses a gradient.
0/15 Z-Fragments
0 Type Race Hunt: 26 / 1805 / 0 Journal Avatar by Janssi for my use only

QUOTE originally posted by Orchid

snip!
hihi! i just wanted to let you know that your code could be made much easier :3 try using: .expbar { (insert your general settings here) &>div { (div settings go here) } &>span { (span settings go here) } } it's much easier to read and keep track of so that you're not repeating .expbar over and over and losing your spot or having any potential arguments :3c oftentimes, you'll see code take up one line for each thing because it also makes *that* easier to read and keep track of, so spacing everything out is really beneficial :D ofc if youre comfy then don't change, just thought i'd poke in this is the code that i tend to use! .expbar { background: #COLOUR; border: 1px solid #COLOUR; border-radius: 0; color: #COLOUR; display: flex; align-items: center; justify-content: center; &>div { border: none; background: #COLOUR; } &>span { color: #COLOUR; background: #COLOUR; border-radius: 10px; border: 1px solid #COLOUR; padding: 5px; } }
Example

Mochi ✪ 21 ✪ they/he/kit


Your local catboy hoarding quirky, bashful, and docile mons!
500/500
Odds and Ends - Orthrus' - My Guide

Type Race and Hunts!


Score: 0
Made by LycanKai
Current Hunt: Orthworm! Most Recent Melan: Nincada!
Coded by Me! Credits
Orchid's AvatarOrchid
Orchid's Avatar

QUOTE originally posted by JustCallMeMochi

snip!
Oooo! Thank you! I'm always looking to improve and shorten my code! I'll have to play with this later.
never mind ignore this
Star | She/Her | Psychopath
BORED TO DEATH!!
Collecting
x 500 x 500
Sells a variety of things!
Credits
Full credits here. PFP => Salty_Lightning on Pinterest Button => Kaelwolfur
Monclops123's AvatarMonclops123
Monclops123's Avatar
Hullo! Brand new to css and BBCode. Trying to display my type order for the type race and have all types grayscale except for my active type. I was able to make everything grayscale using a style class but if I apply a different style class to the active type it creates a line break. How do I make it stay inline? Current code w/o active type: [style].notcurrent {filter: grayscale(1);} [/style] Type Race Rotation: [sc=notcurrent][type=flying][type=bug][type=grass][type=fairy][type=dragon][type=poison][type=ghost][type=electric][type=steel][type=rock][type=fire][type=ice][type=dark][type=fighting][type=water][type=psychic][type=normal][type=ground][/sc]
Orchid's AvatarOrchid
Orchid's Avatar

QUOTE originally posted by Monclops123

Hullo! Brand new to css and BBCode. Trying to display my type order for the type race and have all types grayscale except for my active type. I was able to make everything grayscale using a style class but if I apply a different style class to the active type it creates a line break. How do I make it stay inline? Current code w/o active type:Type Race Rotation:
Neonyan has this post which is essentially what you're trying to do, just it uses different images.
Monclops123's AvatarMonclops123
Monclops123's Avatar

QUOTE originally posted by Orchid

QUOTE originally posted by Monclops123

Hullo! Brand new to css and BBCode. Trying to display my type order for the type race and have all types grayscale except for my active type. I was able to make everything grayscale using a style class but if I apply a different style class to the active type it creates a line break. How do I make it stay inline? Current code w/o active type:Type Race Rotation:
Neonyan has this post which is essentially what you're trying to do, just it uses different images.
Thank you! I just needed to set the display to flex and now it works! Also, big thanks to Neonyan for the example code! Type Race Rotation:[ ][sc=notcurrent][ ][type=flying][ ][type=bug][ ][type=grass][ ][type=fairy][ ][type=dragon][ ][type=poison][ ][type=ghost][ ][type=electric][ ][type=steel][ ][type=rock][ ][b][type=fire][/b][ ][type=ice][ ][type=dark][ ][type=fighting][ ][type=water][ ][type=psychic][ ][type=normal][ ][type=ground][ ][/sc] [pkmnpanel=fqdH0] [style] .notcurrent { display: flex; flex-wrap: wrap; align-items: center; img {filter: grayscale(1);} b { img {filter: grayscale(0);}} } [/style] Type Race Rotation:
Lv. 9 — 270 / 339
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:
Spicy food
RockFlying
Happiness MAX
Brave nature
Monclops123's AvatarMonclops123
Monclops123's Avatar

QUOTE originally posted by Monclops123

QUOTE originally posted by Orchid

QUOTE originally posted by Monclops123

Hullo! Brand new to css and BBCode. Trying to display my type order for the type race and have all types grayscale except for my active type. I was able to make everything grayscale using a style class but if I apply a different style class to the active type it creates a line break. How do I make it stay inline? Current code w/o active type:Type Race Rotation:
Neonyan has this post which is essentially what you're trying to do, just it uses different images.
Thank you! I just needed to set the display to flex and now it works! Also, big thanks to Neonyan for the example code! Type Race Rotation:[ ][sc=notcurrent][ ][type=flying][ ][type=bug][ ][type=grass][ ][type=fairy][ ][type=dragon][ ][type=poison][ ][type=ghost][ ][type=electric][ ][type=steel][ ][type=rock][ ][b][type=fire][/b][ ][type=ice][ ][type=dark][ ][type=fighting][ ][type=water][ ][type=psychic][ ][type=normal][ ][type=ground][ ][/sc] [pkmnpanel=fqdH0] [style] .notcurrent { display: flex; flex-wrap: wrap; align-items: center; img {filter: grayscale(1);} b { img {filter: grayscale(0);}} } [/style] Type Race Rotation:
Lv. 9 — 270 / 339
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:
Spicy food
RockFlying
Happiness MAX
Brave nature
Wait, this works in my About Me but not in the post?
Mio Xenoblade's AvatarMio Xenoblade
Mio Xenoblade's Avatar
been playing around with this for ages and i can't seem to work it out! how do i make tabs go to the right? i know how to make them vertical, but they go to the left and i can't work out what i need to change to make them go to the right.
juno
mio is fine too!
| adult | any pronouns | pfq's otter hoarder
f2u codecode shoptrade shopjournal
art by me for my use only!

Pages: 123··· 252627282930

Cannot post: Please log in to post

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