473,396 Members | 2,018 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

css file works in IE but not in firefox

hi all,

I have an asp.net website where am including .css file dynamically on page
load event. For diff users, there is diff CSS file. So after user logs in, I
am setting CSS href on page load. My CSS file works fine in IE 6.0 when i
specify the absolute path. eg- href ="D:\Mywebsite\css\mycssfile.css" but
this full path does not work in firefox 1.5.0.5. When I load page in
firefox, css file seems to have no effect on page.

If I use relative path eg- href="css\mycssfile.css" it works fine in Firefox
but doesn't work in IE 6.0,

Is there any way to get around this problem ?

thanks
puja
Jul 31 '06 #1
4 2279
Your absolute path shouldn't be like "d:\\..."?
Try it "http://...test.css"?

puja 写道:
hi all,

I have an asp.net website where am including .css file dynamically on page
load event. For diff users, there is diff CSS file. So after user logs in, I
am setting CSS href on page load. My CSS file works fine in IE 6.0 when i
specify the absolute path. eg- href ="D:\Mywebsite\css\mycssfile.css" but
this full path does not work in firefox 1.5.0.5. When I load page in
firefox, css file seems to have no effect on page.

If I use relative path eg- href="css\mycssfile.css" it works fine in Firefox
but doesn't work in IE 6.0,

Is there any way to get around this problem ?

thanks
puja
Jul 31 '06 #2
actually I have this in my page load event
MyStyleSheet.Attributes.Add("href", Server.MapPath("css") +
"/mycssfile.css"); ( this works fine in IE but not in firefox)

AND if I use this

MyStyleSheet.Attributes.Add("href", "css/mycssfile.css"); (this
works fine with firefox but not IE)

any ideas ?


"simida" <yo**********@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Your absolute path shouldn't be like "d:\\..."?
Try it "http://...test.css"?

puja ??:
hi all,

I have an asp.net website where am including .css file dynamically on page
load event. For diff users, there is diff CSS file. So after user logs in,
I
am setting CSS href on page load. My CSS file works fine in IE 6.0 when i
specify the absolute path. eg- href ="D:\Mywebsite\css\mycssfile.css"
but
this full path does not work in firefox 1.5.0.5. When I load page in
firefox, css file seems to have no effect on page.

If I use relative path eg- href="css\mycssfile.css" it works fine in
Firefox
but doesn't work in IE 6.0,

Is there any way to get around this problem ?

thanks
puja

Jul 31 '06 #3
Compare the html scurce code between IE and Firefox. After my test, it
works fine.

Such as,

<link rel="stylesheet" href="style/Forum.css" type="text/css"
media="screen">

IE or Firefox can works. There is no problem on it.
Good luck.

Sincerely,
simida

puja 写道:
actually I have this in my page load event
MyStyleSheet.Attributes.Add("href", Server.MapPath("css") +
"/mycssfile.css"); ( this works fine in IE but not in firefox)

AND if I use this

MyStyleSheet.Attributes.Add("href", "css/mycssfile.css"); (this
works fine with firefox but not IE)

any ideas ?


"simida" <yo**********@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Your absolute path shouldn't be like "d:\\..."?
Try it "http://...test.css"?

puja ??:
hi all,

I have an asp.net website where am including .css file dynamically on page
load event. For diff users, there is diff CSS file. So after user logs in,
I
am setting CSS href on page load. My CSS file works fine in IE 6.0 wheni
specify the absolute path. eg- href ="D:\Mywebsite\css\mycssfile.css"
but
this full path does not work in firefox 1.5.0.5. When I load page in
firefox, css file seems to have no effect on page.

If I use relative path eg- href="css\mycssfile.css" it works fine in
Firefox
but doesn't work in IE 6.0,

Is there any way to get around this problem ?

thanks
puja
Jul 31 '06 #4
thanks so much for all your effort simida but I already got my problem
solved. :)

"simida" <yo**********@gmail.comwrote in message
news:11*********************@m79g2000cwm.googlegro ups.com...
Compare the html scurce code between IE and Firefox. After my test, it
works fine.

Such as,

<link rel="stylesheet" href="style/Forum.css" type="text/css"
media="screen">

IE or Firefox can works. There is no problem on it.
Good luck.

Sincerely,
simida

puja ??:
actually I have this in my page load event
MyStyleSheet.Attributes.Add("href", Server.MapPath("css") +
"/mycssfile.css"); ( this works fine in IE but not in firefox)

AND if I use this

MyStyleSheet.Attributes.Add("href", "css/mycssfile.css"); (this
works fine with firefox but not IE)

any ideas ?


"simida" <yo**********@gmail.comwrote in message
news:11*********************@p79g2000cwp.googlegro ups.com...
Your absolute path shouldn't be like "d:\\..."?
Try it "http://...test.css"?

puja ??:
hi all,

I have an asp.net website where am including .css file dynamically on
page
load event. For diff users, there is diff CSS file. So after user logs
in,
I
am setting CSS href on page load. My CSS file works fine in IE 6.0 when
i
specify the absolute path. eg- href ="D:\Mywebsite\css\mycssfile.css"
but
this full path does not work in firefox 1.5.0.5. When I load page in
firefox, css file seems to have no effect on page.

If I use relative path eg- href="css\mycssfile.css" it works fine in
Firefox
but doesn't work in IE 6.0,

Is there any way to get around this problem ?

thanks
puja

Jul 31 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Roger Withnell | last post by:
I would like to check that an image file, selected by a user using fileUpload, is within certain parameters (width, height, filesize) and to display the image file so that the user can see the...
0
by: z0rr0 | last post by:
Anybody noticed problem with getting MoinMoin external file URL to work with Mozilla/Firefox? for example - or or all work OK with Internet Exploder but not with Firefox!
3
by: yehaimanish | last post by:
I am developing an application by which to parse the content from the access_log and insert it into the database. Since each row is an different entry, I am using file() to get the contents into an...
23
by: wylbur37 | last post by:
I'm running an Apache server on my own computer (Windows XP Pro). I wrote a simple PHP script (called test3.php) that I'm running by putting the following URL in the address bar of the browser...
3
by: oopaevah | last post by:
I want to have a separate button which invokes the "browse" button on an input type=file. In internet explorer the following code works ok, in firefox nothing happens. All I do is call click()...
8
by: SM | last post by:
Hello, I wrote a Javascript function that loads a xml file to access the data. After the loading of the xml file, the function init() is called (for testing purposes im only returning the number...
7
by: psybert | last post by:
Hello everyone, Long time lurker, first time poster. I'm a beginner coder, and I've taught myself everything with the help and expertise of users and websites like this one. I normally figure out...
3
by: macca | last post by:
Hi people! I'm having a problem with a file upload script that I'm writing. It works with Firefox but not Internet explorer. When the form is submitted(to it's self) it check for a file upload...
2
by: willyWEB66 | last post by:
Hi everyone, I have this code in javascript where the XML file is loaded and displayed to an html using XSLT. It works fine in IE but not in Firefox. My problem is in the looping to the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.