• Developer Network
    • Technologies
      • Cloud
      • App Development
      • Web
      • Data
      • Gaming
      • Internet of Things
    • Downloads
      • Visual Studio
      • MSDN subscription access
      • SDKs
      • Trial software
    • Programs
      • Visual Studio subscriptions
      • Students
      • Architects
      • ISV
      • Startups
      • TechRewards
      • Events
    • Community
      • Magazine
      • Forums
      • Blogs
      • Tech Advisors
      • Channel 9
    • Documentation
      • APIs and reference
      • Dev centers
    • Samples
Developer Network Developer
Sign in
MSDN subscriptions
Get tools
magazine
  • Issues and downloads
    • All issues
    • 2016
      • March 2016
      • February 2016
      • January 2016
    • 2015
      • December 2015
      • November 2015
      • Windows 10 issue
      • October 2015
      • September 2015
      • August 2015
      • July 2015
      • June 2015
      • May 2015
      • April 2015
      • March 2015
      • February 2015
      • January 2015
    • 2014
      • Special 2014
      • December 2014
      • November 2014
      • October 2014
      • September 2014
      • August 2014
      • July 2014
      • June 2014
      • May 2014
      • April 2014
      • March 2014
      • February 2014
      • January 2014
    • 2013
      • Government 2013
      • December 2013
      • November 2013
      • October 2013
      • September 2013
      • August 2013
      • July 2013
      • June 2013
      • May 2013
      • April 2013
      • March 2013
      • February 2013
      • January 2013
    • 2012
      • December 2012
      • November 2012
      • Windows 8
      • October 2012
      • September 2012
      • August 2012
      • July 2012
      • June 2012
      • May 2012
      • April 2012
      • March 2012
      • February 2012
      • January 2012
    • 2011
      • December 2011
      • November 2011
      • October 2011
      • September 2011
      • August 2011
      • July 2011
      • June 2011
      • May 2011
      • April 2011
      • March 2011
      • February 2011
      • January 2011
    • 2010
      • December 2010
      • November 2010
      • October 2010
      • September 2010
      • August 2010
      • July 2010
      • June 2010
      • May 2010
      • April 2010
      • March 2010
      • February 2010
      • January 2010
    • 2009
      • December 2009
      • November 2009
      • October 2009
      • September 2009
      • August 2009
      • July 2009
      • June 2009
      • May 2009
      • April 2009
      • March 2009
      • February 2009
      • January 2009
  • Subscribe
  • Submit article

Internet Explorer Developer Tools: The CSS Tab

Pete LePage | August 24, 2010

 

In continuing my series about the Internet Developer Tools that come built into Internet Explorer,  today I’ll take a look at the CSS Tab and how you can use it to add, edit, change, or remove CSS rules and dive deeper in to the CSS on your page, where styles are coming from and such.

The CSS Tab

The CSS tab shows the all of the CSS files that your page includes via embedded, linked style sheets, or imported style sheets.  Like all of the other tabs, it includes the standard menu bar, the ability to change rendering and browser mode, and the standard buttons Select Element By Click, Clear Browser Cache and Save buttons .  Beside the standard buttons is a drop down list that allows you to choose which set of styles you want to look at.  It includes all of the styles that Internet Explorer loads for that page, including iFrames.

If you have multiple embedded style blocks, each block will be listed separately within the drop down list.  iFrame styles are denoted by the square brackets around the name of the [] stylesheet, for example [iframeSource.htm] stylesheet.css.  As you change the drop down, the contents of the CSS display box will show all the rules, along with their individual attributes.

Using the CSS Tools

Like the HTML tab, you can turn on and off rules, or the individual attributes as well as add, remove or edit all of their values and see the changes in real time. 

Getting Started

  1. If you’re in Internet Explorer now, hit F12, if you aren’t switch over to IE8 and load a site that has a bunch of CSS and HTML on it then hit F12 (pretty much page).  See if you can find a site that has at least one iFrame on it so you can see how iFrames look as well.
  2. Switch over to the CSS tab to see all of the CSS files that are loaded on the page you’re viewing.

    You’ll now see a list of all the rules that are defined within the selected style.

Turning Rules or Attributes On and Off

The easiest way to turn off style rules or individual attributes within those is to use the checkbox beside each node.  Unchecking the rule turns off all of the attributes for that rule, or you can simply choose to turn off the specific attributes.

