Images as Style Attributes

Posted by: Rick Strahls WebLog, on 29 Jun 2007 | View original | 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
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: ASP.NET | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1974 | Hits: 361

Similar Posts

  • Rich Tooltips With jQuery more
  • querySelectorAll on old IE versions: something that doesnt work more
  • Some Words on the new RadForm and RadRibbonForm more
  • Cascading Implicit Styles in WPF more
  • Silverlight 3: 7 additional application themes! more
  • Are you caching your images and scripts? IIS SEO can tell you more
  • ASP.NET MVC and the templated partial view (death to ASCX) more
  • Creating a quick and dirty jQuery Editable Element more
  • REST – Good, Bad and Ugly more
  • ViKi Version 0.0.01 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