Jan 15 2008

HTML select with background (image or icon next to text)

Classified in: CSS, Designpaomic at 9:28 pm

I’ve found out a nice article on how to place an icon or image next to a select option. This is the sample css:
<select name=”issuetype” id=”issuetype”>
<option value=”1″ class=”imagebacked” style=”background-image: url(/images/icons/bug.gif);” selected>
Bug
</option>
<option value=”2″ class=”imagebacked” style=”background-image: url(/images/icons/newfeature.gif);”>
New Feature
</option>
<option value=”3″ class=”imagebacked” style=”background-image: url(/images/icons/task.gif);”>
Task
</option>
<option value=”4″ class=”imagebacked” style=”background-image: url(/images/icons/improvement.gif);”>
Improvement
</option>
</select>

option.imagebacked {
padding: 2px 0 2px 20px;
background-repeat: no-repeat;
background-position: 1px 2px;
vertical-align: middle;
}

Here’s an example:

HTML select with background (image or icon next to text)

EDIT: actual dropdown

Tags:

Dec 04 2007

Rounded corners with CSS

Classified in: CSS, Design, HTML, Web tools, Websitespaomic at 11:17 am

I found a very nice discussion about Google rounded corners, which describes a way to get rounded corners from a dynamic page in Google groups. Doesn’t seem to me a good choice to rely your website design on an external tool, especially because in that url you can see the word beta, not a synonym of stability and reliability! It could be a nice starting point, you could create your own rounded corner creator just save those images for future use. Happy designing! :D

Tags: