Polymer doesn't work in IE or edge but in chrome it does, however with a Doctype it doesn't work in chrome either
Asked Answered
B

1

11

I am having some trouble with my polymer project, my code doesn't work in IE, Edge and not even in chrome if I include <!doctype html>. Here's my code:

<!doctype html>
<html>
  <head>
    <link rel="import" href="bower_components/paper-header-panel/paper-header-panel.html">
    <link rel="import" href="bower_components/paper-card/paper-card.html">
    <LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
    <link rel="import" href="bower_components/polymer/polymer.html">
  </head>
  <body>
    <paper-header-panel mode="standard" id>
      <paper-toolbar  style="background-color: some-color">
        <h1>Blah</h1>
      </paper-toolbar>
      <div id="content">
      <div class="center2">
        <h3>Blah Blah Blah<span id="orange">Blah Blah Blah</span></h3>
      </div>
      <paper-card heading="Blah Blah Blah" id="main">
        <div class="card-content">
        </div>
      </paper-card>
      <paper-card heading="Blah Blah Blah" id="main">
        <div class="card-content">
          <img src="img.png" height="200px" id="img"/>
          </br>
          Blah Blah Blah
        </div>
      </paper-card>
      </div>
    </paper-header-panel>
  </body>
</html>

Any help will be valued. Thank You!

Brigadier answered 1/12, 2015 at 17:24 Comment(0)
A
7

You need the polyfill to work in non chrome browsers. I didn't think you did in chrome, but maybe you still do until the next release.

put

<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>

in the header before you start to import any other stuff

Aoristic answered 1/12, 2015 at 19:37 Comment(2)
paper-header-panel only takes two elements directly below it, one for the header and one for the main content you have lots. I think also the header needs height. I think paper-toolbar should be giving you that, but can you check with the dev-tools where it has or not.Aoristic
Sorry, I have surrounded the content with a div but it still does it!Brigadier

© 2022 - 2024 — McMap. All rights reserved.