Jump to content

Just in case anyone else is tearing their hair out!


glenelkins

Recommended Posts

In case you are wondering, I cam across something rather strange when changing the height of  a select box with css. According to just about everyone to make this possible cross browser, you need to use JavaScript, as Safari will not allow the height to be styled.

 

Wrong!!! U cam across a couple of things. First of there is the -khtml-appearance:none - though this only works in Safari at the moment.

 

But the strange thing I stumbled across is that firefox will change the height of the select box quite simply with: height:50px; for example. But it will remain the standard height in safari. If you actually change the background colour from anything other than pure white, then safari will actually scale the box height:

 

select {
    height: 50px;
    background:#fefefe;
}

 

The above code works nicely, even though its very strange that the background colour can affect the height of the box. Try it with no "background" or setting the background to #ffffff; You will see what I mean!

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.