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!

Peter Warrington
  • 654
  • 10
  • 32

1 Answers1

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

akc42
  • 4,893
  • 5
  • 41
  • 60
  • 1
    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. – akc42 Dec 01 '15 at 19:47
  • Sorry, I have surrounded the content with a div but it still does it! – Peter Warrington Dec 01 '15 at 19:53