Home » Asp.netRSS

How to stop a border around a Hyperlink Image

I have a hyperlink Image and I can't seem to get it to stop displaying an outline around the hyperlink.  Not sure why...  Heres my code...and setting the borderstyle or borderwidth is doing nothing.

<asp:HyperLink ID="HyLinkDetails" runat="server" 
                                                                NavigateUrl='<%# Eval("OrderURL") %>' BorderStyle="None" BorderWidth="0px">Details</asp:HyperLink>



8 Answers Found


Answer 1

I don't see any difference with border for hyperlink. It seems like button details has something to do with the border.


Answer 2

No button_details.gif has no blue border around the image.

Its putting a blue image around the entire gif.  

I think it may have something to do with the "whole" style sheet.  Like maybe hyperlink colors has been defined for the whole page already or something like that....but not sure.

This ??

a:link, a:visited
    color: #034af3;
    text-align: left;



Answer 3

Here is a screenshot  of the blue line around the hyperlink based button

And here is the image by itself


Answer 4

I think somewhere generic border is defined for hyperlinks. Search for border in your stylesheet.

Stylesheet might be having a css like this



Answer 5

Its very aggrevating because nothing I'm doing is making a difference.

I coraled all of the a links together and commented them all out from the style sheet= No change.

I don't understand why setting the properties directly in the object won't override any thing else in the page.

I don't see the blue line in the design GUI of Visual Develper ONLY in IE....so that also is beyond strange. 


Answer 6

Please try this n let me know

outline: none;

-moz-outline-style: none;


Answer 7

Thanks...I tried both of those things in the style sheet and it didn't have any effect 


Answer 8

Ok, this was a hard problem.  I found the solution here: http://www.codeproject.com/Tips/115565/Remove-blue-border-when-image-is-inside-the-hyperl.aspx

I had to add this to the style sheet

a img 
    border: none;



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter