Consider the following Razor view - Let's call it VIEW-1 :
<h2>Index</h2>
@if (true)
{
<img src="/Content/images/black_square.png" alt="Black Square" />
}
<img src="/Content/images/black_square.png" alt="Black Square" />
When I load the VIEW-1 into Internet Explorer 8 or Mozilla Firefox 9.0.1 the two "black square" images are separated by a space.
But I do not want the two images separated.
Now consider the following Razor view - Let's call it VIEW-2 :
<h2>Index</h2>
<img src="/Content/images/black_square.png" alt="Black Square" /><img src="/Content/images/black_square.png" alt="Black Square" />
When I load the VIEW-1 in Internet Explorer 8 or Mozilla Firefox 9.0.1 the two "black square" images are not separated by a space.
VIEW-1 and VIEW-2 are example views.
The "separated images" fact is a little problem in one of my ASP .NET MVC 3 project.
I can not write all my image elements on one line because some of them depend on condition statements and loop statements.
Is there a way to get image elements not separated by a space even if they are not written on the same line ?