Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
DarkxPunk
@DarkxPunk
Who is up at this time of night?
Ravi Kishore Thella
@ravikishorethella
:raised_hand:
DarkxPunk
@DarkxPunk
Hey I'm not alone for once on here, yay. @ravikishorethella How you doing tonight?
Ravi Kishore Thella
@ravikishorethella
@DarkxPunk I am doing good. How about you?
DarkxPunk
@DarkxPunk
Livin life.
Ravi Kishore Thella
@ravikishorethella
:smile:
DarkxPunk
@DarkxPunk
I jumped on here in the hope of putting forth an issue I am having and wondering if anyone has an interesting solution.
Ravi Kishore Thella
@ravikishorethella
What is the issue?
DarkxPunk
@DarkxPunk
However since @ravikishorethella you are the only one that is on, wanna help XD
Ravi Kishore Thella
@ravikishorethella
@DarkxPunk I will try :smile:
DarkxPunk
@DarkxPunk
Well I am trying to come up with a clean, pure css way to hide and show info. The specific case here is flipping between contact forms by clicking a button. Now I have successfully built the hide show function in two ways, one by using radio buttons and :checked and another by using :target, but I always end up with styling limitations, and need to specifically address the ids of each element which isn't ideal. Let me quickly throw up my example on code pen and you can have a look.
piratecoder
@jvondarke
anyone try drunk coding? lol can't imagine why my code isn't working
DarkxPunk
@DarkxPunk
@jvondarke Only sleep deprived coding
piratecoder
@jvondarke
aye thats just as bad
Ravi Kishore Thella
@ravikishorethella

that's worth trying, ig

anyone try drunk coding? lol can't imagine why my code isn't working

DarkxPunk
@DarkxPunk
Trying to find where you forgot to add a ";" when you are running on 1h sleep is always fun
piratecoder
@jvondarke
oh man i can only imagine @DarkxPunk
@ravikishorethella hell yea dude it really clears your mind when your trying to figure something out
Ravi Kishore Thella
@ravikishorethella
@jvondarke are you trying that now?
piratecoder
@jvondarke
maybe.....my code is not working....
DarkxPunk
@DarkxPunk
What isn't working
piratecoder
@jvondarke
my code, trying to make my portfolio lol
Ravi Kishore Thella
@ravikishorethella
can you share your codepen link?
jhonasr
@jhonasr
Hi, who knows how to auto select form-group option when selecting an option from another form-group
DarkxPunk
@DarkxPunk
wipes brow Okay got the code pen for my issue: https://codepen.io/DarkxPunk/pen/rdxrXx?editors=1100
@jhonasr Not sure the question
@ravikishorethella So Ravi, as you can see both of these work correct?
Ravi Kishore Thella
@ravikishorethella
@DarkxPunk what are you working on? I mean what is the question?
DarkxPunk
@DarkxPunk
Well I am trying to further simplify these two pure css hide/show systems and figure out in the target example how to show Input 5 at the start without first clicking...
And there is just the first of the issues/limitations I have come across with these two systems
Ravi Kishore Thella
@ravikishorethella
So, you don't want checked exmaples to display when you click target right?
DarkxPunk
@DarkxPunk
No no no, these are two separate systems, I am playing with both to see which one will provide me with the most optimal solution.
jhonasr
@jhonasr
@DarkxPunk For example, I have a select group1 with some options i'd like that when selecting one option from group1 automatically select a value in a select group2
coderNewby
@coderNewby
thanks @DarrenfJ
CamperBot
@camperbot
codernewby sends brownie points to @darrenfj :sparkles: :thumbsup: :sparkles:
:star2: 2423 | @darrenfj |http://www.freecodecamp.org/darrenfj
DarkxPunk
@DarkxPunk
@jhonasr Well that would need to be done with some JS, these check boxes?
@jhonasr Do you have your sample code somewhere?
Ravi Kishore Thella
@ravikishorethella
@DarkxPunk I would go with the target. It makes sense cause, the information won't be displayed unless the user clicks something.
DarkxPunk
@DarkxPunk
@ravikishorethella Well :target is the one I am leaning on since it seems most optimal, especially since I can link to the data from anywhere on the page, however the first issue I ran into with :target was how do I display the first info when the page loads without having to :target it...
@ravikishorethella With :checked it is easy, in the HTML I just set the first one to checked, and that status changes when people click on the different labels, but not so easy with :target.
@ravikishorethella I wanted to even try a hybrid solution, problem is you can't trigger labels and anchors at the same time XD
Ravi Kishore Thella
@ravikishorethella
@DarkxPunk you don't have to display any information. Let it be. You can load the information when someone request for it. The first option(checked) is pretty naive
DarkxPunk
@DarkxPunk
In this case I do need to display the info by default, the design I was given for this requires the first item to be displayed at all times. (I am coding the design a company has given to me)
Ravi Kishore Thella
@ravikishorethella
okay. There you go. It's a requirement :smile:
DarkxPunk
@DarkxPunk
Exacly so how do I do this while sticking with :target, that is problem one XD
Ravi Kishore Thella
@ravikishorethella
lets try to make it work
DarkxPunk
@DarkxPunk
Now at one point I did make it work, but I had to target each individual id, which obviously was not optimal. Bascially a if #b:targeted ~ #a { not visible } and I had to do it three additional times while saying #a { visible } by default.
But if I have to create a new rule every time I add a new data div then it is a nightmare.
Oh I forgot to also add, I had to also make the targets spans stacked above the data so that I could cascade down and style the actual data xD