@manhng

Welcome to my blog!

CSS Span for Required Asterisk

June 10, 2018 12:12

CSS Span for Required Asterisk (edit)

https://stackoverflow.com/questions/24767170/how-to-add-span-required-element-in-label-if-input-has-required-attribute

<div class="col-lg-6 required">
    @Html.BootstrapTextBoxFor(m => m.Sys_Value, autoFocus: true)
</div>

<style>
    span.required {
        color: red;
        margin-left: 5px;
    }
</style>

<script>
    $(function () {
        $('div.required > div > label').after('<span class="required">(*)</span>');
    });
</script>

https://css-tricks.com/almanac/selectors/r/required/

https://codepen.io/thewebtech/pen/grLQpp

https://stackoverflow.com/questions/28059570/asterisk-symbol-for-required-field

https://css-tricks.com/all-about-floats/

https://developer.mozilla.org/en-US/docs/Web/CSS/::before

https://developer.mozilla.org/en-US/docs/Web/CSS/::after

Categories

Recent posts