3

I am unable to get the width and heigh properties to work for my custom tags please see code below: CSS

 x-slider
 {
    width: 1000px;
    height: 300px;
    border: 1px black solid;    
    background-color: #0000ff;
  }

HTML

<body><x-slider id="CoolPics" page="home"></x-slider></body>

Javascript

  var x = document.registerElement('x-slider', {
    prototype: Object.create(HTMLDivElement.prototype), extends: 'div'
});

I added the Extension of the DIV object to see if that would allow me to specify heigh since some tags do not allow for height. Is it only certain css properties that work with custom tags? Both the border and background color show up, I have tried changing over to both min and max height as well. Please limit response to the question and not the subjective argument of whether you should use custom tags, It made it significantly harder to search for answer for this with every post about custom tags overloaded with those kinda of responses.

4

1 回答 1

6

添加display: blockdisplay: inline-blockx-slider

于 2014-07-20T20:50:39.057 回答