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··· 1213141516··· 282930

Astrala's AvatarAstrala
Astrala's Avatar

QUOTE originally posted by sammie.qt

I'm working on styling a set of tabs but I've run into a strange issue. I'm still new to the tab code so I'm just modifying the style code for tabbed_interface that's provided in the guide; but the box-shadow property isn't being recognized. Did it change names at some point? Ideally, I just want to remove the box shadow from the tab box entirely. But I'm not able to do this if it's not recognized. :/ What I mean by recognized (just in case): properties in the editor appear periwinkle when they've been recognized, and all properties do this in my editor except box-shadow, which stays black.
Looks like box-shadow: none; works, even without turning blue, which is odd. Try adding it and seeing if your preview changes. For a tab, you have to put it down under the "> .tab, >.tab-active" portion.

Current Hunt

at 0
67/600
6663/50000
sammie.qt's Avatarsammie.qt
sammie.qt's Avatar

QUOTE originally posted by Astrala

previous reply

QUOTE originally posted by sammie.qt

I'm working on styling a set of tabs but I've run into a strange issue. I'm still new to the tab code so I'm just modifying the style code for tabbed_interface that's provided in the guide; but the box-shadow property isn't being recognized. Did it change names at some point? Ideally, I just want to remove the box shadow from the tab box entirely. But I'm not able to do this if it's not recognized. :/ What I mean by recognized (just in case): properties in the editor appear periwinkle when they've been recognized, and all properties do this in my editor except box-shadow, which stays black.
Looks like box-shadow: none; works, even without turning blue, which is odd. Try adding it and seeing if your preview changes. For a tab, you have to put it down under the "> .tab, >.tab-active" portion.
I've tried it with, without, using `none`, using any color I can think of, and I tried adding it into each section of the tabbed_interface styleclass to see if it's just not placed right, but no matter what I do it doesn't affect it. Here is what it looks like in my preview. I've attached the tabbed interface code I'm using; I can give you the entire style code if you'd like as well.

Code

.tabbed_interface { background: #EEEBE0; border: none; box-shadow: none; & > ul { background: #EEEBE0; border: none; & > li { background: #D5CBA7; border: none; padding: 0.5%; color: black; &.tab-active { background: #EEEBE0; color: #464026; } } & > li:hover { cursor: pointer; } } > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; } }
Scoured Delights, my trade shop!
Albino LivingDex 73/1544
Fire Feathers 101/500
Mirzam's AvatarMirzam
Mirzam's Avatar
By default, there is a bottom border on ".tabbed_interface > div", which is .tab/.tab-active. So if you add border color code, or unset the border to that section of your code, it should help. > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; /* change border color */ border-color: red; /* remove border */ border: none; }
sammie.qt's Avatarsammie.qt
sammie.qt's Avatar

QUOTE originally posted by Mirzam

By default, there is a bottom border on ".tabbed_interface > div", which is .tab/.tab-active. So if you add border color code, or unset the border to that section of your code, it should help. > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; /* change border color */ border-color: red; /* remove border */ border: none; }
Nothing changes when I add those lines of code, the interface just shifts a little upward. But the box shadow still exists and does not change color. edit; the post in question where I'm messing with this code is in this thread for your reference.
Mirzam's AvatarMirzam
Mirzam's Avatar
Can you post a link to the post with the code, or post the code in its active form here? I'd like to be able to inspect the tabs with the dev tools. Edit: Oooops just saw your edit, going to look brb
sammie.qt's Avatarsammie.qt
sammie.qt's Avatar

QUOTE originally posted by Mirzam

Can you post a link to the post with the code, or post the code in its active form here? I'd like to be able to inspect the tabs with the dev tools.
I edited it in right before you posted, but here's the link again!
Astrala's AvatarAstrala
Astrala's Avatar
I used your code on my test tabs, adding "box-shadow: none;" under "> .tab, > .tab-active" and it works fine for me to remove the shadow.
  • Title 1
  • Title 2
  • Title 3
contents 1
contents 2
contents 3

Box-Shadow: none

.tabbed_interface { background: #EEEBE0; border: none; & > ul { background: #EEEBE0; border: none; & > li { background: #D5CBA7; border: none; padding: 0.5%; color: black; &.tab-active { background: #EEEBE0; color: #464026; } } & > li:hover { cursor: pointer; } } > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; box-shadow: none; } }
Mirzam's AvatarMirzam
Mirzam's Avatar
Ok, in the screenshot it looked just like the border to me - but it looks like you need to remove both, the border and the box shadow. Removing the border will cause some of the contents to shift up 1px, since the border is 1px big. If, for some reason, you didn't want that, the easy solution is to change the border color to match the background color, or set it to "transparent". (probably doesn't matter much here, but can in other contexts) > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; border: none; box-shadow: none; }
sammie.qt's Avatarsammie.qt
sammie.qt's Avatar

quotes

QUOTE originally posted by Astrala

I used your code on my test tabs, adding "box-shadow: none;" under "> .tab, > .tab-active" and it works fine for me to remove the shadow.
  • Title 1
  • Title 2
  • Title 3
contents 1
contents 2
contents 3

Box-Shadow: none

.tabbed_interface { background: #EEEBE0; border: none; & > ul { background: #EEEBE0; border: none; & > li { background: #D5CBA7; border: none; padding: 0.5%; color: black; &.tab-active { background: #EEEBE0; color: #464026; } } & > li:hover { cursor: pointer; } } > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; box-shadow: none; } }

QUOTE originally posted by Mirzam

Ok, in the screenshot it looked just like the border to me - but it looks like you need to remove both, the border and the box shadow. Removing the border will cause some of the contents to shift up 1px, since the border is 1px big. If, for some reason, you didn't want that, the easy solution is to change the border color to match the background color, or set it to "transparent". (probably doesn't matter much here, but can in other contexts) > .tab, > .tab-active { background: #EEEBE0; color: #464026; padding: 2.5%; border: none; box-shadow: none; }
Thank you both; I could have sworn I was messing with the box shadow property in each spot and it didn't affect anything, but it seems it just needed to be placed elsewhere!
Astrala's AvatarAstrala
Astrala's Avatar
No problem! The tabs took a bit for me to figure out, too, because it feels like the active tab window should be modified by the sections above rather than needing that bottom one.

Pages: 123··· 1213141516··· 282930

Cannot post: Please log in to post

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