Changing Existing Rules or Attributes

To change an existing rule, you can do the same thing as in the HTML tab, simply click on the item you want to edit and Internet Explorer will change that item into edit mode.  You can change the rule names, attribute names and the attribute values.  After you’ve made your change, hit enter and IE will apply the changes to your page.

Adding or Removing Rules or Attributes

This is one of the cooler features of the CSS tab that I often forget about because surfacing it isn’t super obvious.  If you right click on a rule or attribute, a content menu appears that allows you to add or delete attributes and rules.  You can choose where you want them to fit within the cascade via the Add Rule Before or All Rule After.

When adding an attribute, you do it pretty much exactly like you would type it in a style sheet or style block.  When I click Add Attribute, the dev tools create a new node for me in the tree view, and I type the style I want to add, followed by a colon, then IE pops me over to a new text box where I can type the value for that style followed by a semi-colon. Once I hit enter, IE will update the page with my changes.

Adding a new rule is similar, in that you click Add Rule After (or Before), and it creates a new node in the tree in the appropriate place.  Then using the same Add Attribute right click, you add the appropriate attributes to that node.

CSS Editing with Internet Explorer Developer Tools

There you go. Hopefully this will make your editing and debugging of CSS a little easier!  Stay tuned for posts on debugging and profiling your JavaScript code!

       

About the Author

Pete LePage works at Microsoft on the Internet Explorer team as a Senior Product Manager, helping developers take advantage of the web platform in Internet Explorer. LePage has been designing websites since his early days in high school, evolving from overlapping <blink>, <marquee> and <font> tags on GeoCities to properly styled CSS, managed hosted websites.  Prior to joining the product management team, LePage was a tester on Microsoft’s Visual Web Developer where he tested much of the web design experience.

In addition to his career at Microsoft, LePage enjoys travelling and is an avid film photographer; he has studied and taught at the prestigious Photographic Center Northwest in Seattle where he has recently completed his Thesis in Fine Art Photography.

Find Pete on:

  • Twitter - @PeteLe
  • Pete's Blog

More from Pete:

Internet Explorer Developer Tools: The CSS Tab
Internet Explorer Developer Tools: HTML
An Introduction to the Internet Explorer Developer Tools

Related Content

Articles

CSS3 Animation With jQuery Fallbacks
Understanding CSS3 2D Transforms
Internet Explorer 9 RC – Now with More Surprises!
Respond to Different Devices With CSS3 Media Queries
Understanding CSS Selectors

 

Network

MSDN
Internet Explorer
Expression
ASP.NET

Content

Article Archive
Video Archive
Write for Script Junkie
Script Junkie RSS Feed

Resources

Web Tools
Contact Script Junkie
About Script Junkie

 

MSDN Magazine Blog

14 Top Features of Visual Basic 14: The Q&A
Wednesday, Jan 7 by Michael Desmond - MSDN Magazine
Big Start to the New Year at MSDN Magazine
Friday, Jan 2 by Michael Desmond - MSDN Magazine

More MSDN Magazine Blog entries >


Current Issue


March 2016 issue

Browse All MSDN Magazines


Subscribe to the MSDN Flash newsletter Subscribe to MSDN Flash newsletter


Receive the MSDN Flash e-mail newsletter every other week, with news and information personalized to your interests and areas of focus.

Follow us
  • http://www.facebook.com/microsoftdeveloper
  • https://twitter.com/msdev
  • http://plus.google.com/111221966647232053570/
Sign up for the MSDN Newsletter
Was this page helpful?
Your feedback about this content is important.
Let us know what you think.
Additional feedback?
1500 characters remaining
Thank you!
We appreciate your feedback.
Dev centers
  • Windows
  • Office
  • Visual Studio
  • Microsoft Azure
  • More...
Learning resources
  • Microsoft Virtual Academy
  • Channel 9
  • Interoperability Bridges
  • MSDN Magazine
Community
  • Forums
  • Blogs
  • Codeplex
Support
  • Self support
Programs
  • BizSpark (for startups)
  • DreamSpark
  • Imagine Cup
United States (English)
  • Newsletter
  • Privacy & cookies
  • Terms of use
  • Trademarks
© 2016 Microsoft