|
Argh. I've spent 4-5 hours now trying to figure out why a simple floated div won't float next to plain-old text. The floated div is a pull-quote, nothing in it but text and a background image; it works fine (of course) in Firefox and Opera. The HTML and CSS essentially validate (the couple of non-validating items are the "zoom:1;" other MSIE hack {frown} and a search-related fieldset and form that need addressing later.) I've looked through every hack on positioniseverything; and about 25 other sites addressing MSIE float problems. Nothing applies or works.
The text will not flow around the float on the left -- it drops below. Putting it as a {span class=pullq-r} it DOE float, but only to the right of the paragraph it's in, and since the para is shorter, the following paragraph again drops below. How do I make a simple float actually float? (Oh yeah, I tried giving the float widths in ems, %ages and pixels; and the container(s) page and wrapper widths too (100%, 99%, 96% -- nothing worked.)
The HTML (with the two surrounding paragraphs):
<p>Most readers of this newsletter understand the distinction between bird flu, which has already afflicted millions of birds plus a few hundred stunningly unlucky humans, and pandemic flu, which may someday afflict millions of people. We understand that the connection between the two is a genetic mutation or reassortment that hasn’t happened yet. We understand that bird flu is a major veterinary issue but a minor public health problem, and that any virus that can launch an influenza pandemic will no longer be a bird flu but a human flu, passing all too easily from person to person in places where there are no sick birds.</p>
<div class="pullq-r">Calling both of these problems “bird flu” has been a monumental mistake.</div>
<p>Calling both of these problems “bird flu” has been a monumental mistake. We tell people that many experts are incredibly worried about bird flu, which could be a public health disaster, overwhelming hospitals and disrupting just-in-time supply chains. And we tell people that bird flu is spreading inexorably from country to country and will almost inevitably get to our country too. We are less than clear that these two sentences, both true, are about different bird flus. </p>
The standards-compliant CSS
.pullq-r { /* do not put near blockquotes, screws up the format of the blockquote */
float: right;
width: 42%;
padding: 10px 0.5em 10px 0.8em;
margin: 0.2em 0 0.2em 0.2em;
font-style: italic;
font-weight: bold;
font-size: 2em;
font-family: Corbel, Calibri, Arial, Verdana, "Bitstream Vera Sans", sans-serif;
line-height: 1.1;
letter-spacing: 0.03em;
text-align: left;
background: transparent url(../art/yelback.jpg) repeat top left;
color: #000080;
}
THe MSIE hack stlyesheet code
.pullq-r { /* override the global style sheet to make the text flow around */
float: right;
display: inline;
width: 400px;
margin: 0;
padding: 0;
}
|