Creative Jar Blog RSS Feed

.Net Image and ImageButton controls

February 14, 2008 16:03 by tim

Just had an issue where i'd taken CSS from a colleague and there was a class for an image which had a nice looking blue border with a few pixel of free space around all the edges

While converting the raw HTML into ASPX i added the image a server-side asp:Image instead.  However, .net uses some rather insane preprocessing to add some in-line CSS styles automatically, overriding the CSS style and removing the border

After a tiny google search, i had two options.  One was mentioned by the CSS developer in that i add "!important" to my CSS class.  The other is to make your own Image class, based on asp:Image, which has it's own setters and getter for borderwidth

http://www.spidermaster.org/blogs/spidermaster/archive/2008/01/22/remove-border-width-0px-from-asp-image.aspx


Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Tags: , ,
Categories: Design | Technical
Actions: E-mail | Permalink | Comments (0) | Comment RSSRSS comment feed

Related posts

Add comment


 

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

January 6. 2009 08:13

Calendar

January 2009
SuMoTuWeThFrSa
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567