How do I font a DropDownList?

How do I font a DropDownList?

am 10.04.2008 15:27:46 von gnewsgroup

I am using Themes for my asp.net 2.0 web application. I am using
Verdana font (11px) for the entire site, but all DropDownLists seem to
have Arial, and also a bigger font size (maybe 12px).

My Default.skin file contains this line:

asp:DropDownList>

My Default.css contains

body,td {font-family: Verdana, arial,sans-serif; font-size:11px; }

So, I thought if I add the following line, it should fix the
DropDownList font problem:

dropdownlist {font-family: Verdana, Arial, Sans-Serif; font-size:
11px;}

But, it doesn't.

Someone asked similar question here, but there was no clear answer.

Any hint? Thanks.

RE: How do I font a DropDownList?

am 10.04.2008 15:47:01 von UjvalShah

Hi,

please make class in css file
..dropDown
{
font-family: verdana;
font-size: 10px;
border-width: thin;
border-style: solid;
background-color: White;
border-color: #ffffff;
color: Black;
cursor: default;
}
so you can use class as CssClass="dropDown">
and it will work..

"gnewsgroup" wrote:

> I am using Themes for my asp.net 2.0 web application. I am using
> Verdana font (11px) for the entire site, but all DropDownLists seem to
> have Arial, and also a bigger font size (maybe 12px).
>
> My Default.skin file contains this line:
>
> > asp:DropDownList>
>
> My Default.css contains
>
> body,td {font-family: Verdana, arial,sans-serif; font-size:11px; }
>
> So, I thought if I add the following line, it should fix the
> DropDownList font problem:
>
> dropdownlist {font-family: Verdana, Arial, Sans-Serif; font-size:
> 11px;}
>
> But, it doesn't.
>
> Someone asked similar question here, but there was no clear answer.
>
> Any hint? Thanks.
>

Re: How do I font a DropDownList?

am 10.04.2008 16:11:05 von gnewsgroup

On Apr 10, 9:47 am, Ujval Shah
wrote:
> Hi,
>
> please make class in css file
> .dropDown
> {
> font-family: verdana;
> font-size: 10px;
> border-width: thin;
> border-style: solid;
> background-color: White;
> border-color: #ffffff;
> color: Black;
> cursor: default;}
>
> so you can use class as > CssClass="dropDown">
> and it will work..
>

Thank you. I tried it, but it did not work. Not sure what is going on.

Re: How do I font a DropDownList?

am 10.04.2008 16:38:31 von George Ter-Saakov

You can do it by adding
select {font-family: Verdana, Arial, Sans-Serif; font-size:11px;}

so you do not need CssClass="dropdownlist"



PS: Should not it be a ".dropdownlist {font-family: Verdana, Arial,
Sans-Serif; font-size: 11px;}" notice dot in front of dropdown..

PPS: for some controls in .NET CssClass works a bit differently... It simply
adds

So your HTML for

Looks like

Which is not the same as
...

> Which is not the same as
> in HTML

So it should not be "textbox {font-family: Verdana, Arial, Sans-Serif,
font-size: 11px;}"

But "input {font-family: Verdana, Arial, Sans-Serif, font-size: 11px;}" will
work...


George.

"gnewsgroup" wrote in message
news:31074c50-ac88-48dd-bfff-f4e2169ff6b4@8g2000hse.googlegr oups.com...
> On Apr 10, 10:38 am, "George Ter-Saakov" wrote:
>> You can do it by adding
>> select {font-family: Verdana, Arial, Sans-Serif; font-size:11px;}
>>
>> so you do not need CssClass="dropdownlist"
>>
>>
>> PS: Should not it be a ".dropdownlist {font-family: Verdana, Arial,
>> Sans-Serif; font-size: 11px;}" notice dot in front of dropdown..
>>
>> PPS: for some controls in .NET CssClass works a bit differently... It
>> simply
>> adds
>>
>> So your HTML for
>> >> CssClass="dropdownlist">
>> Looks like
>>
>> Which is not the same as
>> in HTML
>
> So it should not be "textbox {font-family: Verdana, Arial, Sans-Serif,
> font-size: 11px;}"
>
> But "input {font-family: Verdana, Arial, Sans-Serif, font-size: 11px;}" will
> work...
>
> George.
>

Thank you, Goerge.

Yes, I figured that out by peeking into the HTML.

Re: How do I font a DropDownList?

am 10.04.2008 17:54:02 von George Ter-Saakov

PS: Forgot to add that this line "input {font-family: Verdana, Arial,
Sans-Serif, font-size: 11px;}"
will change all buttons too not only input boxes...
Since buttons in HTML are

George.


"George Ter-Saakov" wrote in message
news:eWghGHymIHA.5024@TK2MSFTNGP06.phx.gbl...
> Nope, but you got the concept
> the translates into in HTML
>
> So it should not be "textbox {font-family: Verdana, Arial, Sans-Serif,
> font-size: 11px;}"
>
> But "input {font-family: Verdana, Arial, Sans-Serif, font-size: 11px;}"
> will work...
>
>
> George.
>
> "gnewsgroup" wrote in message
> news:31074c50-ac88-48dd-bfff-f4e2169ff6b4@8g2000hse.googlegr oups.com...
>> On Apr 10, 10:38 am, "George Ter-Saakov" wrote:
>>> You can do it by adding
>>> select {font-family: Verdana, Arial, Sans-Serif; font-size:11px;}
>>>
>>> so you do not need CssClass="dropdownlist"
>>>
>>>
>>> PS: Should not it be a ".dropdownlist {font-family: Verdana, Arial,
>>> Sans-Serif; font-size: 11px;}" notice dot in front of dropdown..
>>>
>>> PPS: for some controls in .NET CssClass works a bit differently... It
>>> simply
>>> adds
>>>
>>> So your HTML for
>>> >>> CssClass="dropdownlist">
>>> Looks like
>>>
>>> Which is not the same as
>>>
>
> George.
>

That's turns out to be fantastic, since I like to be consistent
anyway. I don't like to use all kinds of font flavors in my web
application. Unless there is a very special reason, I stick to one
font.