Images as Style Attributes

Posted by: Rick Strahls WebLog, on 29 Jun 2007 | View original

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

Similar Posts

  • Blog Reading and Authoring Review more
  • Themes For ASP.NET User Controls more
  • How to skin a cat^H^H^H... blog! more
  • XML Spy 2005 Out more
  • Proof of concept: popup calendar ATLAS like more
  • Rendering WordML documents in ASP.NET more
  • Styling and formatting (part 2) Text/HTML module and FCKEditor part 12 - 9 Video Tutorials more
  • Centering containers using proper XHTML/CSS? more
  • More on URL Rebasing in Master Pages more
  • HTML elements with rounded corners more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | 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