Image adding border-width:0; when I do not specify the BorderWidth property

  • Thread starter Nathan Sokalski
  • Start date
N

Nathan Sokalski

I have an Image control that uses the CssClass property to access a
stylesheet I am using. When I do not specify the BorderWidth property of the
Image control, it adds border-width:0; without me specifying it. Because the
style attribute overrides the class attribute in HTML (or in this case,
XHTML), this is preventing my CSS class from being able to set the width of
the border. Why is ASP.NET adding border-width:0; to the style attribute? It
does not add any other CSS properties (not even border-color or
border-style). What can I do to prevent it from adding the border-width so
that I can use my CSS class? Thanks.
 
G

George Ter-Saakov

I would not think long and simply write my own Image control and use it.
You even can derive it from ASP.NET image control. Just override rendering.

George
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top