Background:
I am working for a client putting a textbook online. The layout of the
textbook is straight forward and is easy enough to style with <h?>, <p>,
<uland <oltags. The text book also contains small images of a key that
represent a key point within the text. In the printed book, these keys are
positioned to the left of the text (in the margins if you will) and some
paragraphs may have more than one key. It is important to the client that
these keys be placed accordingly.
This posed a slight problem, but was easily solved (so I thought) using
absolute positioning. I wrap a paragraph within a <div style="position :
relative;"then the key image(s) is positioned 'absolute' with respect to
that particular <div(and are placed before the <pin the source). Easy
enough so far, give it a top: 0;(or whatever) and left: -60px; and the key
appears just like it should (and very damn close to how it looks in the
printed book).
The Problem:
The site layout is a non-liquid two column layout with a header. The right
column has a fixed height with overflow: auto; which works fine when the
content overflows the height of the right column, the scroll bars appear and
work as expected. The problem comes in when a <divhas position: relative;
in IE 7 and the content overflows the right column height. IE will not
include the position: relative; <div>'s in the scrollable content, even
though the initial containing <divis within the overflow: auto; <div>.
In Firefox and Opera (both windows and Unix (FreeBSD) ) it works just as
expected, but IE doesn't work. What I find odd, is that if I remove the
<doctypetag, it works just fine in all browsers including IE (found that
out by mistake), so I know that IE has the capability to do what I am
looking for.
Example:
To see an example of exactly what I am talking about, view
http://www.rapidcity.net/~justin/test/position.html
Both the HTML and CSS validate.
Everything is right there in the HTML so a simple "View Source" will show
you all the html and CSS.
The Question:
Is there a workaround for this in IE? I have searched but have not found
anything in reference to IE7. Or, is there a better way to position the key
images to the left of the text (and some cases need to be in the middle of
or at the bottom of the paragraph)? If I take out all the position:
attributes, it works perfectly in all browsers, but obviously the keys do
not appear as they should.
Thanks,
Justin England
ju****@rapidcit y.net