How to make selection inputs the same in all browsers on all platforms?

I am solving a problem to make the input for input the same in all browsers (Chrome and Safari on Mac display them differently), how to do it?

+3
source share
4 answers

ONLY , to make them look the same right now, it would hide the original inputs and replace them with appropriately framed html equivalents (god forbig Flash objects), which will act as proxies, passing functions to hidden inputs.

JavaScript. WRONG. , -. .

, - , -, , ( ).

+3

, . , ... , !

0

js, (jpg img img, select, , css) div , div ,

<div id="selectTxt" >

div select .

<div id="transparentSelect" class="transparent"> 
<select id="selectCar" name="selectCar">
      <option>Volvo</option>
      <option>Saab</option>
      <option>Mercedes</option>
      <option>Audi</option>
    </select>  
</div>

, , , div

.transparent
{
   filter:alpha(opacity=0); 
   -moz-opacity: 0; 
   opacity: 0; 
}

, , . ,

js select , select html div selectTxt . ,

css js

, , , ... , ,

http://jsfiddle.net/fiddlerOnDaRoof/LM73V/

, ,

0

You have to apply CSS to reset styles (not only for inputs, this is the recommended practice for the whole element so that your page looks almost the same in all browsers), there is a lot, just a little Google, like this one , and then apply the desired styles (color and width borders, background, etc.), check out this tutorial on how to style form elements

-1
source

Source: https://habr.com/ru/post/1785142/


All Articles