0

I am using the below dropdown in 4 places in one page is there a way to define the font-size at one place like we do it in CSS, using the ASP control Font-Size. Is that possible to do it in ASP.NET page

<asp:DropDownList Font-Size="XX-Small" runat="server" ID="SampleDropDown"  >
 </asp:DropDownList>

Thanks

1 Answer 1

6

It is always preferable to use a CSS class name + stylesheet over inline styles.

<asp:DropDownList CssClass="dropDownListA" runat="server" ID="SampleDropDown" >
</asp:DropDownList>

CSS:

.dropDownListA {
     font-size:12px;
}
Sign up to request clarification or add additional context in comments.

1 Comment

Which one I use em or px. Do ASP.NET prefers any of these..considering compatiblity with all the browsers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.