Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Yaswanth Goli
Yaswanth Goli
6,872 Points

How to apply style to content loaded by ajax

My problem is i am getting response for my ajax code , but when it is applying to innerHtml , predefined style is not applied to it.

eg: my response is echo"<b>Name:</b>" ..... i applied style called color:#fff;

but it is not applying.

help me Thank you in advance

Never used ajax but can't you just echo in the tags with a class where the style is predefined in the css eg

echo '<h1 class="brand">Name:</h1>'


.brand {
    color: #fff;