It used to be, that when I would type:


and hit "return", Visual studio would autocorrect to:


as well as a number of other things. That is just the easiest example. It also doesn't automatically indent the next line...

I am using Visual Studio 2008 SP1.

I've looked through Tools>Options and nothing really jumped out at me. I'm sure it's just some kind of pebkac error on my part, so any assistance would be greatly appreciated.

div is a tag. you cant use it as id. remove # sign. ya visual studio automatically formats it so its easier to read. whats your exact problem?

sorry, that was poorly written it should be "#divid"

Really my problem is just one of ease of use. It used to do that, now it doesn't. It's not really a big deal if not, just so much more convenient.

This problem resolved itself once I updated VS2010.

Member Avatar

If you want to apply a style to all div tags you should use this code instead.

div {

dots are the styles you want to apply. If you typed the new code VS 2010 should auto format for you as long as there are no other mistakes in the css or other areas.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.