Forum Moderators: open

Message Too Old, No Replies

NN7 and simple CSS O.o

Strange layers not applying stylesheet properties.

         

Kynes

1:21 am on May 9, 2003 (gmt 0)

10+ Year Member



So, for some reason I cannot seem to get a few simple layers in a page of mine to work. They're applying essentially the same CSS classes as other elements, and those other elements all work flawlessly. For some reason, neither the style coded into the DIV tags nor the properties from the linked stylesheet seem to function.

All this in NN7, while it functions properly in IE6 (can't recall how it works in earlier IE browsers).

Here's a sample of HTML code (as I'm convinced that is somehow where the problem lies).


<!-- Minutes Archive dates and links -->
<div class="3mid" style="top:1172;">Minutes Archive</div>
<div class="3midIMG" style="top:1167px;"><script JavaScript>displayPNG("PTownMenuBodyDBlue.png");</script></div>
<div id="meetingsinfo" class="mainareas middiv" style="top:1185px;">
<div class="bodytext" align="center">
<br>
Date<br>
Date<br>
Date<br>
Date
</div>
</div>

And next the related CSS. I know the CSS isn't very clean, but that's because I've been killing myself and changing everything I can think of to try to troubleshoot the problem.


.3midIMG {
position: absolute;
left: 217px;
z-index:3;
}
div.3mid{
position:absolute;
z-index:4;
font-family: helvetica, verdana, arial;
font-size:18px;
font-weight:bold;
color: #FFE4B5;
width: 180px;
text-align: center;
left:235px;
top:1172px;
text-align:center;

}

After all that, these layers end up at the top-left of the page, as if there weren't any position properties being called at all, text unformatted, etc. *boggle*

Any help would be appreciate :)

~Kynes

MWpro

1:32 am on May 9, 2003 (gmt 0)

10+ Year Member



First thing that drew my attention was the script tag... I believe it has to be done like this:


<script type="text/javascript">

grahamstewart

1:33 am on May 9, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Kynes,

When you hit problems like this the first thing you should do is validate your html [validator.w3.org] and your css [jigsaw.w3.org].

Heres a few of your problems..

  • CSS classes cannot start with a number!

  • Your missing a unit here - style="top:1172;"

  • Your not using the correct syntax for the <script> tag.
    (should be <script type="text/javascript"> )
  • Kynes

    7:59 pm on May 9, 2003 (gmt 0)

    10+ Year Member



    Most of those problems I was aware of and just hadn't taken the time to clean up yet.

    CSS classes cannot start with a number!

    Now that I didn't know. That fixed most of the problems I was having in NN7.

    Thanks a lot guys :)