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!

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.