下拉列表背景颜色在Firefox和IE中变为白色onclick - 而不是Chrome

时间:2022-11-19 22:11:13

For some reason that I can't for the life of me figure out, a dropdown list that I have on the front page of my website changes its background color to white when clicked (supposed to stay brown).

出于某种原因,我不能为我的生活弄明白,我在我的网站首页上的下拉列表在点击时将其背景颜色更改为白色(应该保持棕色)。

I have the exact same dropdown list on my Forum page and it works fine.

我在论坛页面上有完全相同的下拉列表,它工作正常。

I'm using this code here:

我在这里使用这段代码:

<select name="custom Language" style="background:#4b2d15 !important; width:225px; margin-      top:4px; display: inline-block; color:#ffffff; float:left; font-weight:normal;" value="Language you're learning...">

It works perfectly in Chrome if I use !important but IE and Firefox turn it white. I know this probably means something is conflicting and overriding it but I can't locate what would cause it to happen on one page and not the other.

如果我使用它,它在Chrome中完美运行!重要但IE和Firefox将其变为白色。我知道这可能意味着某些东西是冲突的并且覆盖它但是我找不到会导致它在一个页面而不是另一个页面上发生的原因。

Here's the website (it's the 'Language you're learning' list): MezzoGuild

这是网站(它是'你正在学习的语言'列表):MezzoGuild

The other page that it's actually working on is: Forum

它实际工作的另一个页面是:论坛

Am I missing something obvious here?

我错过了一些明显的东西吗?

1 个解决方案

#1


1  

It works fine for me in Chrome,Firefox,and IE.The background color is brown for each option.

它在Chrome,Firefox和IE中适用于我。每个选项的背景颜色为棕色。

<select name="custom Language" style="background:#4b2d15 !important; width:225px; margin-      top:4px; display: inline-block; color:#ffffff; float:left; font-weight:normal;" value=>
<option>Option1</option>
<option>Option2</option>
</select>

#1


1  

It works fine for me in Chrome,Firefox,and IE.The background color is brown for each option.

它在Chrome,Firefox和IE中适用于我。每个选项的背景颜色为棕色。

<select name="custom Language" style="background:#4b2d15 !important; width:225px; margin-      top:4px; display: inline-block; color:#ffffff; float:left; font-weight:normal;" value=>
<option>Option1</option>
<option>Option2</option>
</select>