1
I have this div, where the input text is inside:
   <div class="col-md-4" id="passarmouse">
                        <input type="text" asp-for="FornecedorID" onkeypress="return BuscaDados(event);" onblur="CarregaFornecedor(this.value);" class="form-control" name="FornecedorID" id="idfornecedor" />
                    </div>
And this is the div I need you to show, by hovering your mouse over the div passarmouse,
<div class="col-md-4" id="mostrar">
                <div class="col-md-12">
                    <label class="control-label" id="fornecedor"></label>
                </div>
                <div class="col-md-12">
                    <label class="control-label" id="nomefornecedor"></label>
                </div>
                <div class="col-md-12">
                    <label class="control-label" id="ruafornecedor"></label>
                    <label class="control-label" id="nfornecedor"></label>
                </div>
                <div class="col-md-12">
                    <label class="control-label" id="bairrofornecedor"></label>
                    <label class="control-label" id="cidadefornecedor"></label>
                </div>
            </div>
I tried to get css but it’s not working:
    #mostrar {
    display: none;
}
#passarmouse:hover #mostrar {
    display: block;
}
How can I fix it? I thought I’d put like a modal then.
if
#mostraris not descended from#passarmousedoes not work, because your CSS selector is of descent, IE, for any element that has id 'show' and that has a descending id '#passarmouse' apply the properties below..– fernandosavio
you cannot make a selector (for example #passarmose) select another element (#show). you can act on the selector element itself or on one of the children at most, what you want to do will need to use
javascript– Ricardo Pontual
Guy already trying to use javascript onFocus event for this?
– Thayller vilela cintra
If div #show comes right after div #passarmouse, it should work
#passarmouse:hover + #mostrar {
 display: block;
}– Sam
@Thayllervilelacia I didn’t try.
– Mariana