Active Bottom Tab Rounding.
I would like to round the corners in a way like this this code does for the middle tab, when that tab is active, however would I switch out the round at the bottom with code. I feel like I am overthinking how I should approach this.
22 Replies
Not sure I understand the question. What are you trying to change about the active tab?
So on the bottom left and right of it, see how the inactive tabs are rounded so that it looks like one bar. I am having trouble thinking of how to do that as you click through the tabs
With that if lets the the right most tab is active then the middle tab bottom right border would be rounded and the div colored to the same thing as the blue bar.
So you don't have that gap
oh I see
almost like an inverted radius lol
::before, ::after?
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
I think you can achieve it with a background color
oh whoops
arcanist beat me to it
š
was playing in a codepen
arcanist's suggestion is better than mine because mine messes up with the top border radii
https://codepen.io/jhnance/pen/MWBWyRO you can see here the background peeks out between the top borders
May you elaborate?
So like instead of the bottom border from my codepen you could just make a div whose background color matches the color of the active tab and move it partially underneath the tabs so that it covers the gaps made by the bottom rounded corners and still sticks out some underneath all the tabs
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
Nice š
The top is a little messed up then
That's actually what I did there
My problem is changing it when a new tab is selected
Unknown Userā¢2y ago
Message Not Public
Sign In & Join Server To View
The ones next to it would have to change
Use the ::before and ::after selectors and manipulate the elements in that way.
There's a bunch of google examples for this issue you're mentioning, did you look through them?
I am definitely struggling, just stepped away from my computer, but tried converting this into tailwind
Supun Kavinda
LogRocket Blog
How to create fancy corners with CSS - LogRocket Blog
You can create all kinds of snazzy corners ā rounded, random, and everything in between ā using only border-radius, box-shadow, and pseudo-elements.
And it looks like everything but that lol
Figured it out for the right bottom side
with this added to tailwind config