I am supposed to write two more css properties for the styles object but when i write the properties and click run it never stops loading and does not give me an error


#1


var React = require('react');
var ReactDOM = require('react-dom');
var styles = {
  background: 'lightblue',
  color:      'darkred',
  marginTop:  '100px',
  fontSize:   '50px'
};

var styleMe = <h1 style={styles}>Please style me!  I am so bland!</h1>;

ReactDOM.render(
	styleMe, 
	document.getElementById('app')
);


#2

The two elements that I was told to add were marginTop and fontSize. The values of these properties I was told to add are 100px for marginTop and 50px for fontSize. If you think of anything that I am doing wrong please let me know.


#3

Please post a link to this exercise. Thank you.


#4

Here is the link for the exercise that i am having trouble with.
https://www.codecademy.com/courses/react-102/lessons/style/exercises/style-name-syntax?action=lesson_resume


#5

React.js defaults to px units so you don't need them in your declaration. Maybe try using,

marginTop: 100,
fontSize: 50


#6

I tried using just 50 and 100 instead of 100px and 50px, but it still continues to load and does not show me an error or anything.


#7

Did you try reporting the bug using the form in the lesson?

Did you try, Run...Refresh...Run?


#8

I think they fixed the problem or just refreshing the browser fixed the problem. Because the code that just worked was what I wrote before. Thank you mtf for the help.


#9

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.