Discussion of general topics about Mozilla Firefox
13 posts • Page 1 of 1
I want to customize the "server not found" page. I remember seeing something about it, but I can't find how to do it anywhere.
Any help is appreciated.
Hmm. This can be done, but you're going to need to get pretty dirty to get it done. Ready?
First, learn about userContent.css:
Now, the easiest way to learn about the elements on the error page is to go to the source. So, go to the chrome folder in the Firefox program folder, usually C:\Program Files\Mozilla Firefox\chrome in Windows Explorer. Find the file called classic.jar and copy that somewhere else. Rename classic.jar to a .zip file and extract it, preferably to a folder called classic at whatever location you are at. Then, open the classic folder and navigate to ...\classic\skin\classic\global and find the file called netError.css.
Open the netError.css file in Wordpad (Notepad doesn't seem to work for me because then the lines all run together). See all the code that starts with the # symbol? Those are the things you can easily change. Copy all the #ELEMENT code into your userContent.css file.
Now you can start making changes to see what you like. I would make small changes at a time to see if it works the way you want. After each change, you need to close and restart Fx. Here's one to get you going:
That should make the box that surrounds the error message be red with square corners instead of white with a rounded corner border. Remember that before every semi-colon, you need to put !important or the change won't do anything.
Give a man a fish, and he eats for a day. Teach a man to fish, and he eats for a lifetime.
I like poetry, long walks on the beach and poking dead things with a stick.
Please do not PM me for personal support. Keep posts here in the Forums instead and we all learn.
This is all much easier if you use the Stylish extension in conjunction with the DOM inspector. No messing around in jar files or profile directories.
Errr, once you have learnt how to use both - yeah, people are going to really learn the DOMi just for this.
Please stop glowering with resentment in the background when other people are making an effort to learn things.
Yes, I realize there are easier ways to do this. But, I took the chance that he/she doesn't know anything about the structure or the coding required for the page. Trying to teach someone about domI in a forum thread doesn't sound like an easy task. I should know, Frank's already schooled me on quite a bit. Thanks Frank!
The reason I gave the location of the jar and the file in it, is that's the easiest way I could think of for them to see how the page is put together.
FWIW this extension modifies the page. <a href="https://addons.mozilla.org/firefox/3336/">ErrorZilla Mod | Firefox Add-ons | Mozilla Corporation</a>
I've found the neterror.css file. It doesn't have what I'm looking for. Basically I want to change the text of the error message itself. I'm using 7-zip, which lets me browse the .jar files directly. I can't seem to find where the actual error codes themselves are.
So what file are the error messages themselves in? Having the same problem here.
C:\Program Files\Mozilla Firefox\chrome\en-US.jar\locale\en-US\global\netError.dtd
Change the jar to a zip to modify, obviously.
Great information... been trying to figure this out for a few days. Question I have is this. I created a host file for our work server which blocks specific sites, if I try to access those sites from any computer I just receive the page can not be displayed message. What I would like to do is create a page that recognizes 127.0.0.1 and display it's own page; is this possible?
Better yet, is there any way to create an internal computer error page (cross browser) without having to install a webserver? Is it possible with ODBC or something?
Apologies as this is basically off-topic, per se. If I understand the netError.xhtml code properly, one only needs to properly "call it" to obtain the appropriate error page. What I'd like to know is how to format that call. I ran across this "call" in an article last week:
moz-neterror:page?e=404&u='http://www.sample.com/'&d='this is the description to be used'
but entered from the browser it only displays a blank page so I know I am missing a detail or two.
Does anyone know a link or article where I can get the rest of the details? Thanks in advance for your patience and assistance.
"Of all the things I've lost, I miss my mind the most!" - Mark Twain
Somewhat OT and you are replying to an elderly thread (started 2006). Locking. Please start a new thread.
"Choose between the Food Select Feature or other Functions. If no food or function is chosen, Toast is the default."
13 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests