Chapter 3. Designing Your Web Pages

The pages you created in the previous two chapters look pretty plain and dull. That's because they lack styling information and therefore default to the standard layout that the browser applies. To spruce up your pages, you need a way to change their presentation in the browser. The most common way to do this is by using the Cascading Style Sheets (CSS) language. CSS is the de facto language for formatting and designing information on the Web, including ASP.NET web pages. With CSS you can quickly change the appearance of your web pages, giving them that great look that your design or corporate identity dictates.

Although earlier versions of Visual Web Developer lacked good tools for working with CSS, the IDE of Visual Web Developer 2008 has great support for CSS and is able to render pages much closer to how they'll eventually end up in the browser. The new tools enable you to visually create CSS, making it much easier to style your pages without the need to know or remember every little detail of CSS.

In this chapter, you'll learn more about the following topics:

  • What CSS is and why you need it

  • What the CSS language looks like and how to write it.

  • The different ways to add CSS code to your ASP.NET pages and to external files.

  • The numerous tools that VWD offers you to quickly write CSS.

To understand the relevance of and need for CSS in your ASP.NET projects, you need to understand the shortcomings of HTML first. The next section gives you a look ...

Get Beginning ASP.NET 3.5: In C# and VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.