Different color layout in Textbox (Safari and Chrome)

Asked

Viewed 69 times

6

Safari is fading colors inside that are not @Html.Comboboxfor, as I do not fade into the textbox?

I’m using CSS and Jquery, Follow the photo

Select does not fade in Safari:

@Html.DropDownListFor(m => m.CEP.IdCidade, (SelectList)ViewBag.Cidades, "Selecione", new { @class = "form-control", @id = "IdCidade", @style = "line-height: 2" })

Text esmanesce in Safari:

@Html.TextBoxFor(m => m.Bairro.DescBairro, new { @class = "form-control tam-50", @id = "DescBairro" })

Here’s a print of Chrome Comparison: inserir a descrição da imagem aqui

  • 1

    If you don’t have any css class that’s doing this, open a call in Bootstrap, because it’s internal. Github Bootstrap

  • I’ll do it like this: input[type="text"]:disabled { color: #000000 } ...

  • I think the fading is on account of disabled, tries to add a color:#000 !important;

1 answer

1


I managed to solve by doing the following in CSS:

input[type="text"]:disabled {
    color: rgba(85, 85, 85, 1);
    -webkit-text-fill-color: rgba(85, 85, 85, 1);
} 

select[disabled='disabled'] {
    color: rgba(85, 85, 85, 1);
    -webkit-text-fill-color: rgba(85, 85, 85, 1);
} 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.