Master Pages vs. CSS

by percent20 11/29/2005 7:26:00 AM

I must say that master pages are really really cool. At first I was concerned that Master Pages was going to force everything that you did to be in tables thus taking CSS out of the picture. I was mainly concerned about this because I can see the benefits that CSS can offer to web developers and want to use this really cool and useful technology.

When I first saw Master Pages being used I would look at the code and see almost nothing but tables being used for positioning of objects and it was annoying because after all I want to use CSS. So I proceeded to start and learn CSS anyway hoping that I could just override the default output that Master Pages used.

Well I have learned quite a bit about CSS now, basically I am confident with it, and just took a look at Master Pages. I must say I was impressed by them the blew me away with the possibilities. I am still learning them so some of the problems I forsee are probably solved. Let me first explain a little bit about master pages first.

Master Pages is a new technology in ASP.NET 2.0 that allows for a unified look and feel of a website without having to go in and customize individual pages, which can take up hours. With master pages you make a sing master page that has the look and feel you want across all pages such as the most common things menu, banner, and footer. Now user controls reduced the time it took to do this significantly, but Master Pages is just where it is at.

Now CSS offers pretty much the same thing. You make up your classes for your divs with positioning font information yada yada yada. Now Master Pages makes it faster than CSS, but if it outputs to tables, then where are the web standards? This was my big worry. I want to make standards compliant websites using ASP.NET.

Well here is the cool part. You can use CSS to do the layouts on the Master Page. In fact Master Pages compliments CSS and vice versa. You now only have to make the CSS file, and apply all the classes and ids to one file instead of 20. Now tell me that is not awesome.

What does this mean?

Well it increases the possibilities of standards compliant ASP.NET websites. It allows for less time in development because now you can focus more on the code that is important instead of menial looks. You can now write the whole backend for that amazon.com clone and don’t have to worry about the useless front end.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: , , , , ,

.NET | ASP.NET | Awesome Stuff | Programming

Related posts

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

7/25/2008 12:15:19 AM

Powered by BlogEngine.NET 1.3.0.0
Theme by Mads Kristensen


My Flare

AddThis Feed Button

National Blog Posting Month

Eagle Scout

I'm Test Driven

[Reserved for MVP status I want to earn]

View Buddy Lindsey's profile on LinkedIn

Twitter



Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in