Redefinition of css class

Hi all
I am finding that when I redefine class in css, FireFox is not enforcing the new style change. In IE the redefinition works fine. The attached code shows the new styles I would like to implement. This re-definition takes place in the aspx code, with a server side script determinig if the alternate css is necessary. Is there any reason why firefox does not want to run these changes ?
#xhl_header_logo {
			        display:none;
		        }
 
    		    .xhl_header_logo {
			        display:none;
		        }
 
		        #xhl_header_AgentLogo {
			       display:none;
		        }
		        .xhl_header_AgentLogo {
			       display:none;
		        }

Open in new window

simshpAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

trickyidiotCommented:
This is NOT redefining:
#xhl_header_logo {
    display:none;
}
.xhl_header_logo {
    display:none;
}


This IS Redefining:

#xhl_header_logo {
    display:none;
}
#xhl_header_logo {
    display:none;
}
0
scrathcyboyCommented:
"Is there any reason why firefox does not want to run these changes ?"

It is almost certainly to do with WHERE the ASPX code is placing the CSS -- if you display the page and do View -> source in IE, or view -> page source in FF2-3, you can determine where the CSS is being placed by ASPX.  

You can solve this simply by putting the BASIC framework code into an includes .CSS file, and either put the latest CSS in the head (but make sure the ASPX is not putting the included CSS file AFTER the head CSS -- or if worst comes to worst, put the final CSS inline -- at least to test -- and both browsers will render it fine.
0
simshpAuthor Commented:
Could it be that its because I am calling the css file as follows:
<link type="text/css" rel="stylesheet" href="/s/dynamic/header.ascx.css.aspx" />

Would this make firefox unhappy ?

If that is the case how does one create dynamic css based on runtime criteria /

thanks
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

scrathcyboyCommented:
"Would this make firefox unhappy ?"

Definitely yes.

"If that is the case how does one create dynamic css based on runtime criteria /"

<link type="text/css" rel="stylesheet" href="s/dynamic/header.ascx.css" />

Note, I removed the leading slash, it is not desired when the directory "s" is under the public_html folder.
Also, the CSS file has to be called .css extension.  MS might like aspx file extensions, but other browsers are NOT going to load it as a CSS file unless it has a CSS extension, and has NO markup in the file except CSS statements.   Note this last point carefully.
0
simshpAuthor Commented:
Ok I managed to get this fix by inserting the attached code into the code behind on the dynamicaly created page.
        Response.ContentType = ("text/css");
        Response.Clear();
        Response.BufferOutput = true;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
scrathcyboyCommented:
so just adding content-type= text/css did it?
 I am surprised this would work with an .ASPX extension -- maybe firefox is more flexible than it used to be.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.