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
pavz
10,309 PointsCreating a custom-designed arrow for the <select> attribute
Folks, how are you doing? A quick question for you. How to make a custom-looking arrow in my dropdown menu of my list of states?
Here's the link to the preferred design of an arrow: https://www.dropbox.com/s/88w8tsmkk6mc8gw/custom_arrow_example.png?dl=0
Here's the link to the project: https://github.com/pzhestkov/Project_3
Big thanks in advance.
1 Answer
jcorum
71,830 PointsThe following will put "xxx " before each option:
option::before {
content: "xxx ";
}
I didn't try, but you can use a URL with content. Here's a resource: https://css-tricks.com/almanac/properties/c/content/ His notes say: This is literally an image on the page like <img> would be. It could also be a gradient. Note that you cannot change the dimensions of the image when inserted this way. You could also insert an image by using an empty string for the content, making it display: block in some way, sizing it, and using background-image. That way you could re-size it with background-size.