Skip to main content
added 47 characters in body
Source Link
Joel Coehoorn
  • 418.4k
  • 114
  • 582
  • 820

Some other things to keep in mind:

  • When using ASP.Net you don't have complete control over the ID of elements, so you pretty much have to use class (note that this is less true than it once was).

  • It's best to use neither, when you can help it. Instead, specify the element type and it's parent's type. For example, an unordered list contained inside div with the navarea class could be singled out this way:

    div.NavArea ul { /* styles go here */ }

     div.NavArea ul { /* styles go here */ } 

Now you can style the logical division for much of your entire navarea with one class application.

Some other things to keep in mind:

  • When using ASP.Net you don't have complete control over the ID of elements, so you pretty much have to use class.

  • It's best to use neither, when you can help it. Instead, specify the element type and it's parent's type. For example, an unordered list contained inside div with the navarea class could be singled out this way:

    div.NavArea ul { /* styles go here */ }

Now you can style the logical division for much of your entire navarea with one class application.

Some other things to keep in mind:

  • When using ASP.Net you don't have complete control over the ID of elements, so you pretty much have to use class (note that this is less true than it once was).

  • It's best to use neither, when you can help it. Instead, specify the element type and it's parent's type. For example, an unordered list contained inside div with the navarea class could be singled out this way:

     div.NavArea ul { /* styles go here */ } 

Now you can style the logical division for much of your entire navarea with one class application.

Source Link
Joel Coehoorn
  • 418.4k
  • 114
  • 582
  • 820

Some other things to keep in mind:

  • When using ASP.Net you don't have complete control over the ID of elements, so you pretty much have to use class.

  • It's best to use neither, when you can help it. Instead, specify the element type and it's parent's type. For example, an unordered list contained inside div with the navarea class could be singled out this way:

    div.NavArea ul { /* styles go here */ }

Now you can style the logical division for much of your entire navarea with one class application.