2

I'm working on an multi select, the select part works fine on all browsers but the styling is only working in firefox. Its the following link:

http://jsfiddle.net/PbYFT/119/

So my question is, how can I get the styling the same in other browsers as it is in Firefox.

Kind regards

Bakudan
  • 19,134
  • 9
  • 53
  • 73
Augus
  • 495
  • 1
  • 8
  • 24
  • 2
    Your title says it doesn't look right in chrome, but your post says you want it to look like it does in chrome... Please clarify. – Bryan Downing Oct 19 '11 at 08:23
  • 1
    My bad, i ment Firefox. In Firefox it looks alright, but in chrome (and safari) the styling isn't added. (updated question :) thanks for the heads up) – Augus Oct 19 '11 at 08:26
  • @Augus you can put ` `. This is not the best solution, but it's the only one that I can offer – Teneff Oct 19 '11 at 08:28
  • I thinked of that also, but the main problem with this is that I can't add bold to it. – Augus Oct 19 '11 at 08:30
  • check this http://stackoverflow.com/questions/4748875/how-can-i-control-the-height-of-an-option-element-in-webkit – sandeep Oct 19 '11 at 08:58

1 Answers1

2

styling forms is not easy at all.. every browser render the input and selects in different ways, some allow styling (like FF), some don't (like chrome)...

So you could save you a headache if instead of adding a margin you add white spaces before the content:

<div>
    <SELECT NAME="categorie" MULTIPLE SIZE=21 id="multiselect">
        <OPTION VALUE="telefoontoestellen">-Telefoon toestellen
        <OPTION VALUE="smarthphone">&nbsp;&nbsp;-Smarthphone
        <OPTION VALUE="iphoneapple">&nbsp;&nbsp;&nbsp;&nbsp;-Iphone / Apple

hope this helps

pleasedontbelong
  • 19,542
  • 12
  • 53
  • 77
  • I thought of this solution also, but the main problem is that i really would like to put an bold into the field. – Augus Oct 19 '11 at 08:35
  • check [this article](http://www.electrictoolbox.com/style-optgroup-option-css-chrome/) that says what you can and can't do in chrome, you can't add bold to options but you can change the color to a darker one.. it's not bold, but it gets close – pleasedontbelong Oct 19 '11 at 08:41
  • Ok after some research i could only agree with this solution, although it isn't the best i don't think there is any others. For other people this is the outcome: http://jsfiddle.net/PbYFT/187/ – Augus Oct 19 '11 at 09:01