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).
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
Re: How do I font a DropDownList?
am 10.04.2008 16:50:13 von David Wier
This worked fine for me, just copying and pasting - BUT I did need to make
sure I had the page pointing to my CSS file where I copied this code.
By using it this way, it only affects the one to which you add the
'CssClass' attribute.
By using 'select', it will affect all DropDownLists
David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
"gnewsgroup" wrote in message
news:252b09c0-396d-47e8-898c-0c768e0e62e3@a70g2000hsh.google groups.com...
> 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 17:01:58 von gnewsgroup
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
>
> Looks like
>
> Which is not the same as
>
Re: How do I font a DropDownList?
am 10.04.2008 17:02:47 von gnewsgroup
On Apr 10, 10:50 am, "David Wier" wrote:
> This worked fine for me, just copying and pasting - BUT I did need to make
> sure I had the page pointing to my CSS file where I copied this code.
> By using it this way, it only affects the one to which you add the
> 'CssClass' attribute.
>
> By using 'select', it will affect all DropDownLists
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is precisely my goal. :-)
Re: How do I font a DropDownList?
am 10.04.2008 17:44:33 von George Ter-Saakov
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
>>
Re: How do I font a DropDownList?
am 10.04.2008 17:52:21 von gnewsgroup
On Apr 10, 11:44 am, "George Ter-Saakov" wrote:
> 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.
>
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
>>>
Re: How do I font a DropDownList?
am 10.04.2008 18:06:34 von gnewsgroup
On Apr 10, 11:54 am, "George Ter-Saakov" wrote:
> 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.
>
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.