DullsVillager
asked on
Default Styles in IE/Moz
Is there any part of Internet Explorer or Mozilla Firebird that contains their default stylesheet in CSS format?
I'd like to be able to apply the sheet for one to the other, theoretically as a cheezy way to have content display the same in either browser. Inspecting the binaries (quickly) I didn't see anything that looked like it would set all/most of the default attributes.
Assuming that there is no built-in file, how can I create the CSS (or equivalent)using JavaScript to extract all of the attributes of all the styles on a page? I've used getElementById and getElementsByTagName to pull styles before, but I have no idea what I'd use to get every style used on a page, let alone all the styles that didn't get used. Beyond that even, I haven't seen anything that would let me enumerate all possible sub-styles (color, background-color, etc.) for an element without knowing what it was called.
I'd like to be able to apply the sheet for one to the other, theoretically as a cheezy way to have content display the same in either browser. Inspecting the binaries (quickly) I didn't see anything that looked like it would set all/most of the default attributes.
Assuming that there is no built-in file, how can I create the CSS (or equivalent)using JavaScript to extract all of the attributes of all the styles on a page? I've used getElementById and getElementsByTagName to pull styles before, but I have no idea what I'd use to get every style used on a page, let alone all the styles that didn't get used. Beyond that even, I haven't seen anything that would let me enumerate all possible sub-styles (color, background-color, etc.) for an element without knowing what it was called.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Is it really that futile to try and match between browsers?
If I can style a TD so that it has a one-pixel border, two-pixel padding and six-pixel spacing, why would it look different in different browsers? (assuming those are the only settable styles for a TD)
I know there's gotta be a way... still looking for the JavaScript to pull attributes of a style.
(just FYI, i'm a moron and was looking at a phpinfo() sheet, so the ACCEPT header was different, and that's why the particular page I was viewing was considerably different... but it should still be possible!)
If I can style a TD so that it has a one-pixel border, two-pixel padding and six-pixel spacing, why would it look different in different browsers? (assuming those are the only settable styles for a TD)
I know there's gotta be a way... still looking for the JavaScript to pull attributes of a style.
(just FYI, i'm a moron and was looking at a phpinfo() sheet, so the ACCEPT header was different, and that's why the particular page I was viewing was considerably different... but it should still be possible!)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Mozilla default stylesheet:
http://lxr.mozilla.org/mozilla/source/layout/html/document/src/html.css
http://lxr.mozilla.org/mozilla/source/layout/html/document/src/html.css
You are far better off if you don't try to make every browser display your page EXACTLY the same. it won't work... and along the way you will have to make many sacrifices in useablity...
Find or make a stylesheet that makes your pages look good in as many brwsers as possible... Remember that looking good does not mean you have to have a pixel-perfect rendering of the page. If that is what you want, you are designing for the wrong medium. Try paper :-)
If you want the default look, just don't use any styling.
On a separate thought, if you are approaching this from a purely intellectual way...
I found this in my installation of Mozzilla Firebird 0.6.2
C:\Program Files\MozillaFirebird\defa
I have to say, my favorite line is :
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
yeah, Ghostbusters.
--start file--
/*
* Edit this file and copy it as userChrome.css into your
* profile-directory/chrome/
*/
/*
* This file can be used to customize the look of Mozilla's user interface
* You should consider using !important on rules which you want to
* override default settings.
*/
/*
* Do not remove the @namespace line -- it's required for correct functioning
*/
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* set default namespace to XUL */
/*
* Some possible accessibility enhancements:
*/
/*
* Make all the default font sizes 20 pt:
*
* * {
* font-size: 20pt !important
* }
*/
/*
* Make menu items in particular 15 pt instead of the default size:
*
* menupopup > * {
* font-size: 15pt !important
* }
*/
/*
* Give the Location (URL) Bar a fixed-width font
*
* #urlbar {
* font-family: monospace !important;
* }
*/
/*
* Eliminate the throbber and its annoying movement:
*
* #throbber-box {
* display: none !important;
* }
*/
/*
* For more examples see http://www.mozilla.org/unix/customizing.html
*/