A carriage return in my html code causes a visual space in the rendered html in Explorer 8. I'm guessing this will affect other versions too.
For example:
<span>
(111)
222-
3333
444444
</span>
looks like this:
(111) 222- 3333 444444
There should be only 1 space after the first bracket, no space after the dash and only 1 space after the last 3. I like the carriage returns for code readability, is it possible go keep then and still get the html to render properly in IE?
Here's the doctype information:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Edit:
I'm actually doing this in an ASP.NET MVC 2 app, and the aspx template markup is quite verbose which is why I've tried to seperate it into multiple lines:
<span>
(<%=((Model == null || Model.AreaCode == null) ? "" : Model.AreaCode).PadRight(3)%>)
<%=((Model == null || Model.Prefix == null) ? "" : Model.Prefix).PadRight(3)%>-
<%=((Model == null || Model.Suffix == null) ? "" : Model.Suffix).PadRight(4)%>
<%=(Model == null || Model.Extension == null) ? "" : Model.Extension%>
</span>