Solved

Internet explorer crlf, white space problem

Posted on 2009-05-13
9
366 Views
Last Modified: 2013-12-08
hi to all,
i have a problem.i've attaced two html file.  no-problem.html has no problem of course. but problem.html is problem with internet explorer 7. because there is a enter char after img element. it's no problem for chrome or ff.
what can i do?
thanks.


problem.html.txt
no-problem.html.txt
problem.jpg
0
Comment
Question by:erenpasa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 39

Accepted Solution

by:
abel earned 500 total points
ID: 24373679
It is a classical problem. Whitespace after <img> tags, before the end of the enclosing block (<p> or <div> or <td> etc) will show this problem. You can only reliably solve it by removing this (officially insignificant) whitespace. And yes, I know, your pretty-printed layout of the code will be a bit disrupted. Long live IE.

Two resolutions:

<!-- version 1 -->
<div style="border:1px red solid">
    <div>
	<img class="style_0" src="http://sabri2.webtek.com.tr/UserFiles/1.jpg"/></div>
</div>
 
<!-- version 2 -->
<div style="border:1px red solid">
    <div>
	<img class="style_0" src="http://sabri2.webtek.com.tr/UserFiles/1.jpg"/><!--
    --></div>
</div>

Open in new window

0
 
LVL 39

Expert Comment

by:abel
ID: 24374146
Thought I was quite quick, thorough and complete, why do you B-grade me? Always give experts the chance to earn there A-grade, by following up in the question, we may be wizards, but we can't read minds. Please read EE's policy on 10pts must.
0
 

Author Comment

by:erenpasa
ID: 24374407
hi abel,
i've read the EE's policy now. you are right by EE's policy. if i read it before i give you A-grade. But i though that i 've attached a html file without problems  and you not said different things.I've give B-grade for this reason.

0
Windows running painfully slow? Try these tips..

Stay away from Speed Up Computer Programs that do more harm than good.
Try these tips instead.
Step by step instructions in trouble shooting Windows Performance issues.

 
LVL 39

Expert Comment

by:abel
ID: 24374495
Ah, my apologies. I now see that I basically only told you what you already new. Why didn't you say so? I would've elaborated (which is why we're here, and sometimes it happens that we miss something of a question) if you'd asked.

And, back to the question: you actually new the problem. I seconded that. The solution is, as you now know, only a workaround (I can't make you happier about IE's quirks, I know). A more complex solution would be to use JavaScript to remove the whitespace. And I do remember a CSS-only solution, but I didn't get that working recently.
0
 
LVL 39

Assisted Solution

by:abel
abel earned 500 total points
ID: 24374593
I'm glad you came back and explained. I went back to the drawing board and tried some solutions. Use the following as a solution with CSS only, and you can keep your whitespace (and I will remember it, I hope, for the next time this question pops up):

If you feel you should change the grade based on this new info, you can click "Request Attention" next to your question and ask a moderator to reopen the question. They usually do that within about 12 hours.

<div style="border:1px red solid">
    <div>
    <img style="vertical-align:bottom;"
        class="style_0" src="http://sabri2.webtek.com.tr/UserFiles/1.jpg"/>
    </div>
</div>

Open in new window

0
 

Author Comment

by:erenpasa
ID: 24374666
hi abel,
i 've send a message to reopen the question. i'll change your graduate.

thanks alot.
0
 
LVL 39

Expert Comment

by:abel
ID: 24388748
tx, erenpasa and modus_operandi.
0
 

Author Comment

by:erenpasa
ID: 24388801
nop. bye.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
CSS auto-height of empty div 3 70
Chrome SSLException for localhost 1 50
Sticking text to shapes in Raphael.js 6 41
In wordpress, how did they do that? 3 15
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question