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 5958787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:35:33+00:00 2026-05-22T18:35:33+00:00

I am redesigning a client’s website so they will be able to edit the

  • 0

I am redesigning a client’s website so they will be able to edit the website themselves. What I intend on doing is have the main “Front End” pages with a mix of html and php in them. The html renders the page while the php includes a external menu and grabs the content for the individual page allowing the content to be safely edited without harming the main page.

Now the problem is a have a CSS document linked that loads the menu I have two of these however whats happening is that i added some javascript to detect screen size and load a different css document if the screen is smaller then a certain size, however the website is seemingly loading half the css, it formats the menu but leaves it all in a block.

The version of the site I am working on is available at http://www.letsmine.info/Yoga

The main page without the .php extensions (To prevent the loading of the php) is http://www.letsmine.info/Yoga/index.txt

The menu is http://www.letsmine.info/Yoga/templates/menu.php

I believe the problem is javascript but I am not 100% sure.

  • 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-22T18:35:34+00:00Added an answer on May 22, 2026 at 6:35 pm

    Change the order of your included files.

    Currently you have this:

    <script type="text/JavaScript"> 
    var screenwidth = screen.width;
    if (screenwidth < 1180){
    document.write('<link rel="stylesheet" href="css/ldrop.css" type="text/css" media="screen" />');
    }
    else
    {
    document.write('<link rel="stylesheet" href="css/drop.css" type="text/css" media="screen" />');
    }
    </script> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
    <title>Alignment Courses</title> 
    <link href="css/styles.css" rel="stylesheet" type="text/css" /> 
    

    Change it to this:

    <link href="css/styles.css" rel="stylesheet" type="text/css" /> 
    <script type="text/JavaScript"> 
    var screenwidth = screen.width;
    if (screenwidth < 1180){
    document.write('<link rel="stylesheet" href="css/ldrop.css" type="text/css" media="screen" />');
    }
    else
    {
    document.write('<link rel="stylesheet" href="css/drop.css" type="text/css" media="screen" />');
    }
    </script> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
    <title>Alignment Courses</title> 
    

    Reason? The last CSS document to be loaded takes precedence. So load the default styles first and the overriding styles last.

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

Sidebar

Related Questions

I'm currently redesigning my website and have been looking into using JavaScript and jQuery.
I'm currently redesigning a website and have run into an issue with some elements
I have a classifieds website, and I am thinking about redesigning the database a
Our team is currently working on completely redesigning our school's website and one of
I have a problem with a site I am redesigning and the problem is
I am working on redesigning a website for my fathers business based on the
We are redesigning table schema in postgres. It used to have a linker table
Hey all,     I'm redesigning the infrastructure for a website, and I want to make
I am redesigning a solution's architecture to implement SOA . After doing the design
I am redesigning a new website and my database table need tidying up a

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.