March 22nd, 2004, 08:10 AM
Join Date: Mar 2004
Time spent in forums: < 1 sec
Reputation Power: 0
CSS Negative Margins and Vanishing Text
In Internet Explorer 6, the following HTML and CSS with negative margins causes the first letter of the heading to disappear:
<style type="text/css" media=screen>
<h1>This is the heading</h1>
This is the content.
There are ways to get the negative margin to work in IE properly, but at a loss of functionality. For instance, if I remove the width property from the siteBody CSS, and change the position to 'relative', the letter will appear. Also, if I remove the div and just place the 'siteBody' id on the body tag, then the first letter will appear.
Any help is greatly appreciated as I've been searching for a solution for a couple of days now.