homepage Welcome to WebmasterWorld Guest from 54.205.144.54
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
NN4.x styles only working on first use
tlhmh1




msg:1202275
 8:04 pm on Sep 27, 2002 (gmt 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.

 

tedster




msg:1202276
 8:13 pm on Sep 27, 2002 (gmt 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.

tlhmh1




msg:1202277
 8:25 pm on Sep 27, 2002 (gmt 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>.

tlhmh1




msg:1202278
 8:28 pm on Sep 27, 2002 (gmt 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!

g1smd




msg:1202279
 9:44 pm on Sep 27, 2002 (gmt 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)

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved