resharper "cannot resolve symbol absmiddle"

558 views Asked by At

I have resharper 5.1. When I analyze "Errors in Solution" I get a lot of the same error in my aspx files. The error is:

cannot resolve symbol 'absmiddle'

It occurs on a line of code like this:

<img src="image.png" align="absmiddle" />

How do I suppress this 'error' so it doesn't come back on when I restart Visual Studio?

1

There are 1 answers

2
musaul On BEST ANSWER

In visual studio with resharper:

  • You should get a lightbulb in the left hand side of the screen when you click on one of these absmiddle attributes.
  • click on the lightbulb and select the Inspection Options for ... from the list.
  • In the dialog that comes up, select how you want to treat these errors.

In any case, you should not be using the align tag let alone a value of absmiddle with that tag. Instead, add this to your CSS:

img.absmiddle { vertical-align:middle; }

of couse, you'd need to set the class attribute for the images you want centred to absmiddle.