문제

morning

i can't get the input-validation-error css to work when i have a class already for the input box.

<%=Html.TextBox("FirstName", null, new { @Class = "text" })%>
<%=Html.ValidationMessage("FirstName", new { @style = "color: red;", @Class = "errorInValid" })%>

if i take out new { @Class = "text" } then

.input-validation-error
{
    border: 1px solid #ff0000 !important;
    background-color: red !important;     
}

The above CSS works.

Help

regards, pete

thanks in advance (i am crap at CSS)

도움이 되었습니까?

해결책

링커 경고는 코드와 아무 관련이 없습니다.컴파일러가 컴파일 소스에 추가 해야하는 Class FirstViewController 클래스를 찾을 수 없었습니다.

여기에 이미지 설명

다른 팁

Add both .input-validation-error and .input.input-validation-error classes.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top