How can I apply this CSS to the asp.net?

Discussion in 'ASP .Net' started by =?Utf-8?B?Q3J5c3RhbA==?=, Sep 23, 2004.

  1. Hi there,
    I am converting ASP pages to asp.net pages.
    The orignal anchor is:
    <a class="nohover" href="..."> < img src="..." height="30" width="30"
    border="0"></a>
    I create an asp:hyper link for it:
    <asp:hyperlink class="nohover" id="img" navigateurl=".." imgurl="..."
    height="30" width="30" ></asp:hyperlink>

    The .net rendered html is:
    <A class="nohover" id="IMG" style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH:
    0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 30px; HEIGHT: 30px; BORDER-RIGHT-WIDTH:
    0px" href="..."><IMG src="..." border=0></A>

    The rendered style overwrite my "nohover" style class.
    Can someone tell me how I can make my "nohover" work?

    Thanks
    =?Utf-8?B?Q3J5c3RhbA==?=, Sep 23, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?Q3J5c3RhbA==?=

    Karl Seguin Guest

    seems to me that Visual Studio is screwing around with your tags..there's no
    reason why it's rendering all that crap.

    On a side note you can use CssClass instead of class. just class will work,
    but only because unknown properties are rendered as-is into html attributes.
    This won't fix your problem though.

    --
    MY ASP.Net tutorials
    http://www.openmymind.net/


    "Crystal" <> wrote in message
    news:...
    > Hi there,
    > I am converting ASP pages to asp.net pages.
    > The orignal anchor is:
    > <a class="nohover" href="..."> < img src="..." height="30" width="30"
    > border="0"></a>
    > I create an asp:hyper link for it:
    > <asp:hyperlink class="nohover" id="img" navigateurl=".." imgurl="..."
    > height="30" width="30" ></asp:hyperlink>
    >
    > The .net rendered html is:
    > <A class="nohover" id="IMG" style="BORDER-TOP-WIDTH: 0px;

    BORDER-LEFT-WIDTH:
    > 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 30px; HEIGHT: 30px;

    BORDER-RIGHT-WIDTH:
    > 0px" href="..."><IMG src="..." border=0></A>
    >
    > The rendered style overwrite my "nohover" style class.
    > Can someone tell me how I can make my "nohover" work?
    >
    > Thanks
    Karl Seguin, Sep 23, 2004
    #2
    1. Advertising

  3. Hi,
    Sorry I mada a mistake. I do use CssClass in my asp:Hyperlink control.
    I still can't apply "noHover" class to my image.


    "Karl Seguin" wrote:

    > seems to me that Visual Studio is screwing around with your tags..there's no
    > reason why it's rendering all that crap.
    >
    > On a side note you can use CssClass instead of class. just class will work,
    > but only because unknown properties are rendered as-is into html attributes.
    > This won't fix your problem though.
    >
    > --
    > MY ASP.Net tutorials
    > http://www.openmymind.net/
    >
    >
    > "Crystal" <> wrote in message
    > news:...
    > > Hi there,
    > > I am converting ASP pages to asp.net pages.
    > > The orignal anchor is:
    > > <a class="nohover" href="..."> < img src="..." height="30" width="30"
    > > border="0"></a>
    > > I create an asp:hyper link for it:
    > > <asp:hyperlink class="nohover" id="img" navigateurl=".." imgurl="..."
    > > height="30" width="30" ></asp:hyperlink>
    > >
    > > The .net rendered html is:
    > > <A class="nohover" id="IMG" style="BORDER-TOP-WIDTH: 0px;

    > BORDER-LEFT-WIDTH:
    > > 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: 30px; HEIGHT: 30px;

    > BORDER-RIGHT-WIDTH:
    > > 0px" href="..."><IMG src="..." border=0></A>
    > >
    > > The rendered style overwrite my "nohover" style class.
    > > Can someone tell me how I can make my "nohover" work?
    > >
    > > Thanks

    >
    >
    >
    =?Utf-8?B?Q3J5c3RhbA==?=, Sep 24, 2004
    #3
    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. =?Utf-8?B?RGF2ZQ==?=

    Can't apply CSS class to DataGrid's HyperlinkColumn?

    =?Utf-8?B?RGF2ZQ==?=, Feb 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,055
    Martin Dechev
    Feb 27, 2004
  2. Maziar Aflatoun

    Apply css to asp:HyperLinkColumn

    Maziar Aflatoun, Jul 13, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    2,837
    Eliyahu Goldin
    Jul 14, 2004
  3. jmorgret

    apply css to content page .NET 2005

    jmorgret, Mar 30, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    501
    jmorgret
    Mar 31, 2006
  4. Shiperton Henethe
    Replies:
    5
    Views:
    1,077
    Adrienne
    Sep 19, 2003
  5. Stefan Siegl
    Replies:
    1
    Views:
    949
    Marrow
    Jul 18, 2003
Loading...

Share This Page