Forum Moderators: open

Message Too Old, No Replies

dynamic elements cause added space in IE

         

MonkeyBoy1

6:56 pm on May 11, 2005 (gmt 0)

10+ Year Member



The site I work on uses JSP and I've had to work around spacing issues in IE for some time. Basically, If you have an included element, say for an error message. In Firefox and Safari, everything looks fine. If content exists, it draws, if it doesn't, there is no added space.

IE always draws the line break, even if there isn't any content. I've also notice this with forms, where IE will pad a line break at the top and/or bottom of a form.

My thought is that I might be able to use some sort of CSS to remedy the problem, but I'm wondering if anyone has any ideas, or even knows what I'm talking about! :)

thanks

tedster

5:11 am on May 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This might be one of those IE bugs where it incorrectly renders a line break in the mark-up as a line break on screen. Can you show us a snippet of code for an "empty" content area?

Krapulator

7:08 am on May 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have this problem occasionally in asp.

I've solved in the past by doing something like this:

Instead of:

<p>Content Here
<%
'some code here
%>
More content here</p>

I put the delimiters right next to the content as such:

<p>Content Here<%

'some code here

%>More content here</p>

It's a bit messy but it does the job.

MonkeyBoy1

5:01 pm on May 12, 2005 (gmt 0)

10+ Year Member



I'll mess around a bit more and let you know if I come up with anything. Until then, I'll just shake my fist in the general direction of Microsoft! :)