Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5950463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:23:49+00:00 2026-05-22T17:23:49+00:00

I am working on a webpage for an embedded device where the server storage

  • 0

I am working on a webpage for an embedded device where the server storage space is very limited. I want the user to be able to switch between day mode and night mode viewing of the webpages. To do so I would like to just load the page using a different webpage with a button is clicked. I don’t want to have two copies of every page because I don’t have enough space. Is there a way to switch to a different css page or load the css dynamically somehow? I can only use html and javascript. No PHP or asp.net.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T17:23:50+00:00Added an answer on May 22, 2026 at 5:23 pm

    Let me argue for something even simpler:

    1: One CSS:

    .day {
      color: black;
      background-color: white;
    }
    
    .night {
      color: white;
      background-color: black;
    }
    
    .day #content {
      color: blue;
    }
    
    .night #content{
      color: red;
    }
    

    2: One HTML:

    <html>
      <head>
        <link rel="stylesheet" type="text/css" href="dayornight.css">
      </head>
      <body class="day">
        <div id="content">
            <a>Hello World!</a>
        </div>
      </body>
    </html>
    

    3: A small piece of JavaScript or jQuery code tied to the button that toggles the class on the body tag from day to night.

    As you can see if you bring this example up in your browser, changing the class not only changes the CSS style of the body, it can also shift the contained items as well because their selectors match differently now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, I'm working on a webpage where a user can apply to join
A good day to you. I am working on a webpage but I got
I'm working on a webpage on which I want to discover some UPnP devices,
I'm working on a tooltip-esque application for a webpage, and want a Javascript event
I have uploaded my webpage to a server. My webpage is working fine in
I am working on a webpage and at some point I need to disable
I'm working on a quite simple Webpage (MVC2), using localisation based on Resource Files.
Today I was working on a tab navigation for a webpage. I tried the
I'm currently working in an application that has to navigate a webpage and recollect
Situation: I am working to populate text entry boxes in a webpage with data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.