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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:25:53+00:00 2026-05-18T20:25:53+00:00

Here’s my situation: I am editing an application’s CSS style sheet. I can ONLY

  • 0

Here’s my situation:

  1. I am editing an application’s CSS style sheet.
  2. I can ONLY edit the CSS style sheet (unless I can creatively glom onto another file using the CSS, or possibly add a small jQuery prepend statement in an existing .js)
  3. Application is ONLY ie6, ie7 and ie8 compliant. They never use FireFox, and it’s not an option.

Looking for help with:

1) I think I need to use jQuery to “prepend/prependTo” a “doctype ” on to

html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"

Without the !doctype it throws ie8 into quirksmode and of course doesn’t accept any styles such as “input[type=checkbox]”

I have not used prepend before. Can you help me with full and correct syntax on how to make the following:

CURRENT: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

DESIRED: <doctype html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">

This has not worked for me yet $("html ").prepend("doctype ")

  • 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-18T20:25:53+00:00Added an answer on May 18, 2026 at 8:25 pm

    It’s not <doctype html>. It’s:

    <!DOCTYPE html>
    <html (xmlns or any other attributes you want)>
    

    <!DOCTYPE is not an element. It has <! at the start, which is invalid for an element. This is the the “doctype declaration”, and it cannot usefully be altered after initial parsing.

    Even on browsers whose DOM interfaces let you move/replace the DocumentType node representing the doctype declaration, this does not have the effect of changing between Quirks and Standards mode, which is something that is decided only at initial load time. You cannot mutate a document between modes.

    You can load a new document from the existing document but with a changed mode:

    <!-- no doctype, loads in Quirks Mode (BackCompat) -->
    <html>
        <!-- rest of the document, then at the end: -->
    
        <script>
            alert('now in compatMode '+document.compatMode);
            if (document.compatMode==='BackCompat') {
                setTimeout(function() {
                    var markup= document.documentElement.innerHTML;
                    markup= '<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">'+markup+'</html>';
                    document.open();
                    document.write(markup);
                    document.close();
                }, 0);
            }
        </script>
    </html>
    

    But I would strongly advise against it. It’s ugly, will reset any state and redraw at the end of load time, and has all sorts of negative implications for scripting.

    If you want Standards Mode, you really need to be adding the doctype to the HTML itself. If you absolutely can’t touch the application, how about using an ISAPI filter (assuming your web server is IIS) to add the doctype to its HTML output?

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

Sidebar

Related Questions

Here's my code in the <head></head> : <link rel=stylesheet href=http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css /> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script>
Here is the css: #content ul { font-size: 12px; } I am trying this:
Here is format what I want to get yyMMddHHmmssWWNZ array<Char>^date_ = this->date_datepicker->Value.ToString(yyMMddHHmmssWWNZ)->ToCharArray(); How can
Here's my fiddle - http://jsfiddle.net/UBHj8/ So my problem is pretty obvious, just can't seem
Here's the code I have. It works. The only problem is that the first
Here is my code: import re pattern_str = '(?P<style>[^|]*>)\|(?P<tags>[^|]*)' p = re.compile(pattern_str) m =
Here's the view: @if (stream.StreamSourceId == 1) { <img class=source src=@Url.Content(~/Public/assets/images/own3dlogo.png) alt= /> }
Here is the code in a function I'm trying to revise. This example works
Here is the code: create table `team`.`User`( `UserID` bigint NOT NULL AUTO_INCREMENT , `Username`
Here is my work environment: Eclipse Juno as IDE with maven2 plugin on it

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.