Skip to content
TheChatArchiveThe Chat Archive
gpt-4-0314· OpenAIAi2 WildChat-4.8M (AI2)

the problem here that background "#1B2827" in ".language-option" doesn't want to go full…

  1. User

    the problem here that background "#1B2827" in ".language-option" doesn't want to go full height after "#night-mode-toggle" switch: body, html { scrollbar-width: 2em; scrollbar-color: #fada38 #000000; overflow-x: hidden; color:black; margin: 0; padding: 0; position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; line-height: 1.6; transition: background-color 2s, color 3s; --overflow:hidden;

    }

    header { background-color: #4caf50; color: #fff; padding: 16px 0px 0px 0px; text-align: center; position: absolute; transition: background-color 2s; width: 100%; height: 18px; right: 0px; z-index:999; }

    h1 { margin: 0 auto; display: flex; justify-content: space-between; align-items: center; font-size: 18px; width: 90%; height: 1%; }

    .background { font-weight: bold; padding: 0px; text-align: center; justify-content: center; align-items: center; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: -1; position: relative; display: flex;

    }

    .background:before { content: '🇬🇧 🇩🇪'; font-size: 10em; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.15; display: flex; white-space: nowrap; } .background-text { display: flex; flex-direction: column; justify-content: center; align-items: center; position: relative;

    z-index: -1; }

    .left::before, .right::before { content: ""; position: absolute; top: 5px; border-bottom: 1px dashed #fff; width: 40%; }

    .left::before { right: 100%; margin-right: 20px; }

    .right::before { left: 100%; margin-left: 20px; }

    .flags-container { width: 100%; position: relative; top: 0; right: 0px; padding: 1px 0; background-color: darkgreen; display: flex; justify-content: center; align-items: center; --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); z-index: 1; }

    .flag-radio { display: none; }

    .flag-label { cursor: pointer; margin: 0 5px; transition: 0.3s; opacity: 0.6; font-size: 24px; }

    .flag-label:hover { opacity: 1; }

    .language-option { position: absolute; top: 0px; left: 0px; right: 0px; bottom: 0px; display: none; justify-content: center; align-items: center; padding-top: 64px; width: 100%; height: 100%; background-color: white; }

    #english-flag:checked ~ #english, #hindi-flag:checked ~ #hindi, #hebrew-flag:checked ~ #hebrew, #chinese-flag:checked ~ #chinese, #french-flag:checked ~ #french, #spanish-flag:checked ~ #spanish { display: block; }

    #night-mode-toggle:checked ~ body, #night-mode-toggle:checked ~ header, #night-mode-toggle:checked ~ .language-option, #night-mode-toggle:checked { background-color: #1B2827; color: #F3EFEF;text-shadow: 1px 1px 2px rgba(42, 81, 21, 0.5); }

    .switch-container { position: absolute; top: 5px; right: 16px; display: flex; align-items: center; justify-content: center; z-index: 2; }

    .switch-container label { content: "🌙"; position: relative; margin-left: 0px; cursor: pointer; user-select: none; align-items: center; justify-content: center; }

    .switch { content: "🌙"; position: relative; cursor: pointer; width: 64px; height: 32px; margin-right: 5px; background-color: darkgreen; border-radius: 15px; transition: background-color 3s; }

    .switch:before { content: "🌿"; display: block; position: absolute; top: 2px; left: 2px; height: 0px; width: 0px; background-color: #121; border-radius: 50%; transition: left 1s; }

    #night-mode-toggle:checked ~ .switch-container .switch { background-color: #121; }

    #night-mode-toggle:checked ~ .switch-container .switch:before { left: calc(100% - 28px);content: "🌙"; }

    p { margin: 15px 5px; --x-blend-mode: Overlay; color: rgba(243, 239, 239, 0.5); background-color: #182C2B; padding:5px 15px; border-radius:10px 10px; text-shadow: 0px 0px 6px 6px rgba(27,40,39,1); box-shadow: 0px 0px 10px 20px rgba(0, 0, 0, 0.2); z-index:1; }

    h2 { width: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 1.5rem; font-weight: bold; --margin: 1em 0; color: #721336; text-shadow: 0px 0px 8px rgba(0, 0, 0, 0.5); background-color: #182C2B; --padding: 0.5em 1em; --border-radius: 0 10px 10px 0; --box-shadow: 0px 0px 5px 10px rgba(10, 100, 10, 0.1); --opacity: 0.8; z-index:2; }

    @media only screen and (max-width: 600px) { h2 { font-size: 1.5rem; padding: 0.5em 0.75em; } }

  2. Assistant

    To make the background of ".language-option" go full height after switching the "#night-mode-toggle", you have to change the position of the ".language-option" from absolute to fixed. You should also remove the top, right, bottom, and left properties because they are not needed. Here's the modification of the ".language-option" styles:

    .language-option {
      position: fixed;
      display: none;
      justify-content: center;
      align-items: center;
      padding-top: 64px;
      width: 100%;
      height: 100%;
      background-color: white;
    }
    

    Your problem should now be solved.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.