just all the flags buttons at the very top and initial hidden state with no any actual…
- User
just all the flags buttons at the very top and initial hidden state with no any actual text shown, and after pressing on each flag, it replaces the translation variant and so on. can you do this with only css and html, without any javascripts or libraries? need to show only one translation variant at once by hidding the rest. “While it is not possible to completely achieve this without using JavaScript”. maybe you are just wrong, and it’s possible to trigger hide and show state at the same time, to hide all and display only particular, with only css and html code on page used. neagh. it shows all the translation variants at the same time, no matter what button or flag you will press. there should be some other tricky way to do this hide and show magic, using only css and html. if you could only think for a little longer on this question...: I apologize if my previous response confused you. I see now that it was a misunderstanding on my part. There is indeed a way to achieve this effect using only HTML and CSS. Please find below the updated code:
.flag-radio { display: none; }
.flag-label { cursor: pointer; margin: 0 10px; transition: 0.3s; opacity: 0.6; font-size: 24px; }
.flag-label:hover { opacity: 1; }
.flag-radio:checked ~ .language-option { display: block; padding: 20px; background-color: white; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23); font-size: 18px; }
.language-option { display: none; }
This new version will only display one language at a time while keeping the other languages hidden, using only HTML and CSS. Please let me know if this solution meets your requirements, or if there are any further changes you’d like me to make.
- Assistant
- User
now need to fix these flags on top in place in horizontal line with some micro spacing between the flags with some flex container used and output actual text under these flags in the same fixed and flexed container on whole window. but again, need to do this on by using css and html, without javascripts and else.
- Assistant
- User
for some reason functionality is ruined. maybe because pseudo element selections isn't working withing contained items?
- Assistant
- User
- Assistant