Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67527

Customizing the in-built title bar border of input textbox

$
0
0

Outline color of title in the input textbox is displaying differently in Google chrome. bottom border line is looking differently.

<input type="text" title="Please fill out this field.">

enter image description here

so i tried with following code:

<span class="pseudo-tooltip-wrapper" data-title="please fill out this field...">
<input type='text' required></span>

sample.css

[data-title]:hover:after {
    opacity: 1;
    transition: all 0.1s ease 0.5s;
    visibility: visible;
}

[data-title]:after {
    content: attr(data-title);
    background-color: rgb(217, 235, 217);
    color: #111;
    font-size: 150%;
    position: absolute;
    padding: 1px 5px 2px 5px;
    bottom: -1.6em;
    left: 100%;
    white-space: nowrap;
    /* box-shadow: 1px 1px 3px #222222; */
    opacity: 0;
    border: 1px solid #111111;
    z-index: 99999;
    visibility: hidden;
}

[data-title] {
    position: relative;
}

.pseudo-tooltip-wrapper {
    /*This causes the wrapping element to be the same size as what it contains.*/
    display: inline-block;
}

so now it's displaying like below. When i make the field as required the default title bar is displaying.

Instead of this approach can we fix the default title bar border.

enter image description here

Please find the code in stackbliz: https://stackblitz.com/edit/angular-pa2lnu

How to achieve this issue.


Viewing all articles
Browse latest Browse all 67527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>