Why do CONTROLS end with an EXTRA line-break/space????

  • Thread starter Thread starter michael
  • Start date Start date
M

michael

On my ASP.NET pages, it seems that _after_ any web or user control - an
extra (small) line break or space is inserted automatically right after the
Control. This is unwanted since it messes up vertical alignment preventing
me of having things "touch" each other. I have tried surrounding the
controls in a DIV tag with padding set to 0 but this still does not help.

What must I do to prevent this line-break or space to happen after a
web/user control?

Thanks in advance
 
Michael
Try placing your a controls inside a html table with cellspacing=0 and cellpadding=0

HTH
Suresh

----- michael wrote: ----

On my ASP.NET pages, it seems that _after_ any web or user control - a
extra (small) line break or space is inserted automatically right after th
Control. This is unwanted since it messes up vertical alignment preventin
me of having things "touch" each other. I have tried surrounding th
controls in a DIV tag with padding set to 0 but this still does not help

What must I do to prevent this line-break or space to happen after
web/user control

Thanks in advanc
 
The problem is that asp.net inserts a line break in th HTML after the control. I don't mean a <br> tag but a simple line return ni the text of th html.

Browsers interpret this line as a space, so they include a text space.

SOLUTION: Set the font size of that area to zero. That way even though the browser will insert a space, it will measure 0 pixels.
 
Back
Top