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

CSS

Brady Jones
Brady Jones
13,119 Points

Submit Message button help!!!

Hi, below is the HTML and CSS code for a submit button that submits but for some reason doesn't apply the 'Submit Message' text on the button...How can I resolve??

HTML

<button type="submit" value="Send" class="btn-success" id="submit">Submit Message</button>

CSS

.btn-success{ background-color: #777; color: #fff; font-family: inherit; font-size: 12px; text-transform: uppercase; letter-spacing: 3px; border-color: #777; width: 205px; height: 100px; margin-top: 12px; margin-left: 173px; border-radius: 0px; }

.btn-success:hover{ background-color: #333; color: #fff; border-color: #333;

Thanks!

3 Answers

Steven Parker
Steven Parker
229,732 Points

I can't seem to replicate the issue.

I see a grey button clearly labeled "SUBMIT MESSAGE" (since it gets transformed to upper case).

Brady Jones
Brady Jones
13,119 Points

I've just resolved the issue! Thanks Steven

Steven Parker
Steven Parker
229,732 Points

Congratulations, but what did it take? Other readers might be helped by the info.

Brady Jones
Brady Jones
13,119 Points

The class name was btn-success but I changed it to Bootstraps default btn btn-success which now displays 'Submit Message' on the button, albeit its green...

Steven Parker
Steven Parker
229,732 Points

Good to know! You had not mentioned Bootstrap before and it didn't occur to me that you might have a framework that was affecting the behavior.

And yes, any class in Bootstrap that has "success" in the name will give the element it is used on a green color.