Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div id="uia" >
</div>
              
            
!

CSS

              
                html, body
  height: 100%

body 
  height: 100%
  margin: 0
  padding: 0
  
#mainDiv
  width: 100%
  height: 60%
  margin: auto
  padding-top: 5px
  padding-bottom: 5px
  background-color: DeepSkyBlue
  text-align: center
  border: 2px solid #381F0B
  border-radius: 4px
  margin-top: 20px
  
#buttonsDiv
  width: 25%
  height: 50%
  margin: auto
  margin-bottom: 0px
  padding-top: 5px
  padding-bottom: 0px
  background-color: grey
  text-align: center
  border: 2px solid #381F0B
  border-radius: 4px
  margin-top: 20px
  
.normalBtn
  border: 2px solid #381F0B
  border-radius: 4px
  background-color: white
  
.normalBtn.selected
  border: 2px solid #381F0B
  border-radius: 4px
  background-color: lightblue
  
#applicationGrid
  width: 8%
  height: 10%
  padding-top: 0px
  margin: auto
  font-size: 0
  margin-top: 0px
  padding-bottom: 5px
  background-color: white
  text-align: center
  border: 2px solid #381F0B
  border-radius: 4px
  margin-top: 20px
  
.actionBox
  width: 5px
  height: 5PX
  padding-top: 0px
  display: inline-block
  margin-top: 0px
  padding-bottom: 0px
  background-color: lightgrey
  text-align: center
  border: 1px solid grey
  margin-bottom: 0px
  
#containerfooter 
  background-color: blue
  color: lightblue
  text-align: center
              
            
!

JS

              
                var DisplayBox = React.createClass({ 
  render: function() {
    return(
      <div className="actionBox" id={this.props.divkey} style={{backgroundColor:this.props.divcolor}} >
        </div>
    );
   }, 
  });

 

  var MyApp = React.createClass({  
	getInitialState: function() {
    		return {
      		masterarray: []
    		}  
  	},

    render: function() {
    var displayArray = [];
	  var exposeImageArrayData = JSON.parse(localStorage.getItem('reclist'));
	  
      this.setState({ masterarray: exposeImageArrayData});
      var lengthOfArray = 255;
	  for(var i=0; i<lengthOfArray; i++){
          displayArray.push(<DisplayBox divkey={i} divcolor={this.state.masterarray[i]} />); 
        }
  	  return(
  	    <div className = "mainDiv">
          <div id="applicationGrid" >
      		{displayArray}
            </div>
      	  </div>
   	 );
 	 }, 
	}); 

  ReactDOM.render(
 	 <MyApp />,
 	 document.getElementById('uia')
  );
              
            
!
999px

Console