Forum Moderators: not2easy

Message Too Old, No Replies

Styles with Positioning not working in external stylesheet in IE Mac

Only inline CSS positioning is working when indenting text

         

NPA_Web

9:48 pm on May 8, 2005 (gmt 0)

10+ Year Member



I've searched everywhere and found nothing for this (probably simple and common) issue. Can anyone please take a second to chime in and help?

-I'm using CSS positioning (finally) and starting with a simple 15 pixel indent

-Inline positioning works fine in all browsers ("div style=)

-Positioning is ignored in IE Mac if I reference an external stylesheet ("div class=").

I assume I've either got a syntax problem in the stylesheet or hit on a well-known quirk.

Here's are the simplified test CSS and HTML files I'm using.

---------
Here's the entire test CSS file content

.indenttest {
color: #990099;
left: 30px;
}
In IE Mac 5.2.3, the color works, the positioning doesn't.

----------
HERE'S THE TEST HTML FILE

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="csstestsheet.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="indenttest">This is the external stylesheet-formatted text that displays
in purple (as the style color is set) but is NOT positioned (indented) as it
should be.</div>
<div style="position: relative; left: 15px;">
<p>This text positions 15 pixels indented as it should.</p>
</div>
</body>
</html>

Thank you for any help you can offer.

tedster

10:03 pm on May 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums, NPA_Web

You missed including the position:relative rule in your external stylesheet.

NPA_Web

10:49 pm on May 8, 2005 (gmt 0)

10+ Year Member



You're quite right, thank you.

The real issue seemed to be a combination of
A) having forgotten the position: relative; command in my test file and
B) not clearing the cache on my IE Mac, which didn't notice the revised stylesheet files I was uploading.

This combination threw my testing off....

Thanks for the help.