Images as Style Attributes

Posted by: Rick Strahls WebLog, on 29 Jun 2007 | View original | NEW Bookmarked: 0 time(s)

Here's a little tip that I started using more frequently recently that involves images. When embedding images into pages you're often inclined to use an IMG tag or an ASP.NET image control. In some situations though - especially if the same image repeats on the page - it can be much more efficient to use a style that references the image rather than embedding the image into the page itself. For example, if you look at the WebLog here and you look at the time image for each of the posts (in the byline)...

Advertisement
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1138 | Hits: 133

Similar Posts

  • ASP.NET MVC and the templated partial view (death to ASCX) more
  • Rich Tooltips With jQuery more
  • Cascading Implicit Styles in WPF more
  • Are you caching your images and scripts? IIS SEO can tell you more
  • querySelectorAll on old IE versions: something that doesnt work more
  • Some Words on the new RadForm and RadRibbonForm more
  • REST – Good, Bad and Ugly more
  • Silverlight 3: 7 additional application themes! more
  • Silverlight 3: 7 additional application themes! more
  • Convert Web.UI ASP.NET Grid into a data entry spreadsheet more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD