Welcome to WebmasterWorld Guest from 54.167.129.169

Forum Moderators: not2easy

Message Too Old, No Replies

NN4.x styles only working on first use

     
8:04 pm on Sep 27, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 19, 2002
posts:62
votes: 0


I'm having a great deal of trouble getting something to work in NN4. For some reason, styles and classes are not being applied across all of my elements.

My stylesheet says:

h3
{
color: #ffffff;
background: #6666ff;
font-family: arial, helvetica, sans-serif;
font-size: 16px;
margin-top: 15px;
margin-bottom: 0px;
padding-top: 2px;
padding-bottom: 1px;
padding-left: 6px;
padding-right: 6px;
}

...and it looks great on IE and newer versions of NN. But when I try it on NN4, the styles only work on the the FIRST use of H3.

Example:

<h3>Feature Story</h3>

<h3>Second Story</h3>

... in NN4, renders the first <H3> in white text with a colored background, but the second <H3> (and all other instances of <H3>) renders as normal <H3> with simple black text on a white background.

I have never had a problem with this in the past. Both the HTML and CSS validate.

Can anyone help me? I can stickymail the URL on request.

8:13 pm on Sept 27, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


NN4 tends to "forget" styles after a table or form element. If that's what's going on in your layout, I've found one workaround - wrapping the entire table or form area in its own <div>. The div is, strictly speaking, redundant - that is, it "shouldn't" be needed.

However, this one little touch seems to be just enough to remind NN4 to go back to the style rules for the elements that follow.

8:25 pm on Sept 27, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 19, 2002
posts:62
votes: 0


I'm not currently using any forms or tables. I'm just trying to make a simple layout page.

Here is a small snippet of my code:

<h3>Feature</h3>
<div class="block" style="border-color: #6666ff;">
The Feature Story goes here.
</div>

<h3>Second</h3>
<div class="block" style="border-color: #6666ff;">
The Second Story goes here.
</div>

Only the first H# renders correctly. Both of the <div class="block"> elements do not render correctly, nor does the second <H3>.

8:28 pm on Sept 27, 2002 (gmt 0)

Junior Member

10+ Year Member

joined:Apr 19, 2002
posts:62
votes: 0


I FIXED IT!

I just realized that NN4 doesn't just ignore "border-color: #xxxxxx;" but it screws it up, so I removed them and it worked.

I'm going to make a simple.css to be loaded by all browsers without the border and an advanced.css (which will add the borders) which also be loaded by most browsers, but will not be loaded by NN4.

THANKS!

9:44 pm on Sept 27, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0



I found a site that had <a href="blah.htm">blah blah</a>blarg blarg</a> and all styles were ignored after that point on NN4 (notice the double </a> tags)