F9 Group Marketing and Technology Blog

Marketing, Technology, and current news at http://www.f9group.com/

Entries Tagged ‘css’

Improving CSS With .LESS

Cascading Style Sheets , or CSS, is a syntax used to describe the look and feel of the elements in a web page. CSS allows a web developer to separate the document content – the HTML, text, and images – from the presentation of that content. Such separation makes the markup in a page easier to read, understand, and update; it can result in reduced bandwidth as the style information can be specified in a separate file and cached by the browser; and makes site-wide changes easier to apply. For a great example of the flexibility and power of CSS, check out CSS Zen Garden . This website has a single page with fixed markup, but allows web developers from around the world to submit CSS rules to define alternate presentation information. Unfortunately, certain aspects of CSS’s syntax leave a bit to be desired. Many style sheets include repeated styling information because CSS does not allow the use of variables. Such repetition makes the resulting style sheet lengthier and harder to read; it results in more rules that need to be changed when the website is redesigned to use a new primary color. Specifying inherited CSS rules, such as indicating that a elements (i.e., hyperlinks) in h1 elements should not be underlined, requires creating a single selector name, like h1 a . Ideally, CSS would allow for nested rules, enabling you to define the a rules directly within the h1 rules. .LESS is a free, open-source port of Ruby’s LESS library

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

A Look at the GridView’s New Sorting Styles in ASP.NET 4.0

Like every Web control in the ASP.NET toolbox, the GridView includes a variety of style-related properties, including CssClass , Font , ForeColor , BackColor , Width , Height , and so on. The GridView also includes style properties that apply to certain classes of rows in the grid, such as RowStyle , AlternatingRowStyle , HeaderStyle , and PagerStyle . Each of these meta-style properties offer the standard style properties ( CssClass , Font , etc.) as subproperties. In ASP.NET 4.0, Microsoft added four new style properties to the GridView control: SortedAscendingHeaderStyle , SortedAscendingCellStyle , SortedDescendingHeaderStyle , and SortedDescendingCellStyle . These four properties are meta-style properties like RowStyle and HeaderStyle , but apply to column of cells rather than a row. These properties only apply when the GridView is sorted – if the grid’s data is sorted in ascending order then the SortedAscendingHeaderStyle and SortedAscendingCellStyle properties define the styles for the column the data is sorted by. The SortedDescendingHeaderStyle and SortedDescendingCellStyle properties apply to the sorted column when the results are sorted in descending order. These four new properties make it easier to customize the appearance of the column by which the data is sorted. Using these properties along with a touch of Cascading Style Sheets (CSS) it is possible to add up and down arrows to the sorted column’s header to indicate whether the data is sorted in ascending or descending order. Likewise, these properties can be used to shade the sorted column or make its text bold.

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

ASP.NET Master Page Advice, Tips, and Tricks

Master pages are an important part of any ASP.NET website. In a nutshell, a master page allows the page developer to define a website template, indicating what portions of the template are to remain fixed across pages that use the template and what regions of the template are customizable on a page-by-page basis. Having the site design and layout centralized in one (or more) master pages makes it easy to add new pages to the site that inherit the same look and feel and greatly simplifies changing the site design or adding or removing content that is common to all pages, such as content in the <head> element, footers, and references to CSS and JavaScript files. This article presents advice for using master pages, along with assorted tips and tricks that I’ve picked up over the years in using master pages. Read on to learn more! And if you have additional recommendations and advice on using master pages, please don’t hesitate to drop me a line and I’ll be happy to add your insight to this article. Read More >

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz

Locking the Screen During a Postback

In a perfect world all web applications would be snappy and responsive, and there would be no such thing as lengthy postback waits. But in the real world there are plenty of scenarios that take seconds to complete. For example, when a user visits a travel booking site like Expedia and enters his origination and destination information, it’s not unusual for it to take several seconds before the search results appear

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz