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

Hi people, can i change the style of a HTML <input type=submit> ? (CSS meaning)

how to change style of submit button on HTML

2 Answers

Steven Parker
Steven Parker
243,318 Points

Sure, you can style any HTML element.

Ideally, you'd do this using a separate CSS file, but you could also place a <style> tag in your HTML file or add a style attribute directly to the element.

Would you like suggestions on creating a specific look? What is it you would like to change?

Hi ,could you give an example in separate CSS code what it will look like if i want to change background-color , and radius corner 50% ? (just made it up for the example) tnx.

Steven Parker
Steven Parker
243,318 Points

In a file:

style.css
input[type="submit"] {
  background-color: aqua;
  border-radius: 50%;
}

In the document <head>:

<style>
  input[type="submit"] { background-color: aqua; border-radius: 50%; }
</style>

In the element itself:

<input type="submit" style="background-color: aqua; border-radius: 50%;">

brilliant ! thanks Steven