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

Forms and CSS styling?

How can I style a form ? I took the HTML form class and it was a good refresher.

But, it was already styled for us

Lets say i created my design in photoshop. And, i want to make it functional and design it with my PNGs from my photoshop design?

I know most would say to just make the shapes and colors with CSS, but what if i just wanted to use them as images? Is this possible?

Text boxes, buttons ect?

Example: http://ewebdesign.com/wp-content/uploads/2014/01/Flat-Long-Shadow-Login-Register-UI-PSD.jpg

One of my long time questions for ever has been this

Hopefully someone knows what I mean. Looking forward to the replies !

3 Answers

Sean T. Unwin
Sean T. Unwin
28,690 Points

Look into background-image and it's associated properties. Note, that some resetting may be needed, such as removing borders on form inputs.

Thanks... is there a lesson on this?

I always have issues with the text boxes and lining them up ect.

Sean T. Unwin
Sean T. Unwin
28,690 Points

There is, but not specifically to your request.

There is this lesson on styling forms with Sass - https://teamtreehouse.com/library/modular-css-with-sass/sass-and-bem/styling-form-elements - if you don't use Sass, it's alright for this lesson, just substitute the mixin names with your form elements, like labels and inputs.

There is also this lesson on styling forms, but it pertains to a Ruby course so you will have to skip around the video for the CSS parts - https://teamtreehouse.com/library/design-and-development/how-to-style-rails-forms-with-css .

You could also look into a Framework like Bootstrap or Foundation to help with layout and styling.

Thanks will look into this!