tags:

views:

87

answers:

1

I have jsp page that contains<span class="requiredFieldsMessageAsterix">*</span>

I use a jsp include to include this on another jsp page as here

Date of Birth:<%@include file="/jsps/includes/requiredFieldsLabel.jsp"%> This works fine. No new line.

However when I nest this include within another span as here :

Date of Birth:<span id="includeMandatoryDOB"><%@include file="/jsps/includes/requiredFieldsLabel.jsp"%></span>

It creates a new line. I have tried forcing display:inline, but it did nothing(as I expected). There is no other styling the elements.

This is on IE6, any ideas ? It works fine on chrome, not tried firefox. But it is required for IE6.

A: 
  • What DOCTYPE are you specifying at the top of the document? Try

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;

  • Is the parent container wide enough to display the content without wrapping? (because of doctype, IE could be in quirks mode and thus calculating what its width should be incorrectly and causing wrapping)

You may want to download IE developer toolbar for IE6/IE7 to use select element by click and determine which elements are being sized by using the wireframe view: http://www.microsoft.com/downloads/details.aspx?familyid=E59C3964-672D-4511-BB3E-2D5E1DB91038&amp;displaylang=en

Note: IE8+ have the dev toolbar builtin and usable by pressing F12

David
if it was doctype, or parent container it would not work in chrome ? Yes thanks I will install ie dev toolbar. I have used firebug, but never really got the hang of ie dev toolbar.
NimChimpsky