Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CDHtmlDialog not working with CSS Media Queries

CDHtmlDialog not working with CSS Media Queries

Scheduled Pinned Locked Moved C / C++ / MFC
csharphtmlcssdatabasevisual-studio
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Don Guy
    wrote on last edited by
    #1

    Hello there, I have a CDHtmlDialog app in which am trying to add a CSS media query in the HTML file as shown below, but it doesn't work. @media(max-width:20em) { table, thead, tbody, tfoot, th, td, tr { display:block; } tr + tr { margin-top:1em; } } The same CSS works fine if i open in a browser like IE, FireFox, Chrome. But inside the CDHtmlDialog app this doesn't work. I am using Visual Studio 2012 for development and have IE 11 installed in my machine. Any ideas? THanks in advance.

    S 1 Reply Last reply
    0
    • D Don Guy

      Hello there, I have a CDHtmlDialog app in which am trying to add a CSS media query in the HTML file as shown below, but it doesn't work. @media(max-width:20em) { table, thead, tbody, tfoot, th, td, tr { display:block; } tr + tr { margin-top:1em; } } The same CSS works fine if i open in a browser like IE, FireFox, Chrome. But inside the CDHtmlDialog app this doesn't work. I am using Visual Studio 2012 for development and have IE 11 installed in my machine. Any ideas? THanks in advance.

      S Offline
      S Offline
      SoMad
      wrote on last edited by
      #2

      I know I already addressed this in my answer to one of your previous questions[^], but let me repeat just to make sure since you did not say if that fixed your problem. The version of IE used in CDHtmlDialog depends on your OS and what version of IE you have installed, but that does not mean it defaults to using IE11 compatibility even if you have IE11 installed. Make sure your HTML file has at the beginning and you might have to have <meta http-equiv="X-UA-Compatible" content="IE=edge"> in your document as well. You might have to take to the registry to get the browser control to behave correctly. Check out this on SO[^], this on MSDN[^] and check your settings by connecting to this[^] Soren Madsen

      "When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

      D 1 Reply Last reply
      0
      • S SoMad

        I know I already addressed this in my answer to one of your previous questions[^], but let me repeat just to make sure since you did not say if that fixed your problem. The version of IE used in CDHtmlDialog depends on your OS and what version of IE you have installed, but that does not mean it defaults to using IE11 compatibility even if you have IE11 installed. Make sure your HTML file has at the beginning and you might have to have <meta http-equiv="X-UA-Compatible" content="IE=edge"> in your document as well. You might have to take to the registry to get the browser control to behave correctly. Check out this on SO[^], this on MSDN[^] and check your settings by connecting to this[^] Soren Madsen

        "When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

        D Offline
        D Offline
        Don Guy
        wrote on last edited by
        #3

        Did the trick for me! :-) Thanks SoMad!

        S 1 Reply Last reply
        0
        • D Don Guy

          Did the trick for me! :-) Thanks SoMad!

          S Offline
          S Offline
          SoMad
          wrote on last edited by
          #4

          Great!

          "When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups