Link to home
Start Free TrialLog in
Avatar of jezella
jezellaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Align vs Float IE Print

Hi all, something strange here. I know that most people use IE so I'm hoping to get this issue sorted.

I have re-written my complete site so to be complete CSS and have come across yet another problem with IE 6.

THe site is written to comply with <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

And it passes so I'm very pleased.

The problem is that if I have an image float left, and <p>CONTENT</p> to the right, and try to print the page in IE6 the <p>CONTENT</p> drops below the floated image.  If I use align left, all works fine but then I am not complying with the rules of xhtml strict so the page fails.

I've also noticed that I seem to have no problem with <h1> and <h2>.

Now the question is, am I doing something wrong or is this yet another bug up the bum of IE?

Any ideas would be appreciated.

AJ  
Avatar of jezella
jezella
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

Perhaps a bit of my code would help.

<div id = "MainContent">
<img src = "/site-images/home-page/welcome-page-header.jpg"
alt = "Ashley Wedding Cars where Quality Still Matters"
width = "477"
height = "295"
class = "MainImageTL"/>

<h1 id="H1AlignR" class="InitialHeading">Wedding Cars for Surrey, Sussex, Berkshire, Bucks, Kent, Middlesex
                                    and the London Boroughs.</h1>

<h2 id="H2AlignR">Specialists in Wedding Transport</h2>
                                    
                                    
<p class = "FirstPara">
            <img src = "site-images/fonts/a.jpg"
                         width = "56"
                                           height = "45"
                                           alt = ""
                                           class = "CapitalImage"/><span class = "NeverShow">A</span>shley Wedding Cars                  
Avatar of Göran Andersson
If you just float the image to the left, the other elements doesn't have to the floated, they would just flow around the image.

Try if that works better.
Avatar of jezella

ASKER

Hi GreenGhost.  Everything works fine on screen in IE6, FF and Opera.  Print is ok in FF and Opera.  The problem is in IE.  Have a look at how print preview look in IE6 with this link.

http://www.website-design.org.uk/about-us.php
ASKER CERTIFIED SOLUTION
Avatar of Göran Andersson
Göran Andersson
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jezella

ASKER

GreenGhost, the display:right should read text-align:right; All the messing with the code and I made a mistake.  Apart from that, I have tried making the image smaller but this does not help as the <p>text</p> still does not flow around the image.  However, the <h1> and <h2> does.

Any other ideas.  Anyone.

AJ
Avatar of jezella

ASKER

OK fixed it.  If I take out  text-align:justify; from my print style sheet I no longer have the problem.  It seems that IE can't justify text around floated element in print mode.

AJ