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

borders in CSS

I am trying to add a border to my photos - I have been running sublime text editor alongside the smells like bakin' tutorials, but creating my own webpage - so I have different images and content, and I have tried adding borders to my photos but it just won't work- can anybody help??

it would be great if you can share some code with us

it's ok i've figureed it out - the px that i was using was too small for my images, have increased the px and its working now! Sorry should of thought of that before commenting!

If everyone thought before commenting there would be no comments.

Aaron McMasters - It's unlikely there would be no comments, intead its more likely there would be fewer comments but they would be more organized and well researched.

I love to comment.

okay so after sleeping on it I realised that the image i was trying to put a border around, i had seperated into another div because it wasn't sitting where I wanted on the grid..... Nothing to do with the size as you've said!! ah well, nice learning curve!

3 Answers

If the border is applied directly to the image it should show up no matter how small it is in px.

e.g.

img {
   border: 1px solid #000;
}

When you are developing you can set the color to something garish like neon green.

http://www.w3schools.com/cssref/pr_border.asp http://www.w3schools.com/cssref/css3_pr_border-image.asp

I had no idea... These are good for troubleshooting... http://caniuse.com/ validator.w3.org/?

Well w3.org is owned and operated by the W3C so yeah they are good choice. I'd suggest you check out their new HTML5 validator which is at http://validator.w3.org/nu/

http://caniuse.com is pretty awesome

nice! I think caniuse was a teamtreehouse find for me... Is there a links page in teamtreehouse? It would be cool to have a community ratings system as well as downloadable bookmarks form all the lessons...oh and more jobs on the job board.

There's not one on Treehouse but there is http://pineapple.io