brettr
asked on
Where does extra line break come from?
Under the presidentIQ Lite image here http://www.cygen.com/, there is an extra line break. The word "Lite" should be just under the image, like the one to the left. I've included a screenshot using IE Developer Toolbar. Where is the extra #text coming from? What is causing the weird line break?
phantomBR.png
phantomBR.png
The #text means a text node, probably only with whitespace. It is there because you have whitespace in the (X)HTML structure and it is usually good to have it there.
The extra white line you see after applying the CSS has to do with something else, but I don't see it in FireFox. It looks like a common IE mishap though, hold on.
The extra white line you see after applying the CSS has to do with something else, but I don't see it in FireFox. It looks like a common IE mishap though, hold on.
@justin-clarke: I think the OP is using an object/xml browser to visualize the HTML, the #text is not an element.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Change line 61 in the following and remove line 62 and the extra (erroneous by IE) whitespace will go:
<img id="_ctl0_PageContent_Image1" src="Q_24324214%20(CSS%20extra%20whitespace%20line)_files/PresidentIQ5757Lite.png" alt="Memorizing the presidents has never been easier." style="border-width:0px;" /><br />
Lite
It's a typical IE quirk and it is supposed to have gone with IE8, where whitespace handling is improved. But in IE7 it is still apparent. Even though this whitespace is considered irrelevant whitespace, IE7 apparently things otherwise and parses it different then the standard compliant browsers.
-- Abel --
-- Abel --
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@abel:
In post ID 24148405, what is the difference? You are still using a <br>. I'm not sure what image you are using there either.
In post ID 24148405, what is the difference? You are still using a <br>. I'm not sure what image you are using there either.
ASKER
Ok, fixed. I was using Visual Studio. There was a line break in the designer just after the image but that was a WYSIWIG thing and shouldn't have been translated into a <BR>. Thanks.
ASKER
Sorry abel. I didn't see that you can two sets of code. But the issue was actually with Visual Studio 2008.
glad you found it. Like I said earlier, the line break is normally not a problem. However, in IE it can result to strange behavior... (and tricky to track down).
> In post ID 24148405, what is the difference?
the <br /> at the end instead of on the next line. See 24148468.
> In post ID 24148405, what is the difference?
the <br /> at the end instead of on the next line. See 24148468.
#text in a css stylesheet would refer to an ID, i.e, id="text" in the HTML code.
I'm guessing this is done in .NET ? It may be that some tag in the css isn't closed properly ?
That's the code I get when viewing source and there's no #text in there
<div id="presidentIQLite" style="float:left;margin-l
<img id="_ctl0_PageContent_Imag
<br />Lite
</div>
<br /> <br />
Be surprised at how quickly you can memorize all the presidents
<br /><br />