Required Field Validator

Discussion in 'ASP .Net' started by shapper, Jun 1, 2007.

  1. shapper

    shapper Guest

    Hello,

    I added a few Required Field Validators to a page.
    When I check the style it shows color:red and display:inline.
    I tried to override this with CSS and no luck

    Could someone knows how can I remove this default style?

    Thanks,
    Miguel
     
    shapper, Jun 1, 2007
    #1
    1. Advertising

  2. Miguel,

    In order to use Css with validators, you will need to set ForeColor to " " -
    then your classes will work just fine.

    "shapper" wrote:

    > Hello,
    >
    > I added a few Required Field Validators to a page.
    > When I check the style it shows color:red and display:inline.
    > I tried to override this with CSS and no luck
    >
    > Could someone knows how can I remove this default style?
    >
    > Thanks,
    > Miguel
    >
    >
     
    =?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=, Jun 1, 2007
    #2
    1. Advertising

  3. shapper

    shapper Guest

    On Jun 1, 5:46 am, Sergey Poberezovskiy
    <> wrote:
    > Miguel,
    >
    > In order to use Css with validators, you will need to set ForeColor to " " -
    > then your classes will work just fine.
    >
    > "shapper" wrote:
    > > Hello,

    >
    > > I added a few Required Field Validators to a page.
    > > When I check the style it shows color:red and display:inline.
    > > I tried to override this with CSS and no luck

    >
    > > Could someone knows how can I remove this default style?

    >
    > > Thanks,
    > > Miguel


    But what about the display: inline?
    I really need to change that to display: block.

    Is there a way to solve this?

    Thanks,
    Miguel
     
    shapper, Jun 1, 2007
    #3
  4. You could always wrap your validator in div tags:

    <div><asp:RequiredFieldValidator ... </div>

    "shapper" wrote:

    > On Jun 1, 5:46 am, Sergey Poberezovskiy
    > <> wrote:
    > > Miguel,
    > >
    > > In order to use Css with validators, you will need to set ForeColor to " " -
    > > then your classes will work just fine.
    > >
    > > "shapper" wrote:
    > > > Hello,

    > >
    > > > I added a few Required Field Validators to a page.
    > > > When I check the style it shows color:red and display:inline.
    > > > I tried to override this with CSS and no luck

    > >
    > > > Could someone knows how can I remove this default style?

    > >
    > > > Thanks,
    > > > Miguel

    >
    > But what about the display: inline?
    > I really need to change that to display: block.
    >
    > Is there a way to solve this?
    >
    > Thanks,
    > Miguel
    >
    >
     
    =?Utf-8?B?U2VyZ2V5IFBvYmVyZXpvdnNraXk=?=, Jun 5, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jinsong Liu

    Required Field Validator Client side popup

    Jinsong Liu, Aug 14, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    5,503
    Guenther Liebowitz
    Aug 14, 2003
  2. Do
    Replies:
    3
    Views:
    4,423
    Mike Moore [MSFT]
    Oct 23, 2003
  3. Jim Heavey

    Required Field Validator

    Jim Heavey, Nov 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    332
    Jim Heavey
    Nov 14, 2003
  4. Mr. x
    Replies:
    0
    Views:
    332
    Mr. x
    Nov 30, 2003
  5. jr
    Replies:
    3
    Views:
    426
Loading...

Share This Page